Too late: The machine, OS and configuration in question is no longer in use, so I can't verify any more suggestions. I have not encountered this problem in Fedora or Arch Linux. If you are having this problem, please post another question with the details of your configuration.
Whenever I want to copy a file from my home directory, I run into this issue: scp
won't autocomplete paths preceded by ~
(tilde). This is very simple to verify by typing scp ~/
and pressing Tab twice - No file completions are shown. Even if I specify a unique path prefix such as scp ~/.bash_hist
it won't complete. Is this by design, configurable, or a bug?
To clarify, all other parts of the completion work: host names and paths on remote hosts both complete just fine. Completions of paths with tilde also work with other commands, such as ls
.
Could there be some restriction on completing a non-standard ~
? Mine points to /home/users/username
and is an NFS 3 mount to another host (/home/username
is used for speed-critical things like the browser profile). I have not changed $HOME
(/home/users/username
) or some other craziness.
On Fedora 19 it works - Tab completing scp ~/foo
results in it replacing the ~
with /home/username
and subsequently completing normally.
Please note: This question is neither about autocompleting as root nor autocompleting remotely. Bash completion is installed an working fine.
Running openssh-client 1:5.9p1-5ubuntu1 and GNU bash version 4.2.24(1)-release (x86_64-pc-linux-gnu)
scp ~/
followed by two tabs expands~/
by$HOME
and show me all valid candidates for autocompletion. I usebash
version 4.1.5. Probably you have a custom completion enabled forscp
so~
isn't examined by your shell anylonger.