diff options
author | Marvin Borner | 2020-05-30 16:12:43 +0200 |
---|---|---|
committer | Marvin Borner | 2020-05-30 16:12:43 +0200 |
commit | 96cde026875d0cb74274ff509a082c7131ba74ab (patch) | |
tree | 915f42e07cdb2fe90f5d46c294eb8ad612f55feb /.repos/st/st-copyout | |
parent | fd7cd8ecce2f5cfa7530e3954c2a6669ec282a67 (diff) |
Synced upstream of terminal
Diffstat (limited to '.repos/st/st-copyout')
-rwxr-xr-x | .repos/st/st-copyout | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/.repos/st/st-copyout b/.repos/st/st-copyout index 8eafc58..0d19e5a 100755 --- a/.repos/st/st-copyout +++ b/.repos/st/st-copyout @@ -6,6 +6,7 @@ tmpfile=$(mktemp /tmp/st-cmd-output.XXXXXX) trap 'rm "$tmpfile"' 0 1 15 sed -n "w $tmpfile" +sed -i 's/\x0//g' "$tmpfile" ps1="$(grep "\S" "$tmpfile" | tail -n 1 | sed 's/^\s*//' | cut -d' ' -f1)" chosen="$(grep -F "$ps1" "$tmpfile" | sed '$ d' | tac | dmenu -p "Copy which command's output?" -i -l 10 | sed 's/[^^]/[&]/g; s/\^/\\^/g')" eps1="$(echo "$ps1" | sed 's/[^^]/[&]/g; s/\^/\\^/g')" |