安装包含本地参考和全部已发布模式的完整包。
install replacereplace-e txt,php 按扩展名筛选,-g "*.php" 按文件名筛选。-i 忽略普通文本大小写;-p 使用完整的 PHP 正则表达式。-a 包含依赖和缓存目录。
-w -b 依次创建 .bak、.bak-001,不会覆盖旧备份。递归搜索会跳过备份文件。二进制文件或大于 4 MiB 的文件会跳过;最多扫描 5000 个文件。
replace <old> <new> [path] [options]replace <old> <new>预览当前目录文件中的替换
replace <old> <new> <file>预览单个文件中的替换
replace <old> <new> <dir> -r递归预览目录中的替换
-w原子写入计划中的修改
-i普通文本匹配时忽略大小写
-p把 <old> 作为完整 PHP 正则表达式
-e <exts>限制扩展名,例如 php,js,css 或 tar.gz
-g <glob>用 *.php 之类 glob 限制文件名
-b写入前创建 .bak 副本
-a包含 vendor、node_modules、VCS 与缓存目录
-e txt,php 按扩展名筛选,-g "*.php" 按文件名筛选。-i 忽略普通文本大小写;-p 使用完整的 PHP 正则表达式。-a 包含依赖和缓存目录。
-w -b 依次创建 .bak、.bak-001,不会覆盖旧备份。递归搜索会跳过备份文件。二进制文件或大于 4 MiB 的文件会跳过;最多扫描 5000 个文件。
可直接在页面中运行预先准备的示例。结果已预先生成并在浏览器中显示;服务器不会执行任何终端命令。
安装当前兼容版本。完整功能请选择 Base,精简包请选择 Minimum;已安装模块的更新请使用 upgrade。
Base 与 Minimum 是同一当前模块版本的两个包。
安装包含本地参考和全部已发布模式的完整包。
install replace安装精简包。该包不包含本地参考;
install replace -m安装这个确切的已发布版本。
install replace -v 1.1.5让 upgrade 检查兼容性,仅在需要时替换已安装块。
upgrade replace删除扩展块,不影响核心和其他模块。
install replace -u示例可复制,但网站不会执行。请先检查路径、权限和破坏性选项。
cd \sandbox | replace draft published workspace/replace.txtPreview 2 replacements in 1 file
workspace/replace.txt 2
Write use -w to apply changesreplace draft published \sandbox\workspace\replace.txt -wReplaced 2 occurrences in 1 file
workspace/replace.txt 2
replace DRAFT published \sandbox\workspace\replace.txt -iPreview 2 replacements in 1 file
workspace/replace.txt 2
Write use -w to apply changesreplace "~draft~" published \sandbox\workspace\replace.txt -pPreview 2 replacements in 1 file
workspace/replace.txt 2
Write use -w to apply changesreplace draft published \sandbox\workspace -r -e txtPreview 2 replacements in 1 file
workspace/replace.txt 2
Write use -w to apply changesreplace draft published \sandbox\workspace -r -g "*.txt"Preview 2 replacements in 1 file
workspace/replace.txt 2
Write use -w to apply changesreplace draft published \sandbox\workspace\replace.txt -w -bReplaced 2 occurrences in 1 file
workspace/replace.txt 2
Backups 1
workspace/replace.txt.bakreplace draft published \sandbox\workspace -r -a -e txtPreview 3 replacements in 2 files
workspace/replace.txt 2
workspace/vendor/review.txt 1
Write use -w to apply changesreplace draft published \sandbox\workspacePreview 2 replacements in 1 file
workspace/replace.txt 2
Write use -w to apply changesreplace draft published \sandbox\missing.txt未找到路径replace draft published \sandbox\workspace\replace.txt -pInvalid regular expressionreplace draft published \sandbox\workspace\replace.txt -w -b | replace published final \sandbox\workspace\replace.txt -w -bReplaced 2 occurrences in 1 file
workspace/replace.txt 2
Backups 1
workspace/replace.txt.bak
Replaced 2 occurrences in 1 file
workspace/replace.txt 2
Backups 1
workspace/replace.txt.bak-001sandbox/workspace/replace.txt该示例使用受保护的 /sandbox/ 文档工作区中的文件或目录。
status=draft
owner=lil
status=draft