Re: Directory name completion using bash_completion in unstable (forwarded from Phil Edwards)
On Fri 12 Dec 2003 at 07:51:13 +0100, you wrote:
> User-Agent: Mutt/1.5.4i
> X-Virus-Scanned: by amavisd-new at cs.tu-berlin.de (including spamassassin)
> From: Phil Edwards <phil@jaj.com>
> To: debian-user@lists.debian.org
> Cc: Matthias Klose <doko@debian.org>
> Subject: Directory name completion using bash_completion in unstable
> Date: Wed, 10 Dec 2003 23:24:13 -0500
>
> [I'm not subscribed, cc's appreciated.]
>
> Executive summary: Debian is behaving slightly differently than stock
> bash and bash_completion, and I'd like to know why. (Because I like the
> Debian behavior better.)
>
>
> The question deals with directory completion when typing the path to an
> executable. As an example, say I want to run "./longdir/longsubdir/foo"
> and I use <Tab> because the names are long and complicated, or I'm just lazy.
> I will use '_' to represent the cursor position.
>
> Using stock upstream bash with stock upstream bash_completion, I can type
> "./longd<Tab>" and get
>
> $ ./longdir _
>
> So I type a backspace, a slash, then "longs<Tab>" and get
>
> $ ./longdir/longsubdir _
>
> Sigh. Backspace again, another slash, etc, etc.
>
>
> The only line in INPUTRC/.inputrc is "set mark-directories off" to not
> get the trailing slash. But a trailing space is still appended.
>
>
> Under Debian, the trailing space is not appended. Yay.
>
>
> I note that the "complete" builtin has a "-o nospace" option to specifically
> disable the extra space -- but this only works for programmed completion.
> There doesn't seem to be a readline (or other) option to turn it off
> while completing the initial command word. And there doesn't seem to
> be anything in sid's /etc/bash_completion that tries to set completion
> options for the general command word case.
>
> How is the Debian version doing this?
The Debian version probably applies the seven or eight official patches
to 2.05b. I seem to recall this was a problem with the stock 2.05b when
it was released.
Ian
--
Ian Macdonald | The algorithm for finding the longest path
System Administrator | in a graph is NP-complete. For you systems
ian@caliban.org | people, that means it's *real slow*. --
http://www.caliban.org | Bart Miller
|
Reply to: