Add basic bash-completion wrt #109
This commit is contained in:
parent
1b719ead22
commit
580da22569
11
.bash-completion
Normal file
11
.bash-completion
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
_ghcup()
|
||||||
|
{
|
||||||
|
local cur
|
||||||
|
COMPREPLY=()
|
||||||
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
if [[ ${#COMP_WORDS[*]} -le 2 ]]; then
|
||||||
|
COMPREPLY=($(compgen -W "$(ghcup --list-commands)" -- $cur))
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
} &&
|
||||||
|
complete -F _ghcup ghcup
|
12
ghcup
12
ghcup
@ -2049,6 +2049,18 @@ while [ $# -gt 0 ] ; do
|
|||||||
-V|--version)
|
-V|--version)
|
||||||
printf "%s\\n" "${VERSION}"
|
printf "%s\\n" "${VERSION}"
|
||||||
exit 0;;
|
exit 0;;
|
||||||
|
--list-commands)
|
||||||
|
echo "changelog
|
||||||
|
compile
|
||||||
|
debug-info
|
||||||
|
install
|
||||||
|
install-cabal
|
||||||
|
list
|
||||||
|
print-system-reqs
|
||||||
|
rm
|
||||||
|
set
|
||||||
|
upgrade"
|
||||||
|
exit 0;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
usage;;
|
usage;;
|
||||||
-w|--wget)
|
-w|--wget)
|
||||||
|
Loading…
Reference in New Issue
Block a user