/bash_completion.d/chsh

http://github.com/brinkman83/bashrc · #! · 27 lines · 22 code · 5 blank · 0 comment · 0 complexity · d6a9a470197f5765f95380553de755ef MD5 · raw file

  1. # chsh(1) completion
  2. _chsh()
  3. {
  4. local cur prev
  5. COMPREPLY=()
  6. cur=`_get_cword`
  7. prev=${COMP_WORDS[COMP_CWORD-1]}
  8. if [ "$prev" = "-s" ]; then
  9. _shells
  10. else
  11. COMPREPLY=( $( compgen -u -- "$cur" ) )
  12. fi
  13. return 0
  14. }
  15. complete -F _chsh chsh
  16. # Local variables:
  17. # mode: shell-script
  18. # sh-basic-offset: 4
  19. # sh-indent-comment: t
  20. # indent-tabs-mode: nil
  21. # End:
  22. # ex: ts=4 sw=4 et filetype=sh