mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00: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
1 changed files with 308 additions and 464 deletions
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue