From c58e759e41d364b645433e27e76f5086f44fbdb1 Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Fri, 17 Jan 2003 09:09:59 +0000 Subject: [PATCH] - improve handling of 'cvs export' (patch by Liviu Daia ) --- bash_completion | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/bash_completion b/bash_completion index 04949033..fc075b62 100644 --- a/bash_completion +++ b/bash_completion @@ -1,6 +1,6 @@ # bash_completion - some programmable completion functions for bash 2.05b # -# $Id: bash_completion,v 1.513 2003/01/17 10:01:29 ianmacd Exp $ +# $Id: bash_completion,v 1.514 2003/01/17 10:09:59 ianmacd Exp $ # # Copyright (C) Ian Macdonald # @@ -1034,7 +1034,10 @@ _cvs() @(commit|ci)) mode=commit ;; - @(annotate|diff|@(ex|im)port|history|release|status|update|edit|unedit)) + @(ex?(p?(ort)))) + mode=export + ;; + @(annotate|diff|history|import|release|status|update|?(un)edit)) mode=$i ;; ?(r)log) @@ -1124,6 +1127,16 @@ _cvs() $cur ) ) fi ;; + export) + if [[ "$cur" != -* ]]; then + [ -z "$cvsroot" ] && cvsroot=$CVSROOT + COMPREPLY=( $( cvs -d "$cvsroot" co -c | awk '{print $1}' ) ) + COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- $cur ) ) + else + COMPREPLY=( $( compgen -W '-N -f -l -R -n \ + -r -D -d -k' -- $cur ) ) + fi + ;; diff) if [[ "$cur" == -* ]]; then _longopt diff