File tree Expand file tree Collapse file tree 8 files changed +19
-11
lines changed
Expand file tree Collapse file tree 8 files changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ _1st_arguments=(
88 ' link:Link a local package'
99 ' list:List packages'
1010 ' package-path:Print the full path of a package'
11+ ' prune:Prune all packages'
1112 ' remove:Uninstall a package'
1213 ' upgrade:[TASK] Upgrade a package'
13- ' init:[box_name] [box_url] Initializes current folder for Vagrant usage'
14- ' --version:Prints the Vagrant version information'
14+ ' --version:Print version'
1515 ' --global:Switch to global dependency management'
1616 ' --help:Show help'
1717)
@@ -59,6 +59,8 @@ case $state in
5959 _describe -t commands " gem subcommand" subcommandOptions
6060 ;;
6161 (remove)
62+ local -a subcommandOptions=(--all)
63+ _describe -t commands " gem subcommand" subcommandOptions
6264 ;;
6365 (upgrade)
6466 local subcommandOptions=()
Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ _bpm() {
8080 readarray -t COMPREPLY < <( IFS=' ' compgen -W " ${subcommandOptions[*]} " -- " $currentWord " )
8181 ;;
8282 remove)
83+ subcommandOptions=(--all)
84+ readarray -t COMPREPLY < <( IFS=' ' compgen -W " ${subcommandOptions[*]} " -- " $currentWord " )
8385 ;;
8486 upgrade)
8587 readarray -t subcommandOptions < <( bpm complete package-path)
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ set subcmd package-path
3232set -l subcommandOptions
3333complete -c $cmd -f -n " __fish_seen_subcommand_from $subcmd " -a " $subcommandOptions (bpm complete package-path)"
3434
35+ set subcmd remove
36+ set -l subcommandOptions --all
37+ complete -c $cmd -f -n " __fish_seen_subcommand_from $subcmd " -a " $subcommandOptions (bpm complete upgrade)"
38+
3539set subcmd upgrade
3640set -l subcommandOptions
3741# TODO: only complete if (bpm complete upgrade) was successfull
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ do-plumbing-clone() {
2727 git_args+=(" $uri " )
2828 git_args+=(" $BPM_PACKAGES_PATH /$id " )
2929
30- printf ' %s\n' " -> Cloning Git repository"
30+ printf ' -> %s\n' " Cloning Git repository"
3131 local git_output=
3232 if ! git_output=" $( git clone " ${git_args[@]} " 2>&1 ) " ; then
3333 log.error " Could not clone repository"
Original file line number Diff line number Diff line change @@ -73,10 +73,10 @@ do_actual_removal() {
7373 do-plumbing-unlink-completions " $id "
7474
7575 if [ " ${id%%/* } " = ' local' ]; then
76- printf ' %s\n' " -> Unsymlinking directory"
76+ printf ' -> %s\n' " Unsymlinking directory"
7777 unlink " $BPM_PACKAGES_PATH /$id "
7878 else
79- printf ' %s\n' " -> Removing Git repository"
79+ printf ' -> %s\n' " Removing Git repository"
8080 rm -rf " ${BPM_PACKAGES_PATH:? } /$id "
8181 if ! rmdir -p " ${BPM_PACKAGES_PATH:? } /${id%/* } " & > /dev/null; then
8282 # Do not exit on "failure"
Original file line number Diff line number Diff line change @@ -104,8 +104,8 @@ abstract.bins_do_action() {
104104 abstract_bins_did=' yes'
105105
106106 case " $action " in
107- link) printf ' %s\n' " -> Linking bin files" ;;
108- unlink) printf ' %s\n' " -> Unlinking bin files" ;;
107+ link) printf ' -> %s\n' " Linking bin files" ;;
108+ unlink) printf ' -> %s\n' " Unlinking bin files" ;;
109109 esac
110110 fi
111111
Original file line number Diff line number Diff line change @@ -225,8 +225,8 @@ abstract.completions_do_echo() {
225225 abstract_completions_did=yes
226226
227227 case " $action " in
228- link) printf ' %s\n' " -> Linking completion files" ;;
229- unlink) printf ' %s\n' " -> Unlinking completion files" ;;
228+ link) printf ' -> %s\n' " Linking completion files" ;;
229+ unlink) printf ' -> %s\n' " Unlinking completion files" ;;
230230 esac
231231 fi
232232}
Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ abstract.mans_do_action() {
8989 abstract_mans_did=yes
9090
9191 case " $action " in
92- link) printf ' %s\n' " -> Linking man files" ;;
93- unlink) printf ' %s\n' " -> Unlinking man files" ;;
92+ link) printf ' -> %s\n' " Linking man files" ;;
93+ unlink) printf ' -> %s\n' " Unlinking man files" ;;
9494 esac
9595 fi
9696
You can’t perform that action at this time.
0 commit comments