跳转到内容

mise bootstrap dotfiles add

  • 用法: mise bootstrap dotfiles add [FLAGS] [TARGET]…
  • 作用: 修改状态
  • 源代码: src/cli/dotfiles/add.rs

[dotfiles] 中添加或更新 dotfiles

如果目标已被管理,则会从当前目标更新其源。否则,它会创建一个 [dotfiles] 条目,并在 dotfiles.root 下初始化源,除非提供了 --source

参数

  • [TARGET]… — 要添加或更新的目标

标志

  • --changed — 更新以 copy 模式管理的每个已更改文件的源
  • -f --force — 不提示,覆盖现有源
  • -g --global — 写入全局配置
  • -l --local — 写入本地配置,而不是全局配置
  • -m --mode <MODE> — 要写入的 dotfile 模式
  • -n --dry-run — 打印配置/源更新,但不写入任何内容
  • --no-apply — 添加条目但不应用
  • -p --path <PATH> — 写入此配置文件或目录
  • -s --source <PATH> — 用于单个目标的源路径
  • -y --yes — 跳过确认提示
  • -h --help — 打印帮助

示例:

mise bootstrap dotfiles add ~/.zshrc
mise bootstrap dotfiles add --mode copy ~/.config/starship.toml
mise bootstrap dotfiles add --source dotfiles/gitconfig ~/.gitconfig
mise bootstrap dotfiles add --changed