fork/puffer-fish

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

nickeb96Refactor and rename expand functions0d40526

development-docs
564 B15 linesraw
1function _puffer_fish_expand_star
2    if commandline --search-field >/dev/null
3        commandline --search-field --insert '*'
4    else if string match --quiet -- '!' "$(commandline --current-token)"
5        set -l prev_cmd $history[1]
6        set -l prev_args (string split ' ' $prev_cmd)
7        set -e prev_args[1]  # remove command name
8        set -l arg_str (string join ' ' $prev_args)
9        # replace !* with all arguments
10        commandline --current-token ''
11        commandline --insert $arg_str
12    else
13        commandline --insert '*'
14    end
15end