Fix xterm -e handling with multiword queryes

* `xterm`'s `-e` option is an option with a **variable number of parameters*.
  It does not perform word splitting on its own and takes all argv's words
  after it.  Therefore, the quotation marks in man and info prevent you from
  passing them switches and multiple arguments.

* Some commands (like `xdg`-gues) takes 1 argument and they can contain
  shell-symbols -> must be braced

* Some of them (like man & info) can take multiple arguments and (as it seems
  to me) cannot contain shell-symbloc -> must not be braced to split query to
  multiple words.
This commit is contained in:
PRESFIL 2021-02-20 12:00:20 +03:00 committed by GitHub
parent 78cac66790
commit c2fb58b85b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -47,14 +47,14 @@ SHELL_RUN = 1
# - %u gets replaced with the whole URL ("http://www.google.com")
# - %s gets replaced with "//www.google.com". This is useful for URL-s
# like "man:printf" --> %s will get replaced with "printf"
URL_http = xdg-open %u
URL_mailto = xdg-email %u
URL_file = xdg-open %s
URL_man = ${TermExec} 'man %s'
URL_info = ${TermExec} 'info %s'
URL_http = xdg-open '%u'
URL_mailto = xdg-email '%u'
URL_file = xdg-open '%s'
URL_man = ${TermExec} man %s
URL_info = ${TermExec} info %s
URL_search = xdg-open 'http://www.google.com/search?q=%s'
# extension handlers
# Customize your own extension handler.
EXT:doc,rtf,txt,cc,cpp,h,java,html,htm,epl,tex,latex,js,css,xml,xsl,am,ps,pdf = xdg-open %s
EXT:doc,rtf,txt,cc,cpp,h,java,html,htm,epl,tex,latex,js,css,xml,xsl,am,ps,pdf = xdg-open '%s'