diff --git a/bash-tab-completion b/bash-tab-completion new file mode 100644 index 0000000..706cbb7 --- /dev/null +++ b/bash-tab-completion @@ -0,0 +1,13 @@ +_steamguard() +{ + local cur prev opts + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + opts="--help --verbose --user --generate-code --encrypt --decrypt" + + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 +} + +complete -F _steamguard steamguard diff --git a/makefile b/makefile index 0fc98fa..39c2b36 100644 --- a/makefile +++ b/makefile @@ -15,8 +15,10 @@ install: cp build/steamguard /usr/local/bin/ cp build/Newtonsoft.Json.dll /usr/local/bin/ cp build/SteamAuth.dll /usr/local/bin/ + cp bash-tab-completion /etc/bash_completion.d/steamguard uninstall: rm -f /usr/local/bin/steamguard rm -f /usr/local/bin/Newtonsoft.Json.dll - rm -f /usr/local/bin/SteamAuth.dll \ No newline at end of file + rm -f /usr/local/bin/SteamAuth.dll + rm -f /etc/bash_completion.d/steamguard