From 2214a82ac21de157638bba7cd31bb422f9792602 Mon Sep 17 00:00:00 2001 From: codehelp Date: Sat, 1 May 2010 07:44:31 +0000 Subject: [PATCH] tweak bash completion git-svn-id: http://emdebian.org/svn/current@7157 563faec7-e20c-0410-992a-a66f704d0ccd --- bash/multistrap | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bash/multistrap b/bash/multistrap index fd95251..89d74c1 100644 --- a/bash/multistrap +++ b/bash/multistrap @@ -22,23 +22,23 @@ _get_dpkg_cross_list() | cut -d':' -f2 | sed -e 's/None, //' | sed -e 's/,//g' } -_em_multistrap() +_multistrap() { - local cur prev opts cmds help machine arch quiet + local cur prev opts cmds help dir arch quiet COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" help="-h -? --help --version " arch="-a --arch " opts="-f --file" - machine="" + dir="-d --directory" case "$prev" in -@(a|-arch)) COMPREPLY=( $( _get_dpkg_cross_list $cur ) ) ;; *) - COMPREPLY=( $(compgen -W "${arch}${help}${opts}${machine}${cmds}" -- ${cur}) ) + COMPREPLY=( $(compgen -W "${arch}${help}${opts}${dir}${cmds}" -- ${cur}) ) ;; esac } -complete -F _em_multistrap -o default em_multistrap +complete -F _multistrap -o default multistrap