mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-30 06:03:49 +08:00
9c327b19a6
New fish_indent does that too, so this will make any future reformatting diffs smaller. Done using either of: perl -pi -e 'undef $/; s/\n*$/\n/' share/**.fish kak -n -f '<a-/>\n*<ret>d' share/**.fish
28 lines
1.9 KiB
Fish
28 lines
1.9 KiB
Fish
# tig - text-mode interface for Git
|
|
|
|
not functions -q __fish_git && source $__fish_data_dir/completions/git.fish
|
|
|
|
set -l subcommands log show reflog blame grep refs statsh status
|
|
complete -c tig -n "not contains -- -- (commandline -opc) && not __fish_seen_subcommand_from $subcommands" -xa 'show\t"Open diff view using the given git-show(1) options"
|
|
blame\t"Annotate the given file, takes git-blame(1) options"
|
|
status\t"Start up in status view"
|
|
log\t"Start up in log view view, displaying git-log(1) output"
|
|
reflog\t"Start up in reflog view"
|
|
refs\t"Start up in refs view"
|
|
stash\t"Start up in stash view"
|
|
grep\t"Open the grep view. Supports the same options as git-grep(1)"
|
|
'
|
|
complete -c tig -n 'not contains -- -- (commandline -opc)' -l stdin -d 'Read git commit IDs from stdin'
|
|
complete -c tig -n 'not contains -- -- (commandline -opc)' -l pretty=raw -d 'Read git log output from stdin'
|
|
complete -c tig -n 'not contains -- -- (commandline -opc)' -o C. -d 'Run as if Tig was started in .'
|
|
complete -c tig -n 'not contains -- -- (commandline -opc)' -s v -l version -d 'Show version and exit'
|
|
complete -c tig -n 'not contains -- -- (commandline -opc)' -s h -l help -d 'Show help message and exit'
|
|
|
|
complete -c tig -n 'not contains -- -- (commandline -opc) && __fish_seen_subcommand_from show' -xa '(set -l t (commandline -ct); complete -C"git show $t")'
|
|
complete -c tig -n 'not contains -- -- (commandline -opc) && __fish_seen_subcommand_from blame' -xa '(set -l t (commandline -ct); complete -C"git blame $t")'
|
|
complete -c tig -n 'not contains -- -- (commandline -opc) && __fish_seen_subcommand_from log' -xa '(set -l t (commandline -ct); complete -C"git log $t")'
|
|
complete -c tig -n 'not contains -- -- (commandline -opc) && __fish_seen_subcommand_from grep' -xa '(set -l t (commandline -ct); complete -C"git grep $t")'
|
|
|
|
complete -c tig -f -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_ranges)'
|
|
complete -c tig -n 'contains -- -- (commandline -opc)' -F
|