mirror of
https://github.com/chubin/cheat.sh.git
synced 2024-11-23 19:43:33 +03:00
functions names changed: cheat.sh insted of ch
This commit is contained in:
parent
95c48b60f8
commit
c0fd0249b6
@ -1,7 +1,8 @@
|
||||
# if ch is too short for you, replace it with cheat.sh
|
||||
# in the function declaration and in the complete call below
|
||||
# add this to ~/.bashrc or to ~/.bash.d/cheat.sh and
|
||||
# source ~/.bash.d/cheat.sh
|
||||
# in your ~/.bashrc
|
||||
|
||||
ch()
|
||||
cheat.sh()
|
||||
{
|
||||
# replace native with the color scheme you want
|
||||
# curl cheat.sh/:styles-demo to show the available color schemes
|
||||
@ -24,5 +25,5 @@ _cheatsh_complete_cheatsh()
|
||||
#fi
|
||||
}
|
||||
|
||||
complete -F _cheatsh_complete_cheatsh ch
|
||||
complete -F _cheatsh_complete_cheatsh cheat.sh
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
# add it to your ~/.config/fish/config.fish
|
||||
|
||||
# retrieve command cheat sheets from cheat.sh
|
||||
# fish version by @tobiasreischmann
|
||||
# (replace ch with cheat.sh if the name is too short for you)
|
||||
|
||||
function ch
|
||||
curl ch/$argv
|
||||
function cheat.sh
|
||||
curl cheat.sh/$argv
|
||||
end
|
||||
|
||||
# register completions (on-the-fly, non-cached, because the actual command won't be cached anyway
|
||||
complete -c ch -xa '(curl -s cheat.sh/:list)'
|
||||
complete -c cheat.sh -xa '(curl -s cheat.sh/:list)'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user