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=(
8
8
' link:Link a local package'
9
9
' list:List packages'
10
10
' package-path:Print the full path of a package'
11
+ ' prune:Prune all packages'
11
12
' remove:Uninstall a package'
12
13
' 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'
15
15
' --global:Switch to global dependency management'
16
16
' --help:Show help'
17
17
)
@@ -59,6 +59,8 @@ case $state in
59
59
_describe -t commands " gem subcommand" subcommandOptions
60
60
;;
61
61
(remove)
62
+ local -a subcommandOptions=(--all)
63
+ _describe -t commands " gem subcommand" subcommandOptions
62
64
;;
63
65
(upgrade)
64
66
local subcommandOptions=()
Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ _bpm() {
80
80
readarray -t COMPREPLY < <( IFS=' ' compgen -W " ${subcommandOptions[*]} " -- " $currentWord " )
81
81
;;
82
82
remove)
83
+ subcommandOptions=(--all)
84
+ readarray -t COMPREPLY < <( IFS=' ' compgen -W " ${subcommandOptions[*]} " -- " $currentWord " )
83
85
;;
84
86
upgrade)
85
87
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
32
32
set -l subcommandOptions
33
33
complete -c $cmd -f -n " __fish_seen_subcommand_from $subcmd " -a " $subcommandOptions (bpm complete package-path)"
34
34
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
+
35
39
set subcmd upgrade
36
40
set -l subcommandOptions
37
41
# 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() {
27
27
git_args+=(" $uri " )
28
28
git_args+=(" $BPM_PACKAGES_PATH /$id " )
29
29
30
- printf ' %s\n' " -> Cloning Git repository"
30
+ printf ' -> %s\n' " Cloning Git repository"
31
31
local git_output=
32
32
if ! git_output=" $( git clone " ${git_args[@]} " 2>&1 ) " ; then
33
33
log.error " Could not clone repository"
Original file line number Diff line number Diff line change @@ -73,10 +73,10 @@ do_actual_removal() {
73
73
do-plumbing-unlink-completions " $id "
74
74
75
75
if [ " ${id%%/* } " = ' local' ]; then
76
- printf ' %s\n' " -> Unsymlinking directory"
76
+ printf ' -> %s\n' " Unsymlinking directory"
77
77
unlink " $BPM_PACKAGES_PATH /$id "
78
78
else
79
- printf ' %s\n' " -> Removing Git repository"
79
+ printf ' -> %s\n' " Removing Git repository"
80
80
rm -rf " ${BPM_PACKAGES_PATH:? } /$id "
81
81
if ! rmdir -p " ${BPM_PACKAGES_PATH:? } /${id%/* } " & > /dev/null; then
82
82
# Do not exit on "failure"
Original file line number Diff line number Diff line change @@ -104,8 +104,8 @@ abstract.bins_do_action() {
104
104
abstract_bins_did=' yes'
105
105
106
106
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" ;;
109
109
esac
110
110
fi
111
111
Original file line number Diff line number Diff line change @@ -225,8 +225,8 @@ abstract.completions_do_echo() {
225
225
abstract_completions_did=yes
226
226
227
227
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" ;;
230
230
esac
231
231
fi
232
232
}
Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ abstract.mans_do_action() {
89
89
abstract_mans_did=yes
90
90
91
91
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" ;;
94
94
esac
95
95
fi
96
96
You can’t perform that action at this time.
0 commit comments