From 6419d9246d969483d1fec361095f723d484672e8 Mon Sep 17 00:00:00 2001 From: David Farrell Date: Mon, 9 Mar 2020 12:38:05 -0700 Subject: [PATCH] Add cht.sh plugin --- plugins/available/cht-sh.plugin.bash | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/available/cht-sh.plugin.bash diff --git a/plugins/available/cht-sh.plugin.bash b/plugins/available/cht-sh.plugin.bash new file mode 100644 index 00000000..bc9dcd6c --- /dev/null +++ b/plugins/available/cht-sh.plugin.bash @@ -0,0 +1,9 @@ +cite about-plugin +about-plugin 'Simplify `curl cht.sh/` to `cht.sh `' + +# Play nicely if user already installed cht.sh cli tool +if ! _command_exists cht.sh ; then + function cht.sh () { + curl "cht.sh/$1" + } +fi