Skip to content

Commit

Permalink
[sonic_cli]: Fix bash completion for 'show' command (#12)
Browse files Browse the repository at this point in the history
[sonic_cli]: Fix bash completion for 'show' command
  • Loading branch information
jleveque committed Mar 1, 2017
1 parent 07a8b3a commit ce84e28
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions data/etc/bash_completion.d/show
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
_show_completion() {
COMPREPLY=( $( env COMP_WORDS="${COMP_WORDS[*]}" \
COMP_CWORD=$COMP_CWORD \
_SHOW_COMPLETE=complete $1 ) )
return 0
}

complete -F _show_completion -o default show;
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
'scripts/portstat',
'scripts/sfputil',
],
data_files=[
('/etc/bash_completion.d', ['data/etc/bash_completion.d/show'])
],
entry_points={
'console_scripts': [
'show = sonic_cli.main:cli',
Expand Down
2 changes: 1 addition & 1 deletion stdeb.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[DEFAULT]
Depends: psmisc, grub2-common
Depends: psmisc, grub2-common, bash-completion

0 comments on commit ce84e28

Please sign in to comment.