diff --git a/.bash-completion b/.bash-completion new file mode 100644 index 0000000000000000000000000000000000000000..9df439ba2344d04a1973bd22058017db6ac0605a --- /dev/null +++ b/.bash-completion @@ -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 diff --git a/ghcup b/ghcup index 9086105a6373d9d91c8ab1b3bf214ce3ee721534..648e8193364721981f43cece0ac4e746d5d7fefa 100755 --- a/ghcup +++ b/ghcup @@ -2049,6 +2049,18 @@ while [ $# -gt 0 ] ; do -V|--version) printf "%s\\n" "${VERSION}" exit 0;; + --list-commands) + echo "changelog +compile +debug-info +install +install-cabal +list +print-system-reqs +rm +set +upgrade" + exit 0;; -h|--help) usage;; -w|--wget)