[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tab completion bug
From: |
Bruce Korb |
Subject: |
tab completion bug |
Date: |
Sat, 04 Feb 2012 10:25:29 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0 |
Hi,
In my home directory, I typed,
emacs $PWD/ag/git-ag/autoopts/tpl/ag
and pressed <tab>. The command line was rewritten thus:
emacs \$PWD/ag/git-ag/autoopts/tpl/agtexi-cmd.tpl
That seemed to be what I wanted, but when emacs came up, the file was:
~/ag/git-ag/$$PWD/ag/git-ag/autoopts/tpl/ag/agtexi-cmd.tpl
which isn't exactly what I wanted. In fact, it appears to be
a mishmash of knowing the expansion of $PWD for the purposes of finding
a file, and quoting the environment variable so that it is assured
to be mutilated by the time the program sees it.
a) Why is this, and
b) what can I do about it?
Thank you. Regards, Bruce
P.S. I needed the $PWD because this command was wrapped inside another
command the purpose of which is not relevant here, but it did kick off
emacs in ~/ag/git-ag. The point is, either $PWD can be used in tab
completion for finding files, or it cannot. If it is used, then you
cannot quote it. If it isn't, then quote it, okay, but don't do file
name completion. Do one or the other, not a mishmash.
Meanwhile, I like the old behavior of expanding $PWD and replacing
it on the command line. Current version:
$ echo $BASH_VERSION
4.2.10(1)-release
last revision was whatever openSuSE 11.4 was using.
- tab completion bug,
Bruce Korb <=