Merge pull request #2 from int9h/master

add bash completion
This commit is contained in:
Justin Keller
2017-11-24 12:41:57 -08:00
committed by GitHub
2 changed files with 18 additions and 0 deletions

View File

@@ -100,6 +100,10 @@ Usage: cryptr command <command-specific-options>
```
### Bash Tab completion
add the `tools/cryptr-bash-completion.bash` to your tab completion file directory
## Changelog
https://github.com/nodesocket/cryptr/blob/master/CHANGELOG.md

View File

@@ -0,0 +1,14 @@
_cryptr_complete()
{
local cur_word prev_word type_list
COMPREPLY=()
cur_word="${COMP_WORDS[COMP_CWORD]}"
prev_word="${COMP_WORDS[COMP_CWORD-1]}"
opts='encrypt decrypt'
COMPREPLY=( $(compgen -W "${opts}" -- ${cur_word}) )
return 0
}
complete -F _cryptr_complete cryptr.bash cryptr