forked from circus-tent/circus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircusctl_bash_completion
37 lines (36 loc) · 1.09 KB
/
circusctl_bash_completion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# #########################################################################
# This bash script adds tab-completion feature to circusctl
#
# Testing it out without installing
# =================================
#
# To test out the completion without "installing" this, just run this file
# directly, like so:
#
# source ~/path/to/circusctl_bash_completion
#
# After you do that, tab completion will immediately be made available in your
# current Bash shell. But it won't be available next time you log in.
#
# Installing
# ==========
#
# To install this, point to this file from your .bash_profile, like so:
#
# source ~/path/to/circusctl_bash_completion
#
# Do the same in your .bashrc if .bashrc doesn't invoke .bash_profile.
#
# Settings will take effect the next time you log in.
#
# Uninstalling
# ============
#
# To uninstall, just remove the line from your .bash_profile and .bashrc.
_circusctl_completion()
{
COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \
COMP_CWORD=$COMP_CWORD \
AUTO_COMPLETE=1 $1 ) )
}
complete -F _circusctl_completion -o default circusctl