From: Manlio Perillo Date: Sun, 03 Feb 2013 19:59:32 GMT Subject: Re: [PATCH] Handle path completion and colon for tcsh script Message-ID: <510EC1A4.4000207@gmail.com> In-Reply-To: <7vboc2bhpj.fsf@alter.siamese.dyndns.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 02/02/2013 21:10, Junio C Hamano ha scritto: > Marc Khouzam writes: > >> Recent enhancements to git-completion.bash provide >> intelligent path completion for git commands. Such >> completions do not add the '/' at the end of directories >> for recent versions of bash. >> ... >> Here is the update for tcsh completion which is needed to handle >> the cool new path completion feature just pushed to 'next'. >> > [...] > But I have to wonder if this is sweeping a problem under the rug. > Shouldn't the completion for bash users end completed directory name > with '/', even if we didn't have to worry about tcsh? > The problem is that when using the "new" `compopt -o filenames` command, Bash assumes COMPREPLY contains a list of filenames, and when it detects a directory name, it adds a slash. The problem is, if the directory name *already* has a slash, Bash adds another slash! I don't know if this can be considered a bug or a feature. Regards Manlio -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlEOwaQACgkQscQJ24LbaUSjwgCfbgb1id5DcNG0Q75FWwgNPCqb qkUAnAmMzCahB745/BWeDJTHbJFXucxs =vf+P -----END PGP SIGNATURE-----