[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] bash_completion: propose file names for few commands

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: 2007-06-03 04:08:12 CEST

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ping...
This patch has been out there for a while, but hasn't had any comments.
 If there are none in the next few days, I'll open an issue.

- -Hyrum

Krzysiek Pawlik wrote:
> Hi,
>
> attached patch adds completion of file names for certain commands (revert, add,
> log and remove), for example for revert it suggestes modified or missing files,
> for add - unknown files, etc. Current version suggests all file names for those
> commands.
>
>
>
> ------------------------------------------------------------------------
>
> Index: tools/client-side/bash_completion
> ===================================================================
> --- tools/client-side/bash_completion (revision 23971)
> +++ tools/client-side/bash_completion (working copy)
> @@ -426,6 +426,24 @@
> # if not typing an option,
> # then fallback on ordinary filename expansion
> if [[ $cur != -* || $stat = 'onlyarg' ]] ; then
> + case $cmd in
> + revert)
> + local FILESrevert="$(svn status --non-interactive | grep '^[M!]' | awk '{print $2}')"
> + COMPREPLY=( $( compgen -W "$FILESrevert" -- $cur ) )
> + ;;
> + add)
> + local FILESadd="$(svn status --non-interactive | grep '^?' | awk '{print $2}')"
> + COMPREPLY=( $( compgen -W "$FILESadd" -- $cur ) )
> + ;;
> + log)
> + local FILESlog="$(svn status --non-interactive --verbose --non-recursive | awk '{print $4}')"
> + COMPREPLY=( $( compgen -W "$FILESlog" -- $cur ) )
> + ;;
> + remove|rm|delete|del)
> + local FILESremove="$(svn status --non-interactive --verbose --non-recursive | sed -e 's,^.,,' | awk '{print $4}' | grep -v '^\.$')"
> + COMPREPLY=( $( compgen -W "$FILESremove" -- $cur ) )
> + ;;
> + esac
> return 0
> fi
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGYiKMCwOubk4kUXwRAm/WAJ9o7iVmCAWelzE1vZvFzmWtVxjEKgCg9D/g
n1KGOuq52APvwO9D4Mi5bfk=
=qFx2
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jun 3 04:05:54 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.