diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-01-01 01:11:08 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-01-01 01:11:08 +1300 |
commit | e19bb8fb3c8350bee288327abd978a59eb3dc0f7 (patch) | |
tree | 754d2d883b27477f53f0fece44ef9edc7e4238f0 /bin/fnp.sh | |
parent | Merge branch 'release/v4.2.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-954586e6ed7dfbd525e6ec8d1adc4f0c0bc0a48e.tar.gz (sig) dotfiles-954586e6ed7dfbd525e6ec8d1adc4f0c0bc0a48e.zip |
Merge branch 'release/v4.3.0'v4.3.0
* release/v4.3.0:
Bump VERSION
Switch to using GNU Emacs on development machines
Trim some trailing whitespace
Clarify control flow in shell scripts
Add clarifying comment
Translate a short-circuit into a conditional
Add a cheeky error message to sd()
Strip trailing slashes from sd() target
Correct error message from sd()
Diffstat (limited to 'bin/fnp.sh')
-rw-r--r-- | bin/fnp.sh | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,7 +1,9 @@ # Print input, but include filenames as headings # Assume stdin if no options given -[ "$#" -gt 0 ] || set -- - +if [ "$#" -eq 0 ] ; then + set -- - +fi # Iterate through arguments for arg do @@ -13,7 +15,9 @@ for arg do *) fn=$arg ;; esac - [ -n "$tail" ] && printf '\n' + if [ -n "$tail" ] ; then + printf '\n' + fi tail=1 # Form the underline; is there a nicer way to do this in POSIX sh? |