Re:The Linux cheat command
by m_x on Thursday June 02, 2022 @01:25PM
(#31597867)
As I don't need it that often, I prefer the zero-install `curl cht.sh/tar`.
[ Parent
| on HN ]
I put this in my ZSH profile.
function cheat() {
curl cht.sh/$1
}I have a similar setup:
function cheat() {
cheatcommand=$1
shift;
IFS='+'
str="$*"
if [ "$#" -eq 0 ]; then
curl cht.sh/$cheatcommand
else
curl cht.sh/$cheatcommand/$str
fi
}I use this fairly regularly! If you don't know, you can type almost any command, e.g. `curl cht.sh/ls` and it shows you common usages of `ls` with a short description for each command
Man pages for the lazy.