git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Handle path completion and colon for tcsh script

From
Manlio Perillo <manlio.perillo@gmail.com>
Date
Feb 3, 2013, 19:59 UTC
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:
Show 15 quoted lines
> Marc Khouzam <marc.khouzam@ericsson.com> 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-----

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 6 in “Handle path completion and colon for tcsh script”
  1. Handle path completion and colon for tcsh scriptMarc Khouzam, Feb 2, 2013
  2. Junio C HamanoFeb 2, 2013
  3. Manlio PerilloFeb 3, 2013
  4. Junio C HamanoFeb 3, 2013
  5. Marc KhouzamFeb 4, 2013
  6. Junio C HamanoFeb 4, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.