Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

completion fails if dir referenced via variable.




When I open an xterm it automatically assigns its current directory to a variable, eg. the current directory in 'pts/1' will always be '$t1'. I use this shorthand for moving stuff. Say I'm in xterm 'pts/2' and I want to copy something from the current dir in 'pts/1', I just " cp $t1/filename .' " Works fine. However completion does not work. Using that last example, if I type " cp $t1/filen [tab] " what happens is that " $t1 " expands just fine followed by " filen ". On the line below it says: " Completing all expansions ", but nothing happens. If I press [tab] again the expansion of " $t1 " collapses and on the next line it says: " Completing original " from then on [tab] alternates between those two states. Can I overcome this? It seems strange since the variable expands just fine, so completion 'knows' what it's looking for as if I typed the full path by hand (and if I do, type it by hand, completion works fine, of course). I'm betting there's a setopt for this.



Messages sorted by: Reverse Date, Date, Thread, Author