mirror of https://github.com/cheat/cheat.git
Merge branch 'fish-completions' of github.com:exploide/cheat into exploide-fish-completions
This commit is contained in:
commit
52081b97ac
|
@ -178,11 +178,11 @@ To search (by regex) for cheatsheets that contain an IP address:
|
||||||
cheat -r -s '(?:[0-9]{1,3}\.){3}[0-9]{1,3}'
|
cheat -r -s '(?:[0-9]{1,3}\.){3}[0-9]{1,3}'
|
||||||
```
|
```
|
||||||
|
|
||||||
Flags may be combined in inuitive ways. Example: to search sheets on the
|
Flags may be combined in intuitive ways. Example: to search sheets on the
|
||||||
"personal" cheatpath that are tagged with "networking" and match a regex:
|
"personal" cheatpath that are tagged with "networking" and match a regex:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cheat -p personal -t networking -s --regex '(?:[0-9]{1,3}\.){3}[0-9]{1,3}'
|
cheat -p personal -t networking --regex -s '(?:[0-9]{1,3}\.){3}[0-9]{1,3}'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,9 @@ formatter: terminal16m
|
||||||
# "upstream" cheatsheets.
|
# "upstream" cheatsheets.
|
||||||
#
|
#
|
||||||
# But what if you want to view the "upstream" cheatsheets instead of your own?
|
# But what if you want to view the "upstream" cheatsheets instead of your own?
|
||||||
# Cheatsheets may be filtered via 'cheat -f <tag>' in combination with other
|
# Cheatsheets may be filtered via 'cheat -t <tag>' in combination with other
|
||||||
# commands. So, if you want to view the 'tar' cheatsheet that is tagged as
|
# commands. So, if you want to view the 'tar' cheatsheet that is tagged as
|
||||||
# 'community' rather than your own, you can use: cheat tar -f community
|
# 'community' rather than your own, you can use: cheat tar -t community
|
||||||
cheatpaths:
|
cheatpaths:
|
||||||
|
|
||||||
# Paths that come earlier are considered to be the most "global", and will
|
# Paths that come earlier are considered to be the most "global", and will
|
||||||
|
|
|
@ -23,9 +23,9 @@ formatter: terminal16m
|
||||||
# "upstream" cheatsheets.
|
# "upstream" cheatsheets.
|
||||||
#
|
#
|
||||||
# But what if you want to view the "upstream" cheatsheets instead of your own?
|
# But what if you want to view the "upstream" cheatsheets instead of your own?
|
||||||
# Cheatsheets may be filtered via 'cheat -f <tag>' in combination with other
|
# Cheatsheets may be filtered via 'cheat -t <tag>' in combination with other
|
||||||
# commands. So, if you want to view the 'tar' cheatsheet that is tagged as
|
# commands. So, if you want to view the 'tar' cheatsheet that is tagged as
|
||||||
# 'community' rather than your own, you can use: cheat tar -f community
|
# 'community' rather than your own, you can use: cheat tar -t community
|
||||||
cheatpaths:
|
cheatpaths:
|
||||||
|
|
||||||
# Paths that come earlier are considered to be the most "global", and will
|
# Paths that come earlier are considered to be the most "global", and will
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
complete -c cheat -f -a "(cheat -l | tail -n +2 | cut -d ' ' -f 1)"
|
||||||
|
complete -c cheat -l init -d "Write a default config file to stdout"
|
||||||
|
complete -c cheat -s c -l colorize -d "Colorize output"
|
||||||
|
complete -c cheat -s d -l directories -d "List cheatsheet directories"
|
||||||
|
complete -c cheat -s e -l edit -x -a "(cheat -l | tail -n +2 | cut -d ' ' -f 1)" -d "Edit cheatsheet"
|
||||||
|
complete -c cheat -s l -l list -d "List cheatsheets"
|
||||||
|
complete -c cheat -s p -l path -x -a "(cheat -d | cut -d ':' -f 1)" -d "Return only sheets found on given path"
|
||||||
|
complete -c cheat -s r -l regex -d "Treat search phrase as a regex"
|
||||||
|
complete -c cheat -s s -l search -x -d "Search cheatsheets for given phrase"
|
||||||
|
complete -c cheat -s t -l tag -x -a "(cheat -l | tail -n +2 | rev | cut -d ' ' -f 1 | rev | sed 's/,/\n/g;/^\$/d' | sort -u)" -d "Return only sheets matching the given tag"
|
||||||
|
complete -c cheat -s v -l version -d "Print the version number"
|
Loading…
Reference in New Issue