From 870ccd17ef1b1d4b94ba13b5140130306dac51c7 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 31 Dec 2018 13:12:17 +1300 Subject: Add a cheeky error message to sd() --- sh/shrc.d/sd.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sh/shrc.d/sd.sh b/sh/shrc.d/sd.sh index a901bb51..10597832 100644 --- a/sh/shrc.d/sd.sh +++ b/sh/shrc.d/sd.sh @@ -49,6 +49,12 @@ sd() { # Read sole optional argument case $1 in + # Root has no siblings + /) + printf >&2 'sd(): Radical misunderstanding\n' + return 2 + ;; + # Slashes aren't allowed */*) printf >&2 'sd(): Illegal slash\n' -- cgit v1.2.3