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.
This commit is contained in:
parent
2d4ebbaf25
commit
15bc11769b
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user