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 / rtcwake < prev    next >
Encoding:
Text File  |  2010-11-16  |  972 b   |  41 lines

  1. # bash completion for rtcwake
  2.  
  3. have rtcwake &&
  4. _rtcwake()
  5. {
  6.     COMPREPLY=()
  7.     local cur prev split=false
  8.     _get_comp_words_by_ref cur prev
  9.  
  10.     _split_longopt && split=true
  11.  
  12.     case "$prev" in
  13.         --help|-h|--version|-V|--seconds|-s|--time|-t)
  14.             return 0
  15.             ;;
  16.         --mode|-m)
  17.             COMPREPLY=( $( compgen -W 'standby mem disk on no off' -- "$cur" ) )
  18.             return 0
  19.             ;;
  20.         --device|-d)
  21.             COMPREPLY=( $( command ls -d /dev/rtc?* 2>/dev/null ) )
  22.             COMPREPLY=( $( compgen -W '${COMPREPLY[@]#/dev/}' -- "$cur" ) )
  23.             return 0
  24.             ;;
  25.     esac
  26.  
  27.     $split && return 0
  28.  
  29.     COMPREPLY=( $( compgen -W '--device --local --mode --seconds --time --utc \
  30.         --verbose --version --help' -- "$cur" ) )
  31. } &&
  32. complete -F _rtcwake rtcwake
  33.  
  34. # Local variables:
  35. # mode: shell-script
  36. # sh-basic-offset: 4
  37. # sh-indent-comment: t
  38. # indent-tabs-mode: nil
  39. # End:
  40. # ex: ts=4 sw=4 et filetype=sh
  41.