aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoe <rbo@gmx.us>2025-10-08 14:10:42 +0200
committerjoe <rbo@gmx.us>2025-10-08 14:10:42 +0200
commit4e98254b982403f07b9b00c1deb5575296b00b0f (patch)
tree934f4a042473c1fb61009b08e2e5f62669b04e98
parentin progress (diff)
downloadst-4e98254b982403f07b9b00c1deb5575296b00b0f.tar.gz
st-4e98254b982403f07b9b00c1deb5575296b00b0f.tar.bz2
st-4e98254b982403f07b9b00c1deb5575296b00b0f.tar.xz
st-4e98254b982403f07b9b00c1deb5575296b00b0f.tar.zst
st-4e98254b982403f07b9b00c1deb5575296b00b0f.zip
clipcmd
-rwxr-xr-xst-cpycmd17
1 files changed, 1 insertions, 16 deletions
diff --git a/st-cpycmd b/st-cpycmd
index aff6b2a..ece0c21 100755
--- a/st-cpycmd
+++ b/st-cpycmd
@@ -5,8 +5,7 @@
# xclip required for this script.
# By joe, adapted from st-cpyout by Jaywalker and Luke
-# mem=$(sed 's/^ $//g' | sed 's/\x0//g')
-mem=$(cat /tmp/out)
+mem=$(sed 's/^ $//g' | sed 's/\x0//g')
ps1=$(printf "%s" "$mem" |
tail -n1 |
sed -E 's/([%,#,>,$]).*/\1/')
@@ -20,17 +19,3 @@ if [ -n "$chosen" ]; then
printf "%s" "$cmd" | xclip -selection clipboard
herbe " clipped : $(printf "%.10s..." "$cmd")" &
fi
-return
-# if [ "$1" = "noprompt" ]; then
-# printf "%s" "$mem" |
-# gawk "/^$chosen$/{p=1;print;next} p&&/$eps1/{p=0};p" |
-# tac |
-# sed '$ d' |
-# tac |
-# perl -p -e 'chomp if eof' |
-# xclip -selection clipboard
-# else
-# printf "%s" "$mem" |
-# gawk "/^$chosen$/{p=1;print;next} p&&/$eps1/{p=0};p" |
-# xclip -selection clipboard
-# fi