fork/fish-shell

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

phaniumAdd --color option for some builtinsc23a4cbd9

master
3.1 KiB41 linesraw
1# Note that when a completion file is sourced a new block scope is created so `set -l` works.
2set -l __fish_history_all_commands search delete save merge clear clear-session append
3
4complete -c history -s h -l help -d "Display help and exit"
5
6# Note that these options are only valid with the "search" and "delete" subcommands.
7complete -c history -n '__fish_seen_subcommand_from search delete; or not __fish_seen_subcommand_from $__fish_history_all_commands' \
8    -s p -l prefix -d "Match items beginning with the string"
9complete -c history -n '__fish_seen_subcommand_from search delete; or not __fish_seen_subcommand_from $__fish_history_all_commands' \
10    -s c -l contains -d "Match items containing the string"
11complete -c history -n '__fish_seen_subcommand_from search delete; or not __fish_seen_subcommand_from $__fish_history_all_commands' \
12    -s e -l exact -d "Match items identical to the string"
13complete -c history -n '__fish_seen_subcommand_from search delete; or not __fish_seen_subcommand_from $__fish_history_all_commands' \
14    -s t -l show-time -d "Output with timestamps"
15complete -c history -n '__fish_seen_subcommand_from search delete; or not __fish_seen_subcommand_from $__fish_history_all_commands' \
16    -s C -l case-sensitive -d "Match items in a case-sensitive manner"
17
18# Note that these options are only valid with the "search" subcommand.
19complete -c history -n '__fish_seen_subcommand_from search; or not __fish_seen_subcommand_from $__fish_history_all_commands' \
20    -s n -l max -d "Limit output to the first 'n' matches" -x
21complete -c history -n '__fish_seen_subcommand_from search; or not __fish_seen_subcommand_from $__fish_history_all_commands' \
22    -s z -l null -d "Terminate entries with NUL character"
23complete -c history -n '__fish_seen_subcommand_from search; or not __fish_seen_subcommand_from $__fish_history_all_commands' \
24    -s R -l reverse -d "Output the oldest results first" -x
25complete -c history -n '__fish_seen_subcommand_from search; or not __fish_seen_subcommand_from $__fish_history_all_commands' \
26    -l color -d "When to colorize output" -xa "always never auto"
27
28# We don't include a completion for the "save" subcommand because it should not be used
29# interactively.
30complete -f -c history -n "not __fish_seen_subcommand_from $__fish_history_all_commands" \
31    -a search -d "Prints commands from history matching the strings"
32complete -f -c history -n "not __fish_seen_subcommand_from $__fish_history_all_commands" \
33    -a delete -d "Deletes commands from history matching the strings"
34complete -f -c history -n "not __fish_seen_subcommand_from $__fish_history_all_commands" \
35    -a merge -d "Incorporate history changes from other sessions"
36complete -f -c history -n "not __fish_seen_subcommand_from $__fish_history_all_commands" \
37    -a clear -d "Clears history file"
38complete -f -c history -n "not __fish_seen_subcommand_from $__fish_history_all_commands" \
39    -a clear-session -d "Clears all history from the current session"
40complete -f -c history -n "not __fish_seen_subcommand_from $__fish_history_all_commands" \
41    -a append -d "Appends commands to the history without needing to execute them"