Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #223544

Re: bash-completion pros/cons

From The Wanderer <wanderer@fastmail.fm>
Newsgroups linux.debian.user
Subject Re: bash-completion pros/cons
Date 2020-06-16 15:20 +0200
Message-ID <AijFo-4TA-9@gated-at.bofh.it> (permalink)
References (5 earlier) <Aifs5-2f1-1@gated-at.bofh.it> <AihtU-3pR-7@gated-at.bofh.it> <AihWW-3PB-13@gated-at.bofh.it> <AiipY-3Zq-13@gated-at.bofh.it> <Aijm1-4xL-1@gated-at.bofh.it>
Organization This space intentionally left blank.

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 2020-06-16 at 08:57, tomas@tuxteam.de wrote:

> On Tue, Jun 16, 2020 at 01:53:59PM +0200, l0f4r0@tuta.io wrote:
> 
> [...]
> 
>> Maybe sometimes completion is not working as it should, nothing is
>> perfect, but globally I think that it saves time more than its
>> wastes.
> 
> Then just use it and be happy. And just accept that some (me, among
> others) are happier without :-)
> 
> Yes, I've tried it. Yes, I think it's technically nifty. But no, it
> doesn't mesh well with the way I work. Even if it were bug-free, it
> wouldn't be "my" thing.
> 
> I live by the command line, and there are roughly two classes of
> things I do: those I do very often, where history search is just
> unbeatable, and those I do rarely. For those I have a man page open,
> sometimes a notebook (in Emacs, but I disgress) to take notes and I
> proceed slowly.
> 
> The top of the first class are candidates for automation and 
> scripting.
> 
> In the first class, I don't need autocompletion, since I know what
> I'm doing (heck, my muscle memory nearly knows. In the second class,
> autocompletion is a train wreck waiting to happen: I really *want* to
> know why each piece is there.
> 
> The only really useful autocompletion is actually file path 
> autocompletion, and I have that without any extra packages.

I tend to concur with all of the above, but I have some additional
details to note.

There *are* contexts where I would find the ability to tab-complete
things other than paths to be useful; lengthy package names for apt-get
would be one example. For me, however, the cost in memory/CPU/etc.
footprint that has already been noted is enough to outweigh the benefit
that that would bring.


The biggest reason why I intentionally disable programmable completion,
however, is actually centered on the way it *changes* file-and-directory
path completion.

Without programmable completion, if I type the first few characters of a
directory name and press Tab, it will complete up to the name of that
directory (or to the point of uniqueness, if there are multiple files /
directories in the current context starting with that prefix) and then
stop.

