fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes AltmanningerFix stale name of --tokens-expand option33a9659cd

master
433 B12 linesraw
1function __history_completions --argument-names limit
2    if string match -q "" -- "$limit"
3        set limit 25
4    end
5
6    set -l tokens (commandline --current-process --tokens-expanded)
7    history --prefix (commandline) | string replace -r \^$tokens[1]\\s\* "" | head -n$limit
8end
9
10# erase the stock autojump completions, which are no longer needed with this
11complete -c j -e
12complete -k -c j -a '(__history_completions 25)' -f