diff options
author | Mike Crute <mcrute@gmail.com> | 2012-06-13 10:04:23 -0400 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2012-06-13 10:04:23 -0400 |
commit | 594f5322dfd8f77c008edd37bb8f657e1fede7a7 (patch) | |
tree | 3aa7ac615b26bc234c7570da03557e260ce48ee3 /.bash_completion.d | |
parent | 8cb9ca9ba251bff02c2ec180bd6bfd1ff2ad4800 (diff) | |
download | dotfiles-594f5322dfd8f77c008edd37bb8f657e1fede7a7.tar.bz2 dotfiles-594f5322dfd8f77c008edd37bb8f657e1fede7a7.tar.xz dotfiles-594f5322dfd8f77c008edd37bb8f657e1fede7a7.zip |
Add sandbox command completion
Diffstat (limited to '.bash_completion.d')
-rw-r--r-- | .bash_completion.d/sandbox | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.bash_completion.d/sandbox b/.bash_completion.d/sandbox new file mode 100644 index 0000000..cef0021 --- /dev/null +++ b/.bash_completion.d/sandbox | |||
@@ -0,0 +1,12 @@ | |||
1 | #!bash | ||
2 | |||
3 | if [[ -d ~/sandboxes ]]; then | ||
4 | function sandbox_complete | ||
5 | { | ||
6 | word=${COMP_WORDS[COMP_CWORD]} | ||
7 | allwords="$(ls ~/sandboxes)" | ||
8 | COMPREPLY=( $(compgen -W "$allwords" $word) ) | ||
9 | } | ||
10 | |||
11 | complete -F sandbox_complete sb | ||
12 | fi | ||