mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
completions/ssh: history --max=n might be better than head -n
This commit is contained in:
parent
1173e8bda4
commit
f917211f3b
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ function __ssh_history_completions --argument-names limit
|
||||||
set limit 100
|
set limit 100
|
||||||
end
|
end
|
||||||
|
|
||||||
history --prefix ssh | string replace -rf '.* ([A-Za-z0-9._:-]+@[A-Za-z0-9._:-]+).*' '$1' | head -n $limit
|
history --prefix ssh --max=$limit | string replace -rf '.* ([A-Za-z0-9._:-]+@[A-Za-z0-9._:-]+).*' '$1'
|
||||||
end
|
end
|
||||||
|
|
||||||
complete -k -c ssh -a '(__ssh_history_completions 100)' -f -d Remote
|
complete -k -c ssh -a '(__ssh_history_completions 100)' -f -d Remote
|
||||||
|
|
Loading…
Reference in a new issue