From cc9bfa1465f539c56efacc353e6745d667d79180 Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Tue, 26 Feb 2002 20:48:32 +0000 Subject: [PATCH] add cardctl completion --- bash_completion | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/bash_completion b/bash_completion index 5dfcebfc..975c9434 100644 --- a/bash_completion +++ b/bash_completion @@ -1,6 +1,6 @@ # bash_completion - some programmable completion functions for bash 2.05a # -# $Id: bash_completion,v 1.145 2002/02/25 06:50:23 ianmacd Exp $ +# $Id: bash_completion,v 1.146 2002/02/26 21:48:32 ianmacd Exp $ # # Copyright (C) Ian Macdonald # @@ -527,7 +527,7 @@ _ifconfig() ;; esac - COMPREPLY=( $( ifconfig -a | sed -ne 's/^\('$cur'[^ ]*\).*$/\1/p' )) + COMPREPLY=( $( /sbin/ifconfig -a | sed -ne 's/^\('$cur'[^ ]*\).*$/\1/p' )) } [ $OS = Linux ] && complete -F _ifconfig ifconfig @@ -1839,6 +1839,24 @@ _gcc() [ "$have" ] && complete -o filenames -F _gcc gcc g++ c++ g77 gcj gpc [ $OS = Linux ] && complete -o filenames -F _gcc cc +# Linux cardctl(8) completion +# +have cardctl && +_cardctl () +{ + local cur + COMPREPLY=() + + cur=${COMP_WORDS[COMP_CWORD]} + + if [ $COMP_CWORD -eq 1 ]; then + COMPREPLY=( $( compgen -W 'status config ident suspend \ + resume reset eject insert scheme' \ + $cur ) ) + fi +} +[ "$have" ] && complete -F _cardctl cardctl + # bash alias completion # _alias()