From 7e7f16ae7040eb89a4103ca38ca571174ad4be67 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 10 Jun 2019 16:12:15 +1200 Subject: Prevent me from using `which` --- bash/bashrc.d/which.bash | 4 ++++ sh/shrc.d/which.sh | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 bash/bashrc.d/which.bash create mode 100644 sh/shrc.d/which.sh diff --git a/bash/bashrc.d/which.bash b/bash/bashrc.d/which.bash new file mode 100644 index 00000000..2d7084e6 --- /dev/null +++ b/bash/bashrc.d/which.bash @@ -0,0 +1,4 @@ +which() { + printf >&2 'Whichcraft detected! Did you mean: type -P %s\n' "$*" + return 2 +} diff --git a/sh/shrc.d/which.sh b/sh/shrc.d/which.sh new file mode 100644 index 00000000..9d8c899a --- /dev/null +++ b/sh/shrc.d/which.sh @@ -0,0 +1,4 @@ +which() { + printf >&2 'Whichcraft detected! Did you mean: command -v %s\n' "$*" + return 2 +} -- cgit v1.2.3