Compatibility for FreeBSD's paste(1) (#853)

* Compatibility for FreeBSD's paste(1)

According to FreeBSD's
[paste(1)](https://www.freebsd.org/cgi/man.cgi?query=paste&sektion=1&manpath=FreeBSD+12.2-RELEASE+and+Ports),
the extra `-` is needed (tested by myself).
This obviously works for Linux as well, tested on Void Linux at least.

> Create a colon-separated list of directories named bin,
> suitable for use in the PATH environment variable:

`find / -name bin -type d | paste -s -d : -`

* Compatibility for FreeBSD's paste(1)

According to FreeBSD's
[paste(1)](https://www.freebsd.org/cgi/man.cgi?query=paste&sektion=1&manpath=FreeBSD+12.2-RELEASE+and+Ports),
the extra `-` is needed (tested by myself).
This obviously works for Linux as well, tested on Void Linux at least.

> Create a colon-separated list of directories named bin,
> suitable for use in the PATH environment variable:

`find / -name bin -type d | paste -s -d : -`
This commit is contained in:
anntnzrb 2020-12-01 18:21:03 -05:00 committed by GitHub
parent 1065e31611
commit 7c96bd081a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@
# to clean up. # to clean up.
# Adds `~/.local/bin` to $PATH # Adds `~/.local/bin` to $PATH
export PATH="$PATH:$(du "$HOME/.local/bin" | cut -f2 | paste -sd ':')" export PATH="$PATH:$(du "$HOME/.local/bin" | cut -f2 | paste -sd ':' -)"
unsetopt PROMPT_SP unsetopt PROMPT_SP

View file

@ -53,7 +53,7 @@ multimon() { # Multi-monitor handler.
esac ;} esac ;}
onescreen() { # If only one output available or chosen. onescreen() { # If only one output available or chosen.
xrandr --output "$1" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$1" | awk '{print "--output", $1, "--off"}' | paste -sd ' ') xrandr --output "$1" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$1" | awk '{print "--output", $1, "--off"}' | paste -sd ' ' -)
} }
postrun() { # Stuff to run to clean up. postrun() { # Stuff to run to clean up.

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d" | paste -sd ' ';} filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d" | paste -sd ' ' -;}
pidof -x mpdup >/dev/null 2>&1 || mpdup >/dev/null 2>&1 & pidof -x mpdup >/dev/null 2>&1 || mpdup >/dev/null 2>&1 &

View file

@ -8,7 +8,7 @@ transmission-remote -l | grep % |
s/.*Idle.*/B 🕰️/; s/.*Idle.*/B 🕰️/;
s/.*Uploading.*/L ⬆️/; s/.*Uploading.*/L ⬆️/;
s/.*%.*/M ⬇️/" | s/.*%.*/M ⬇️/" |
sort -h | uniq -c | awk '{print $3 $1}' | paste -sd ' ' sort -h | uniq -c | awk '{print $3 $1}' | paste -sd ' ' -
case $BLOCK_BUTTON in case $BLOCK_BUTTON in
1) setsid -f "$TERMINAL" -e tremc ;; 1) setsid -f "$TERMINAL" -e tremc ;;