mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 13:18:59 +08:00
git.fish: collapse repeat complete cmds, set -f, rm unneeded funcs
Get rid of functions: __fish_git_diff_opt, __fish__git_append_letters_nosep, __fish_git_sort_keys Use `set -f` inside blocks instead of `set -l foo` before blocks. Two of these just printed out the argument\tdescription dictionaries without providing any utility: only used once, just do it inline. Collapse adjacent lines that look like complete git -n '(blah)' -l option -d 'option help' complete git -n '(blah)' -l option -a 'arg1' -d 'description 1' complete git -n '(blah)' -l option -a 'arg2' -d 'description 2' complete git -n '(blah)' -l option -a 'arg2' -d 'description 3' ... into complete git -n '(blah)' -l option -d 'option help' -a " arg1\t'description 1' arg2\t'description 2' arg3\t'description 3' ..." This sped up the source time about 10% by running complete less.
This commit is contained in:
parent
b7593a377a
commit
f5711ad5ed