diff --git a/data/etc/bash_completion.d/show b/data/etc/bash_completion.d/show new file mode 100644 index 0000000000..fbab3cd77c --- /dev/null +++ b/data/etc/bash_completion.d/show @@ -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; diff --git a/setup.py b/setup.py index 5ed14a13d0..844a17bc3e 100644 --- a/setup.py +++ b/setup.py @@ -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', diff --git a/stdeb.cfg b/stdeb.cfg index ad9dc4b00d..e74391cb26 100644 --- a/stdeb.cfg +++ b/stdeb.cfg @@ -1,2 +1,2 @@ [DEFAULT] -Depends: psmisc, grub2-common +Depends: psmisc, grub2-common, bash-completion