Skip to content

Commit

Permalink
Merge pull request #955 from xxwjj/bash_completion
Browse files Browse the repository at this point in the history
add fileshare bash completion
  • Loading branch information
leonwanghui committed Jul 9, 2019
2 parents 759c355 + 5a575cf commit cbb8e25
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions osdsctl/completion/osdsctl.bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# bash completion for openstack nova-manage
_osdsctl() {
COMPREPLY=()
local cur=${COMP_WORDS[COMP_CWORD]};
local pre=${COMP_WORDS[COMP_CWORD-1]};
case "$COMP_CWORD $pre" in
'1 osdsctl')
COMPREPLY=($(compgen -W 'dock pool profile version volume replication' -- $cur)) ;;
COMPREPLY=($(compgen -W 'dock pool profile version volume replication fileshare' -- $cur)) ;;
'2 dock')
COMPREPLY=($(compgen -W 'list show' -- $cur)) ;;
'2 pool')
Expand All @@ -40,12 +39,16 @@ _osdsctl() {
COMPREPLY=($(compgen -W 'create delete list show update' -- $cur)) ;;
'3 group')
COMPREPLY=($(compgen -W 'create delete list show update' -- $cur)) ;;
'2 fileshare')
COMPREPLY=($(compgen -W 'create delete list show acl snapshot' -- $cur)) ;;
'3 acl')
COMPREPLY=($(compgen -W 'create delete list show' -- $cur)) ;;
'*')
;;
esac

[ $COMP_CWORD == 1 ] && {
COMPREPLY=($(compgen -W 'dock pool profile version volume replication' -- $cur))
COMPREPLY=($(compgen -W 'dock pool profile version volume replication fileshare' -- $cur))
}
return 0
}
Expand Down

0 comments on commit cbb8e25

Please sign in to comment.