in 16.04 there is no /usr/share/bash-completion/completions/scp and tab will work with scp and local paths

in 18.04 there is a /usr/share/bash-completion/completions/scp and tab will fail with scp and local paths when using quotes around just the remote path.

ssh $R 'echo test > ab.c'
ssh $R 'echo test > a\ b.c'
scp $R:ab.c ~/Downloads/
scp $R:a\\\ b.c ~/Downloads/
scp "$R:ab.c" ~/Downloads/
scp $R:"ab.c" ~/Dow[TAB_FAIL]
scp $R:"a\ b.c" ~/Dow[TAB_FAIL]
scp $R:'a\ b.c' ~/Dow[TAB_FAIL]

How can one keep the added features of the config and fix local path auto complete when just the remote is quoted?

Another command that fails;

aws ec2 allocate-address --domain vpc > ~/Dow[TAB_FAIL]
  • It works fine for me in both 16.04 and 18.04. What is the exact path of what you are trying to copy from? If the path is not correctly written out if it has spaces that are tagged with 3 \ like this\\\ has\\\ spaces.
    – Terrance
    Commented May 30, 2018 at 14:46
  • @Terrance thanks I was not aware of the triple escape option, but I would still like to get quotes working. (I updated the question) Commented May 30, 2018 at 15:21


You must log in to answer this question.

Browse other questions tagged .