i have an environment variable called tmp that has an absolute path to a directory in it (it's a temporary directory for me to throw things into whenever i please, for other machines on the network to see)
-
i have an environment variable called
tmp
that has an absolute path to a directory in it (it's a temporary directory for me to throw things into whenever i please, for other machines on the network to see)inside the directory that it points at are a bunch of files, i'll choose
tsduck-output.pcap
completely arbitrarily for this example. i can do something likels $tmp/tsduck-output.pcap
and that works completely finei want tab completion to work with this environment variable, and it kind of does, but not quite
if i type in
ls $tmp/ts
and hit tab, the line completes tols \$tmp/tsduck-output.pcap
. so, bash does see that i'm accessing a path under that directory, and it does know to look under that directory to find what names to tab complete to. but also, for some reason, it thinks i want the literal dollar sign at the beginning, so it inserts the backslash and stops the path from workingis there some configuration thing i can do so it doesn't put the backslash before
$tmp
? -
@monorail what shell are you using?
-
@steffo bash
-
hmm, i'm not super familiar with bash
i tried to reproduce the behavior with
$HOME
but i didn't get a backslash added, so i couldn't test it myselfbut maybe the
direxpand
shopt is what you're looking for? -
@monorail ...do you have a directory named
$tmp
in your home?