summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2010-12-23 22:05:55 +0200
committerVille Skyttä <ville.skytta@iki.fi>2010-12-23 22:05:55 +0200
commit15bc11769b87b253568b243697533d92a3eddd7d (patch)
tree22e3456cd721c112fc265d446f40c6284888f433
parent2d4ebbaf25d324ad03e9f231ab7fe9ec55b259a7 (diff)
downloadbash-completion-15bc11769b87b253568b243697533d92a3eddd7d.tar.gz
Improve scp path escape regex.
The previous one reportedly ended up escaping 't' to '\t' in some setups (at least bash 3.2.48 on OS X 10.6, but not with 4.1.7 on Fedora nor 3.2.25 on CentOS), probably due to missing backslash in the regex. This one removes some spurious escaping and duplicates in the char class, and should communicate the intent better.
-rw-r--r--completions/ssh4
1 files changed, 2 insertions, 2 deletions
diff --git a/completions/ssh b/completions/ssh
index 6793ddf0..cf966ae5 100644
--- a/completions/ssh
+++ b/completions/ssh
@@ -246,8 +246,8 @@ _sftp()
}
shopt -u hostcomplete && complete -F _sftp sftp
-# things we want to escape in remote scp paths
-_scp_path_esc="[][(){}<>\",:;^&\!$=?\`|\\ \t']"
+# things we want to backslash escape in scp paths
+_scp_path_esc='[][(){}<>",:;^&!$=?`|\\'"'"'[:space:]]'
# Complete remote files with ssh. If the first arg is -d, complete on dirs
# only. Returns paths escaped with three backslashes.