Commit 91bc2e2
xxwhirlpool
·
2026-03-10 09:42:57 -0400 EDT
parent a4c9080
update strtquote
1 files changed,
+10,
-3
+10,
-3
| ... | ... | @@ -1,7 +1,14 @@ | |
| 1 | 1 | #!/usr/bin/env bash | |
| 2 | 2 | ||
| 3 | - | stdinpaste() { | |
| 4 | - | gum write --header="paste smart quote shit here" | sed 's/[“”]/"/g; s/[‘’]/'"'"'/g' | batcat --paging=never | |
| 3 | + | default() { | |
| 4 | + | sed 's/[“”]/"/g; s/[‘’]/'"'"'/g' | tee >(xclip -selection clipboard) | |
| 5 | 5 | } | |
| 6 | 6 | ||
| 7 | - | stdinpaste | |
| 7 | + | stdinpaste() { | |
| 8 | + | gum write --header="paste smart quote shit here" | sed 's/[“”]/"/g; s/[‘’]/'"'"'/g' | batcat --paging=never | tee >(xclip -selection clipboard) | |
| 9 | + | } | |
| 10 | + | ||
| 11 | + | case "$1" in | |
| 12 | + | "") default ;; | |
| 13 | + | "-i") stdinpaste ;; | |
| 14 | + | esac |