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 / dd < prev    next >
Encoding:
Text File  |  2010-11-16  |  813 b   |  40 lines

  1. # bash completion for dd
  2.  
  3. have dd &&
  4. _dd()
  5. {
  6.     local cur
  7.  
  8.     COMPREPLY=()
  9.     _get_comp_words_by_ref -n = cur
  10.  
  11.     case $cur in
  12.     if=*|of=*)
  13.         cur=${cur#*=}
  14.         _filedir
  15.         return 0
  16.         ;;
  17.     conv=*)
  18.         cur=${cur#*=}
  19.         COMPREPLY=( $( compgen -W 'ascii ebcdic ibm block unblock \
  20.             lcase notrunc ucase swab noerror sync' -- "$cur" ) )
  21.         return 0
  22.         ;;
  23.     esac
  24.  
  25.     _expand || return 0
  26.  
  27.     COMPREPLY=( $( compgen -W '--help --version' -- "$cur" ) \
  28.                 $( compgen -W 'bs cbs conv count ibs if obs of seek skip'\
  29.                 -S '=' -- "$cur" ) )
  30. } &&
  31. complete -F _dd -o nospace -o filenames dd
  32.  
  33. # Local variables:
  34. # mode: shell-script
  35. # sh-basic-offset: 4
  36. # sh-indent-comment: t
  37. # indent-tabs-mode: nil
  38. # End:
  39. # ex: ts=4 sw=4 et filetype=sh
  40.