diff --git a/share/bash.txt b/share/bash.txt index 5f37db4..122b466 100644 --- a/share/bash.txt +++ b/share/bash.txt @@ -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 diff --git a/share/fish.txt b/share/fish.txt index 9073f36..05ec4d2 100644 --- a/share/fish.txt +++ b/share/fish.txt @@ -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)'