1

I would like to be able to copy-paste URL into xterm without \ coming along for the ride. I think they are taken along for the ride because xterm is converting URLs into regular expressions (regexes). For example, if I copy-paste https://translate.google.com/translate?hl=en&sl=auto&tl=en&u= into xterm it gets transformed into https://translate.google.com/translate\?hl\=en\&sl\=auto\&tl\=en\&u\= Note the backslashes that weren't in the original URL.

My ~/XTerm file, if relevant, is presently:

XTerm*Background: black
XTerm*Foreground: white
XTerm*SaveLines: 2000
XTerm*faceName: Ubuntu mono
XTerm*faceSize: 12
XTerm*rightScrollBar: true
XTerm*ScrollBar: true
XTerm*scrollTtyOutput: true
XTerm*VT100.Translations: #override \
      Ctrl<Key>V: insert-selection(CLIPBOARD) \n\ 
      Ctrl<Key>V: insert-selection(PRIMARY) \n\ 
      Shift<Btn1Down>: select-start() \n\ 
      Shift<Btn1Motion>: select-extend() \n\ 
      Shift<Btn1Up>: select-end(CLIPBOARD) \n\
Ctrl <Key>C: copy-selection(CLIPBOARD) \n\
Ctrl <Key>V: insert-selection(CLIPBOARD)
Josh Pinto
  • 3,483
  • 15
  • 52
  • 87
  • Does this happen if you paste the URL just after an opening quote (single or double)? The `&` needs to be escaped/quoted for the shell to nat treat the as the `&` that terminates the command which is to be run in the background. Likewise, `=` is an assignment is some situations. – Kusalananda Jan 24 '18 at 10:31
  • An opening quotation mark (single or double) doesn't fix it I'm afraid. – Josh Pinto Jan 24 '18 at 10:43
  • You have two `CtrlV` translations, one for `CLIPBOARD` and one for `PRIMARY`. Do you need both? Do both selections contain the same thing? – Useless Jan 24 '18 at 11:02

0 Answers0