diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-07-02 00:06:59 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-07-02 00:23:42 +1200 |
commit | ab5010651d679e1d01093c5b6eea4cb99f5d2d36 (patch) | |
tree | ee5b6ee08c7f34962e8e8c883c4cd16630d4e5e6 | |
parent | Tidying up license files (diff) | |
download | dotfiles-ab5010651d679e1d01093c5b6eea4cb99f5d2d36.tar.gz dotfiles-ab5010651d679e1d01093c5b6eea4cb99f5d2d36.zip |
Terser pa/paz implementations
-rw-r--r-- | bash/bashrc.d/pa.bash | 5 | ||||
-rw-r--r-- | bash/bashrc.d/paz.bash | 5 |
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' "$@" } |