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


Groups > gnu.bash.bug > #16608

Re: Error expanding variable containing a directory name

From Eli Schwartz <eschwartz@archlinux.org>
Newsgroups gnu.bash.bug
Subject Re: Error expanding variable containing a directory name
Date 2020-07-23 13:41 -0400
Message-ID <mailman.418.1595526083.24492.bug-bash@gnu.org> (permalink)
References <738aff45-aa58-4cfc-2967-92ec87f2661b@posteo.de> <395a4cd2-7b79-3882-e8d0-1b525d2b7601@archlinux.org>

Show all headers | View raw


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

On 7/23/20 12:08 PM, Lutz Adam wrote:
> Description:
>        The content of $ML is "/media/lad".  There's a directory
> /media/lad/p24. Typing the command
>             ls $ML/p24<TAB-key>
>        a backslash is put befor "$" and the line looks like:
>             ls \$ML/p24/
>        Typing the ENTER key shows:
>             ls: cannot access '$ML/p24/': No such file or directory.
> 
> Repeat-By:
>         Create a variable containing a directory name. Put a
> subdirectory there under.
>         Type a "$" and the variable followed by a slash, the name of the
> subdirectora and the TAB-key.
> 
> 
> The OS is Linux Mint 20

The built-in bash tab completion actually does this okay. Are you using
the bash-completion project addon functionality?

[eschwartz@arch ~]$ ls $HOME/<TAB>
 --> rewrites in-place to...
[eschwartz@arch ~]$ ls \$HOME/
[eschwartz@arch ~]$ bash --norc --noprofile
bash-5.0$ ls $HOME/<TAB>
Display all 163 possibilities? (y or n)
[...]


-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Error expanding variable containing a directory name Eli Schwartz <eschwartz@archlinux.org> - 2020-07-23 13:41 -0400

csiph-web