dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit dee6b5be7b0e3cfb07ca383ea78a2bd56eba70c2
parent bbd876559a99474a78cc6cb388e88022a478bf6f
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Sat, 17 Aug 2019 16:24:07 +0200

cheat: query cheat.sh and pipe it into less

Former-commit-id: 7960d502c8c0a01a13ab9f068c145cfe1dffc982
Diffstat:
MREADME.md | 1+
Ascripts/cheat | 8++++++++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -12,6 +12,7 @@ However, if you _do_ use this, I suggest that you use this more as inspiration t Before you use a custom script, read what it does. Some may be a bit buggy, I haven't tested them on all systems. If you read a script and see some improvements that could be made, let me know. I'm always down to learn more stuff. +* `cheat`: query http://cheat.sh and output the result into `less` * `checklinks`: recursively check any website for broken links * `clonedisk`: clones one disk to another * `colgen.rb`: a Ruby script to generate Vim colorschemes from a much simpler syntax file. diff --git a/scripts/cheat b/scripts/cheat @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +if ! command -v curl &>/dev/null; then + echo "curl not installed." >&2 + exit 1 +fi + +! [ $# -ge 1 ] && echo "Argument required." && exit 1 +curl -Ls cheat.sh/"$1" | less