aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc.d/pa.bash2
-rw-r--r--bash/bashrc.d/pan.bash6
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
}