equal
deleted
inserted
replaced
56 local -a pkgs=( "${jsons[@]##*/}" ) |
56 local -a pkgs=( "${jsons[@]##*/}" ) |
57 COMPREPLY=( "${pkgs[@]%.json}" ) |
57 COMPREPLY=( "${pkgs[@]%.json}" ) |
58 cd "$olddir" |
58 cd "$olddir" |
59 return |
59 return |
60 ;; |
60 ;; |
|
61 bucket) |
|
62 if [[ $COMP_CWORD = 2 ]]; then |
|
63 COMPREPLY=( $(compgen -W 'add list known rm' -- "$cur") ) |
|
64 return |
|
65 fi |
|
66 local subcmd="${COMP_WORDS[2]}" |
|
67 case "$subcmd" in |
|
68 list|known) |
|
69 COMPREPLY=( ) |
|
70 return |
|
71 ;; |
|
72 add|rm) |
|
73 local -a buckets=( `scoop bucket known` ) |
|
74 local cr=$'\r' |
|
75 buckets=( "${buckets[@]/$cr/}" ) |
|
76 COMPREPLY=( $(compgen -W '${buckets[@]}' -- "$cur") ) |
|
77 return |
|
78 ;; |
|
79 esac |
61 esac |
80 esac |
62 } |
81 } |
63 |
82 |
64 complete -F _scoop scoop |
83 complete -F _scoop scoop |