diff options
author | Guillaume Rousse <guillaume@oberkampf.msr-inria.inria.fr> | 2010-01-03 18:13:31 +0100 |
---|---|---|
committer | Guillaume Rousse <guillaume@oberkampf.msr-inria.inria.fr> | 2010-01-03 18:13:31 +0100 |
commit | f35923a50515c5bb0f3f843e7d6a99b979698e61 (patch) | |
tree | a02c00fed2e540102ab8dd33623b9d1061416009 | |
parent | 25a0fcf1b4bbd862d57525f06e33a7a901eef889 (diff) | |
download | bash-completion-f35923a50515c5bb0f3f843e7d6a99b979698e61.tar.gz |
use _split_longopt
-rw-r--r-- | contrib/wodim | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/contrib/wodim b/contrib/wodim index ada800c6..c1c844a4 100644 --- a/contrib/wodim +++ b/contrib/wodim @@ -3,37 +3,36 @@ have cdrecord || have wodim && _cdrecord() { - local cur prev i generic_options track_options track_mode + local cur prev i generic_options track_options track_mode split=false COMPREPLY=() cur=`_get_cword` prev=${COMP_WORDS[COMP_CWORD-1]} - # foo=bar style option - if [[ "$cur" == *=* ]]; then - prev=${cur/=*/} - cur=${cur/*=/} - case $prev in - textfile|cuefile) - _filedir - return 0 - ;; - blank) - COMPREPLY=( $( compgen -W 'help all fast \ - track unreserve trtail unclose session' \ - -- "$cur" ) ) - return 0 - ;; - driveropts) - COMPREPLY=( $( compgen -W 'burnfree noburnfree\ - varirec= audiomaster forcespeed noforcespeed\ - speedread nospeedread singlesession \ - nosinglesession hidecdr nohidecdr tattooinfo\ - tattoofile=' -- "$cur" ) ) - return 0 - ;; - esac - fi + _split_longopt && split=true + + case $prev in + textfile|cuefile) + _filedir + return 0 + ;; + blank) + COMPREPLY=( $( compgen -W 'help all fast \ + track unreserve trtail unclose session' \ + -- "$cur" ) ) + return 0 + ;; + driveropts) + COMPREPLY=( $( compgen -W 'burnfree noburnfree\ + varirec= audiomaster forcespeed noforcespeed\ + speedread nospeedread singlesession \ + nosinglesession hidecdr nohidecdr tattooinfo\ + tattoofile=' -- "$cur" ) ) + return 0 + ;; + esac + + $split && return 0 generic_options=(-version -v -V -d -silent -force -immed -dummy \ -dao -raw -raw96r -raw96p -raw16 -multi -msinfo -toc \ |