summaryrefslogtreecommitdiff
path: root/completions/cardctl
diff options
context:
space:
mode:
Diffstat (limited to 'completions/cardctl')
-rw-r--r--completions/cardctl17
1 files changed, 4 insertions, 13 deletions
diff --git a/completions/cardctl b/completions/cardctl
index 1af7491b..0532d6ef 100644
--- a/completions/cardctl
+++ b/completions/cardctl
@@ -1,24 +1,15 @@
-# Linux cardctl(8) completion
+# Linux cardctl(8) completion -*- shell-script -*-
-have cardctl || have pccardctl &&
_cardctl()
{
- local cur
+ local cur prev words cword
+ _init_completion || return
- COMPREPLY=()
- _get_comp_words_by_ref cur
-
- if [ $COMP_CWORD -eq 1 ]; then
+ if [ $cword -eq 1 ]; then
COMPREPLY=( $( compgen -W 'status config ident suspend \
resume reset eject insert scheme' -- "$cur" ) )
fi
} &&
complete -F _cardctl cardctl pccardctl
-# 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