With programmable completion, IIRC from the last time I checked (which
I'll admit was quite some years ago), in at least some contexts it will
instead complete all the way up to the end of the path. I specifically
recall a case when I had a directory /tmp/foo/bar/baz, and I wanted to
create /tmp/foo/bar/quux; I typed 'mkdir /tmp/f[tab]', with the
intention of typing 'b[tab]quux', and found that it had completed to the
end of 'baz' (and possibly to an actual filename within that directory)
and I had to backspace by some considerable amount to get to where I'd
wanted to be.

Cases where there is a multi-layer directory tree with only one item at
each level of the tree are comparatively rare, but ISTR that even when
there were multiple items at deeper levels it would still complete up to
the point of uniqueness, ignoring directory boundaries.

The additional keystrokes to tab-complete to the end of such a "only one
item in the parent directory" tree are, for me, more than worth it for
the additional level of control involved.


If I could selectively enable programmable completion for only specific
contexts where I've tried it out and decided that I want it, I'd
probably be happy to use it in at least some contexts. I haven't found a
good way of doing that, however, and haven't found it worth the bother
to dig all that deeply looking for one.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Back to linux.debian.user | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Need commands ROHIT SONI <rs499647@gmail.com> - 2020-06-13 07:10 +0200
  Re: Need commands deloptes <deloptes@gmail.com> - 2020-06-13 08:20 +0200
  Re: Need commands Richard Owlett <rowlett@cloud85.net> - 2020-06-13 12:50 +0200
  Re: Need commands Teemu Likonen <tlikonen@iki.fi> - 2020-06-13 13:20 +0200
    Re: Need commands Mike McClain <mike.junk.46@att.net> - 2020-06-14 06:10 +0200
      Re: Need commands David Wright <deblis@lionunicorn.co.uk> - 2020-06-14 17:20 +0200
  Re: Need commands mick crane <mick.crane@gmail.com> - 2020-06-14 13:30 +0200
    Re: Need commands <tomas@tuxteam.de> - 2020-06-14 13:50 +0200
      Re: Need commands mick crane <mick.crane@gmail.com> - 2020-06-14 14:20 +0200
      Re: Need commands mick crane <mick.crane@gmail.com> - 2020-06-14 14:40 +0200
        Re: Need commands <tomas@tuxteam.de> - 2020-06-14 15:50 +0200
          Re: Need commands Greg Wooledge <wooledg@eeg.ccf.org> - 2020-06-15 14:10 +0200
            Re: Need commands <tomas@tuxteam.de> - 2020-06-15 14:10 +0200
        Re: Need commands davidson <davidson@freevolt.org> - 2020-06-16 10:50 +0200
          bash-completion pros/cons (was: Re: Need commands) l0f4r0@tuta.io - 2020-06-16 13:00 +0200
            Re: bash-completion pros/cons (was: Re: Need commands) Greg Wooledge <wooledg@eeg.ccf.org> - 2020-06-16 13:30 +0200
              Re: bash-completion pros/cons (was: Re: Need commands) l0f4r0@tuta.io - 2020-06-16 14:00 +0200
                Re: bash-completion pros/cons (was: Re: Need commands) <tomas@tuxteam.de> - 2020-06-16 15:00 +0200
                Re: bash-completion pros/cons The Wanderer <wanderer@fastmail.fm> - 2020-06-16 15:20 +0200
                Re: bash-completion pros/cons David Wright <deblis@lionunicorn.co.uk> - 2020-06-16 21:50 +0200
                Re: bash-completion pros/cons Anders Andersson <pipatron@gmail.com> - 2020-06-17 10:10 +0200
                Re: bash-completion pros/cons David Wright <deblis@lionunicorn.co.uk> - 2020-06-18 21:20 +0200
                Re: bash-completion pros/cons David Wright <deblis@lionunicorn.co.uk> - 2020-06-18 22:20 +0200
                Re: bash-completion pros/cons David Wright <deblis@lionunicorn.co.uk> - 2020-06-19 04:20 +0200
                Re: bash-completion pros/cons <tomas@tuxteam.de> - 2020-06-17 10:40 +0200
                Disabling recommends - was [Re: bash-completion pros/cons] Richard Owlett <rowlett@cloud85.net> - 2020-06-17 12:00 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] <tomas@tuxteam.de> - 2020-06-17 13:20 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Richard Owlett <rowlett@cloud85.net> - 2020-06-17 13:40 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] <tomas@tuxteam.de> - 2020-06-17 13:40 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Richard Owlett <rowlett@cloud85.net> - 2020-06-17 14:00 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] <tomas@tuxteam.de> - 2020-06-17 14:30 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Richard Owlett <rowlett@cloud85.net> - 2020-06-17 14:40 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Brian <ad44@cityscape.co.uk> - 2020-06-17 19:20 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] David Wright <deblis@lionunicorn.co.uk> - 2020-06-17 21:20 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Brian <ad44@cityscape.co.uk> - 2020-06-17 21:50 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] David Wright <deblis@lionunicorn.co.uk> - 2020-06-18 21:20 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Brian <ad44@cityscape.co.uk> - 2020-06-19 17:30 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Marco Möller <talby@debianlists.mobilxpress.net> - 2020-06-19 23:40 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Tom Dial <tddial@comcast.net> - 2020-06-19 23:40 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Brian <ad44@cityscape.co.uk> - 2020-06-20 01:20 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Andrei POPESCU <andreimpopescu@gmail.com> - 2020-06-20 17:00 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Brian <ad44@cityscape.co.uk> - 2020-06-20 19:40 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Andrei POPESCU <andreimpopescu@gmail.com> - 2020-06-20 21:20 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Tom Dial <tddial@comcast.net> - 2020-06-21 01:10 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Brian <ad44@cityscape.co.uk> - 2020-06-21 14:40 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Andrei POPESCU <andreimpopescu@gmail.com> - 2020-06-19 05:20 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Brian <ad44@cityscape.co.uk> - 2020-06-19 17:00 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Andrei POPESCU <andreimpopescu@gmail.com> - 2020-06-19 05:30 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Richard Owlett <rowlett@cloud85.net> - 2020-06-19 13:30 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] David Wright <deblis@lionunicorn.co.uk> - 2020-06-19 16:40 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Andy Smith <andy@strugglers.net> - 2020-06-19 19:20 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Andrei POPESCU <andreimpopescu@gmail.com> - 2020-06-20 17:10 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Brian <ad44@cityscape.co.uk> - 2020-06-19 19:50 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Brian <ad44@cityscape.co.uk> - 2020-06-18 02:00 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] <tomas@tuxteam.de> - 2020-06-18 10:20 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Richard Owlett <rowlett@cloud85.net> - 2020-06-18 13:50 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] <tomas@tuxteam.de> - 2020-06-18 14:50 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] Brian <ad44@cityscape.co.uk> - 2020-06-18 21:00 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] <tomas@tuxteam.de> - 2020-06-18 21:10 +0200
                Re: Disabling recommends - was [Re: bash-completion pros/cons] David Wright <deblis@lionunicorn.co.uk> - 2020-06-18 21:20 +0200
                Re: bash-completion pros/cons (was: Re: Need commands) davidson <davidson@freevolt.org> - 2020-06-18 09:30 +0200
                Re: bash-completion pros/cons (was: Re: Need commands) <tomas@tuxteam.de> - 2020-06-18 10:20 +0200
            Re: bash-completion pros/cons (was: Re: Need commands) davidson <davidson@freevolt.org> - 2020-06-18 09:10 +0200
              Re: bash-completion pros/cons (was: Re: Need commands) l0f4r0@tuta.io - 2020-06-18 20:40 +0200
          Re: Need commands mick crane <mick.crane@gmail.com> - 2020-06-16 13:20 +0200

csiph-web