From f8368bdbd666df08e65a7f0a3c931639d01cd1d0 Mon Sep 17 00:00:00 2001 From: Harshad Sharma Date: Sat, 17 Jun 2017 00:54:58 +0530 Subject: [PATCH] Make installer examples more relevant. --- src/qutescript/installer.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/qutescript/installer.py b/src/qutescript/installer.py index 88e336c..dd3b97c 100644 --- a/src/qutescript/installer.py +++ b/src/qutescript/installer.py @@ -15,14 +15,8 @@ Bind the command to a keystroke with: :bind KEYS spawn --userscript {name} OPTIONAL-ARGUMENTS examples: - - :bind kk spawn --userscript debug --kaboom - Use this by typing "kk" in normal mode, not fun :P - - - :bind ,dt spawn --userscript shell -c"date" --insert - Inserts current date in active tab. - -Warning: Enclose your provided arguments and options in quotes and -always test your command passed to `shell -c""` in the shell. + - :bind ,{nchar} spawn --userscript {name} + - :bind ,{nchar}x spawn --userscript {name} --extra-args """ LOADER_TEMPLATE = """\ @@ -67,4 +61,9 @@ def install(path, name=None): interpreter = get_interpreter() setup_permissions(path) userscripts_path = link_to_qutebrowser_userscripts_directory(path, name) - return REVIEW_TEMPLATE.format(userscripts_path=userscripts_path, name=name, interpreter=interpreter) + return REVIEW_TEMPLATE.format( + userscripts_path=userscripts_path, + name=name, + interpreter=interpreter, + nchar=name[0], + )