mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
10 lines
313 B
Fish
10 lines
313 B
Fish
function __history_completions --argument limit
|
|
if echo $limit | string match -q ""
|
|
set limit 25
|
|
end
|
|
|
|
set -l tokens (commandline --current-process --tokenize)
|
|
history --prefix (commandline) | string replace -r \^$tokens[1]\\s\* "" | head -n$limit
|
|
end
|
|
|
|
complete -k -c j -a '(__history_completions 25)' -f
|