fix shallow-backup completion

- fix wrong syntax
- simplify code
This commit is contained in:
Shohei YOSHIDA 2026-03-08 21:43:42 +09:00
parent 0f350f3bdb
commit 410498264d
No known key found for this signature in database
GPG Key ID: C9A1BB11BB940CF2
1 changed files with 23 additions and 27 deletions

View File

@ -38,33 +38,29 @@
#
# ------------------------------------------------------------------------------
_shallow-backup() {
_arguments \
'(- 1 *)'{-h,--help}'[Show help and exit]' \
'(- 1 *)'{-v,--version}'[Print version]' \
'--add-dot[Add a dotfile or dotfolder to config by path]:PATH:_files' \
'--backup-all[Full back up]' \
'--backup-configs[Back up app config files]' \
'--backup-dots[Back up dotfiles]' \
'--backup-fonts[Back up installed fonts]' \
'--backup-packages[Back up package libraries]' \
'--delete-config[Delete config file]' \
'--destroy-backup[Delete backup directory]' \
'--dry-run[Do not backup or reinstall any files, just give verbose output]' \
'--new-path[Input a new back up directory path]:PATH:_files -/' \
'--no-new-backup-path-prompt[Skip setting new back up directory path prompt]' \
'--no-splash[Do not display splash screen]' \
'--reinstall-all[Full reinstallation]' \
'--reinstall-configs[Reinstall configs]' \
'--reinstall-dots[Reinstall dotfiles and dotfolders]' \
'--reinstall-fonts[Reinstall fonts]' \
'--reinstall-packages[Reinstall packages]' \
'--remote[Set remote URL for the git repo]':url \
'--edit[Open config file in $EDITOR]' \
'--show[Display config file]'
}
_shallow-backup
_arguments \
'(- 1 *)'{-h,--help}'[Show help and exit]' \
'(- 1 *)'{-v,--version}'[Print version]' \
'--add-dot[Add a dotfile or dotfolder to config by path]:PATH:_files' \
'--backup-all[Full back up]' \
'--backup-configs[Back up app config files]' \
'--backup-dots[Back up dotfiles]' \
'--backup-fonts[Back up installed fonts]' \
'--backup-packages[Back up package libraries]' \
'--delete-config[Delete config file]' \
'--destroy-backup[Delete backup directory]' \
'--dry-run[Do not backup or reinstall any files, just give verbose output]' \
'--new-path[Input a new back up directory path]:PATH:_files -/' \
'--no-new-backup-path-prompt[Skip setting new back up directory path prompt]' \
'--no-splash[Do not display splash screen]' \
'--reinstall-all[Full reinstallation]' \
'--reinstall-configs[Reinstall configs]' \
'--reinstall-dots[Reinstall dotfiles and dotfolders]' \
'--reinstall-fonts[Reinstall fonts]' \
'--reinstall-packages[Reinstall packages]' \
'--remote[Set remote URL for the git repo]:url' \
'--edit[Open config file in $EDITOR]' \
'--show[Display config file]'
# Local Variables:
# mode: Shell-Script