home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / bash_completion.d / chsh < prev    next >
Encoding:
Text File  |  2010-11-16  |  715 b   |  38 lines

  1. # chsh(1) completion
  2.  
  3. _chsh()
  4. {
  5.     local cur prev
  6.  
  7.     COMPREPLY=()
  8.     _get_comp_words_by_ref cur prev
  9.  
  10.     case $prev in
  11.         --list-shells|--help|-v|--version)
  12.             return 0
  13.             ;;
  14.         -s|--shell)
  15.             _shells
  16.             return 0
  17.             ;;
  18.     esac
  19.  
  20.     if [[ "$cur" == -* && "$( uname -s )" == @(Linux|GNU|GNU/*) ]]; then
  21.         COMPREPLY=( $( compgen -W '--shell --list-shells --help --version' \
  22.             -- "$cur" ) )
  23.     else
  24.         COMPREPLY=( $( compgen -u -- "$cur" ) )
  25.     fi
  26.  
  27.     return 0
  28. }
  29. complete -F _chsh chsh
  30.  
  31. # Local variables:
  32. # mode: shell-script
  33. # sh-basic-offset: 4
  34. # sh-indent-comment: t
  35. # indent-tabs-mode: nil
  36. # End:
  37. # ex: ts=4 sw=4 et filetype=sh
  38.