mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 05:43:11 +00:00
completions/scp: inhibit ls redefinitions
scp completions use "ls" to list files on the remote host. If a user aliases them (in noninteractive shells) this will break. In general, this is the users fault but also kind of ours because we shouldn't really use "ls" here. Let's work around this problem by skipping functions. Fixes #9363
This commit is contained in:
parent
f130e36c7e
commit
b98cee10bb
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ complete -c scp -d "Local Path" -n "not string match @ -- (commandline -ct)"
|
|||
# Get the list of remote files from the scp target.
|
||||
complete -c scp -d "Remote Path" -f -n "commandline -ct | string match -e ':'" -a "
|
||||
(__scp_remote_target):( \
|
||||
command ssh (__scp2ssh_port_number) -o 'BatchMode yes' (__scp_remote_target) ls\ -dp\ (__scp_remote_path_prefix | string unescape)\* 2>/dev/null |
|
||||
command ssh (__scp2ssh_port_number) -o 'BatchMode yes' (__scp_remote_target) command\ ls\ -dp\ (__scp_remote_path_prefix | string unescape)\* 2>/dev/null |
|
||||
string escape -n
|
||||
)
|
||||
"
|
||||
|
|
Loading…
Reference in a new issue