Unwanted blank after command line <tab> expansion

Robert Heller heller at deepsoft.com
Sun Sep 4 12:34:08 UTC 2022


At Sat, 3 Sep 2022 22:26:27 -0700 "Ubuntu user technical support,? not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:

> 
> I believe this is new behavior in Xubuntu 22.04.1 since either 21.10
> or 22.04.0, but I'm willing to be wrong.

This not anything new.  <tab> has always done this, since before there was 
even Linux.  It only adds the space if/when it only has one completion.  If 
there are multiple completions, then the completion stops just at the point of 
ambiguity.

> 
> I notice that when I type in a command with part of a variable
> expansion set up to be expanded and add <tab>, the full name of the
> variable is completed (after the leading $) with a blank space
> appended on the line before I type anything else.
> 
> When the variable is a stand-alone entity that is not a directory name
> this isn't too annoying.
> 
> However, when the variable contains the name of a directory, that
> space forces me to backspace in order to put a / after the directory
> variable name to use it as such.
> 
> I'm fairly sure that, at least as of 21.10, the normal expansion
> appended the slash by default if the variable contains a directory
> name. It might not have appended the slash or any other character -
> don't recall anymore.
> 
> Is there a bash option to control this, or something I can set to
> force it NOT to append a space?

Probably.  *I* don't use bash -- I use tcsh, which is a little different.

> 
> I tried Googling this and looking through the (massive) bash man page
> and couldn't identify anything that looked appropriate.
> 
> Thanks.
> 
> Mark
> 

-- 
Robert Heller             -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller at deepsoft.com       -- Webhosting Services
                                                                  




More information about the ubuntu-users mailing list