aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-07-02 00:06:59 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-07-02 00:23:42 +1200
commitab5010651d679e1d01093c5b6eea4cb99f5d2d36 (patch)
treeee5b6ee08c7f34962e8e8c883c4cd16630d4e5e6 /bash/bashrc.d
parentTidying up license files (diff)
downloaddotfiles-ab5010651d679e1d01093c5b6eea4cb99f5d2d36.tar.gz
dotfiles-ab5010651d679e1d01093c5b6eea4cb99f5d2d36.zip
Terser pa/paz implementations
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r--bash/bashrc.d/pa.bash5
-rw-r--r--bash/bashrc.d/paz.bash5
2 files changed, 4 insertions, 6 deletions
diff --git a/bash/bashrc.d/pa.bash b/bash/bashrc.d/pa.bash
index 5f963818..b47189bf 100644
--- a/bash/bashrc.d/pa.bash
+++ b/bash/bashrc.d/pa.bash
@@ -1,6 +1,5 @@
# Print arguments, one per line. Compare paz().
pa() {
- if (($#)) ; then
- printf '%s\n' "$@"
- fi
+ (($#)) || return 0
+ printf '%s\n' "$@"
}
diff --git a/bash/bashrc.d/paz.bash b/bash/bashrc.d/paz.bash
index def70f8d..77299dad 100644
--- a/bash/bashrc.d/paz.bash
+++ b/bash/bashrc.d/paz.bash
@@ -1,7 +1,6 @@
# Print arguments, null-delimited; you will probably want to write this into a
# file or as part of a pipeline. Compare pa().
paz() {
- if (($#)) ; then
- printf '%s\0' "$@"
- fi
+ (($#)) || return 0
+ printf '%s\0' "$@"
}