I am using tcsh. I found that when I do
scp mytab, it doesn't autocomplete to
my-file.txt under the current directory
I have to prefix a
./ there to make it complete.
This seems to only happen with
scp. I tried other commands, it seems to work fine.
I find that
scp tab gives me
the value of of
$HOSTNAME (i.e. the current hostname)
So it looks like it's trying to match the hostname, don't know why..
added in response to comment:
~/temp/test>ls -al total 12 drwxr-xr-x 2 liw liw 4096 Jul 21 15:16 . drwxr-xr-x 9 liw liw 8192 Jul 21 15:15 .. -rw-r--r-- 1 liw liw 0 Jul 21 15:16 my_file.txt ~>more .cshrc.user set prompt="%n@%m %~%#" set path=($HOME/bin $path) if (-o $HOME/.aliases) source $HOME/.aliases set filec set autolist set autoexpand set addsuffix bindkey ^r i-search-back ~> complete scp 'c%*@*:%`set q=$:-0;set q="$q:s/@/ /";set q="$q:s/:/ /";set q=($q " ");ssh $q -l $q ls -dp $q\*`%' 'c%*:%`set q=$:-0;set q="$q:s/:/ /";set q=($q " ");ssh $q ls -dp $q\*`%' 'c%*@%$hosts%:' 'C@[./$~]*@f@' 'n/*/$hosts/:'