X clipboards are absolute hell
    
        | author | Steve Losh <steve@stevelosh.com> | 
    
        | date | Mon, 03 Feb 2020 13:59:14 -0500 | 
    
    
        | parents | a17191abd5e9 | 
    
        | children | 5deecedda0bb | 
    
        | branches/tags | (none) | 
    
        | files | bin/pastebin bin/pbpaste | 
Changes
    
--- a/bin/pastebin	Sun Feb 02 21:05:54 2020 -0500
+++ b/bin/pastebin	Mon Feb 03 13:59:14 2020 -0500
@@ -2,11 +2,8 @@
 
 set -euo pipefail
 
-PASTE_SHA=$(ssh paste.stevelosh.com 'cat > tmppaste && sha1sum tmppaste | cut -d" " -f1 && mv tmppaste /var/www/paste/`sha1sum tmppaste | cut -d" " -f1`')
+PASTE_SHA=$(ssh paste.stevelosh.com -- 'cat > tmppaste && sha1sum tmppaste | cut -d" " -f1 && mv tmppaste /var/www/paste/`sha1sum tmppaste | cut -d" " -f1`')
+URL="https://paste.stevelosh.com/$PASTE_SHA"
 
-echo -n "https://paste.stevelosh.com/$PASTE_SHA" | pbcopy
-echo -n 'Copied '
-tput bold
-pbpaste
-tput sgr0
-echo ' to the clipboard.'
+echo -n "$URL" | pbcopy
+echo "Copied $URL to the clipboard."
--- a/bin/pbpaste	Sun Feb 02 21:05:54 2020 -0500
+++ b/bin/pbpaste	Mon Feb 03 13:59:14 2020 -0500
@@ -2,4 +2,4 @@
 
 set -euo pipefail
 
-xsel --clipboard
+xsel --clipboard --output