hugo zsh 自动补全
hugo zsh 自动补全
生成 zsh 的自动补全脚本
摘要
生成 zsh shell 的自动补全脚本。
如果你的环境中尚未启用 shell 自动补全,你需要启用它。你可以执行以下命令一次:
echo "autoload -U compinit; compinit" >> ~/.zshrc
要在当前 shell 会话中加载补全:
source <(hugo completion zsh)
要在每个新会话中加载补全,请执行一次:
Linux:
hugo completion zsh > "${fpath[1]}/_hugo"
macOS:
hugo completion zsh > $(brew --prefix)/share/zsh/site-functions/_hugo
此设置生效需要重新启动 shell。
hugo completion zsh [flags]
选项
-h, --help zsh 帮助
--no-descriptions 禁用补全描述
从父命令继承的选项
--clock string 设置 Hugo 使用的时钟,例如 --clock 2021-11-06T22:30:00.00+09:00
--config string 配置文件 (默认为 hugo.yaml|json|toml)
--configDir string 配置文件目录 (默认为 "config")
-d, --destination string 写入文件的目录路径
-e, --environment string 构建环境
--ignoreVendorPaths string 忽略任何与给定 Glob 模式匹配的模块路径的 _vendor
--logLevel string 日志级别 (debug|info|warn|error)
--quiet 以静默模式构建
-M, --renderToMemory 渲染到内存 (主要在运行服务器时有用)
-s, --source string 读取文件的相对路径
--themesDir string 主题目录的路径
另请参阅
- hugo completion - 生成指定 shell 的自动补全脚本