From a1ecb1df4724aa90310b418faae54bd99717f431 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Wed, 24 Aug 2016 11:59:28 -0400 Subject: [PATCH] added bash tab completion --- bash-tab-completion | 13 +++++++++++++ makefile | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 bash-tab-completion 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