diff options
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r-- | bash/bashrc.d/pa.bash | 2 | ||||
-rw-r--r-- | bash/bashrc.d/pan.bash | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/bash/bashrc.d/pa.bash b/bash/bashrc.d/pa.bash index 6c3531f0..3a7b8398 100644 --- a/bash/bashrc.d/pa.bash +++ b/bash/bashrc.d/pa.bash @@ -1,4 +1,4 @@ -# Print arguments +# Print arguments, one per line. Compare pan(). pa() { if (($#)) ; then printf '%s\n' "$@" diff --git a/bash/bashrc.d/pan.bash b/bash/bashrc.d/pan.bash index 14cd3625..97de3917 100644 --- a/bash/bashrc.d/pan.bash +++ b/bash/bashrc.d/pan.bash @@ -1,6 +1,8 @@ # Print arguments, null-delimited; you will probably want to write this into a -# file or as part of a pipeline +# file or as part of a pipeline. Compare pa(). pan() { - printf '%s\0' "$@" + if (($#)) ; then + printf '%s\0' "$@" + fi } |