diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2011-03-12 12:04:02 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-03-12 12:04:02 +0200 |
commit | a6354b810727b71b4e541e94ef0447433c70bf9d (patch) | |
tree | 5b9fdf359d6f40bb498595252fdfd347e8b13da0 | |
parent | c60896e0e1cb63a73cfe7805ba40268faa975413 (diff) | |
download | bash-completion-a6354b810727b71b4e541e94ef0447433c70bf9d.tar.gz |
Add reptyr completion.
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | completions/Makefile.am | 1 | ||||
-rw-r--r-- | completions/reptyr | 32 | ||||
-rw-r--r-- | test/completion/reptyr.exp | 1 | ||||
-rw-r--r-- | test/lib/completions/reptyr.exp | 22 |
5 files changed, 57 insertions, 0 deletions
@@ -1,6 +1,7 @@ bash-completion (2.x) [ Ville Skyttä ] + * Add reptyr completion. * Improve aspell, gendiff, and smartctl completions. * Try harder to find the correct perl executable to run the perl helper with. * Drop rpm query support for rpm < 4.1. diff --git a/completions/Makefile.am b/completions/Makefile.am index e7e86d84..1a92e1d8 100644 --- a/completions/Makefile.am +++ b/completions/Makefile.am @@ -127,6 +127,7 @@ bashcomp_DATA = abook \ quota-tools \ rcs \ rdesktop \ + reptyr \ reportbug \ resolvconf \ rfkill \ diff --git a/completions/reptyr b/completions/reptyr new file mode 100644 index 00000000..071fdddc --- /dev/null +++ b/completions/reptyr @@ -0,0 +1,32 @@ +# bash completion for reptyr(1) + +have reptyr && +_reptyr() +{ + local cur prev + + COMPREPLY=() + _get_comp_words_by_ref cur prev + + case $prev in + -l) + return 0 + ;; + esac + + if [[ $cur == -* ]]; then + COMPREPLY=( $( compgen -W '-l -s' -- "$cur" ) ) + return 0 + fi + + [[ $prev != +([0-9]) ]] && _pids +} && +complete -F _reptyr reptyr + +# Local variables: +# mode: shell-script +# sh-basic-offset: 4 +# sh-indent-comment: t +# indent-tabs-mode: nil +# End: +# ex: ts=4 sw=4 et filetype=sh diff --git a/test/completion/reptyr.exp b/test/completion/reptyr.exp new file mode 100644 index 00000000..62ab427d --- /dev/null +++ b/test/completion/reptyr.exp @@ -0,0 +1 @@ +assert_source_completions reptyr diff --git a/test/lib/completions/reptyr.exp b/test/lib/completions/reptyr.exp new file mode 100644 index 00000000..35ccb91c --- /dev/null +++ b/test/lib/completions/reptyr.exp @@ -0,0 +1,22 @@ +proc setup {} { + save_env +} + + +proc teardown {} { + assert_env_unmodified +} + + +setup + + +assert_complete_any "reptyr -" +sync_after_int + + +assert_complete_any "reptyr " +sync_after_int + + +teardown |