diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-31 13:12:17 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-31 13:12:17 +1300 |
commit | 870ccd17ef1b1d4b94ba13b5140130306dac51c7 (patch) | |
tree | c4e9b2628070da6bf215efcb785fdbb9fbe47008 | |
parent | Strip trailing slashes from sd() target (diff) | |
download | dotfiles-870ccd17ef1b1d4b94ba13b5140130306dac51c7.tar.gz dotfiles-870ccd17ef1b1d4b94ba13b5140130306dac51c7.zip |
Add a cheeky error message to sd()
-rw-r--r-- | sh/shrc.d/sd.sh | 6 |
1 files changed, 6 insertions, 0 deletions
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' |