2
0
Fork 0
mirror of https://github.com/fish-shell/fish-shell synced 2025-01-16 23:14:04 +00:00
fish-shell/share/functions/__ssh_history_completions.fish
NextAlone 45b6622986
completion/ssh-copy-id: add completion ()
Add completions for ssh-copy-id.

Refactored __ssh_history_completions into its own file for autoloading across completions.
2023-03-22 12:24:18 -05:00

3 lines
190 B
Fish

function __ssh_history_completions -d "Retrieve `user@host` entries from history"
history --prefix ssh --max=100 | string replace -rf '.* ([A-Za-z0-9._:-]+@[A-Za-z0-9._:-]+).*' '$1'
end