aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/cf.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-04-29 17:35:36 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-04-29 17:35:36 +1200
commit62c8407e2d23c52e71f099de920ec91fce3f622b (patch)
tree1871b53141ec0c8f6f3ca2a9a57638ac0fb3e24b /bash/bashrc.d/cf.bash
parentOnly print line if at least one arg (diff)
downloaddotfiles-62c8407e2d23c52e71f099de920ec91fce3f622b.tar.gz
dotfiles-62c8407e2d23c52e71f099de920ec91fce3f622b.zip
Use FUNCNAME rather than hardcoding helper funcs
Diffstat (limited to 'bash/bashrc.d/cf.bash')
-rw-r--r--bash/bashrc.d/cf.bash9
1 files changed, 6 insertions, 3 deletions
diff --git a/bash/bashrc.d/cf.bash b/bash/bashrc.d/cf.bash
index 707f2a76..be66ecea 100644
--- a/bash/bashrc.d/cf.bash
+++ b/bash/bashrc.d/cf.bash
@@ -7,13 +7,16 @@ cf() {
# Error conditions
if [[ ! -e $dir ]] ; then
- printf 'bash: cf: %s does not exist\n' "$dir" >&2
+ printf 'bash: %s: %s does not exist\n' \
+ "$FUNCNAME" "$dir" >&2
return 1
elif [[ ! -d $dir ]] ; then
- printf 'bash: cf: %s is not a directory\n' "$dir" >&2
+ printf 'bash: %s: %s is not a directory\n' \
+ "$FUNCNAME" "$dir" >&2
return 1
elif [[ ! -r $dir ]] ; then
- printf 'bash: cf: %s is not readable\n' "$dir" >&2
+ printf 'bash: %s: %s is not readable\n' \
+ "$FUNCNAME" "$dir" >&2
return 1
fi