summaryrefslogtreecommitdiff
path: root/helm-help.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thievol@posteo.net>2021-10-09 15:42:25 +0200
committerThierry Volpiatto <thievol@posteo.net>2021-10-09 15:42:25 +0200
commit228ec3623f3defdbff416f60558b6d451cf37bbf (patch)
treef18def8d27f101d8ae67a4b8e953a07c7834ba1f /helm-help.el
parentf07a7065e23a9b96138a1f54ad32f2848dc89389 (diff)
Update eshell command on file help
Diffstat (limited to 'helm-help.el')
-rw-r--r--helm-help.el44
1 files changed, 30 insertions, 14 deletions
diff --git a/helm-help.el b/helm-help.el
index 097e6ae2..63cfe71c 100644
--- a/helm-help.el
+++ b/helm-help.el
@@ -911,6 +911,12 @@ $ example foo bar baz
Of course the alias command should support this.
+NOTE: Helm assume that any alias command ending with '$*' or
+'$*&' supports many files as arguments, so no need to give a
+prefix arg for such alias, however if your command is not an
+alias you have to specify a prefix arg if you want your command
+to apply all files at once.
+
If you add %s to the command line %s will be replaced with the candidate, this mean you can
add extra argument to your command e.g. command -extra-arg %s or command %s -extra-arg.
If you want to pass many files inside %s, don't forget to use a prefix arg.
@@ -1950,23 +1956,37 @@ You can of course combine both placeholders if needed.
*** Specify marked files as arguments
+When you have marked files and your command support only one file
+as arg, helm will execute command sequencially on each file like
+this:
+
Example:
- <command> file1 file2...
+ <command> file1
+ <command> file2
+ ...etc
-Call `helm-find-files-eshell-command-on-file' with one prefix argument. Otherwise
-you can pass one prefix argument from the command selection buffer.
+When you have marked files and your command accept many files at
+once helm will run your command with all files at once like this:
-Note: This does not work on remote files.
+Example:
-With two prefix-args the output is printed to the `current-buffer'.
+ <command> file1 file2 etc...
-With no prefix argument or a prefix argument value of '(16) (`\\[universal-argument] \\[universal-argument]')
-the command is called once for each file like this:
+The two use case above are applied automatically by Helm
+depending if your command is an eshell alias which value ends by
+'$1' or '$*'. If your command is not an alias, i.e. you entered
+an arbitrary command on prompt with '%s' to specify filenames,
+you will have to pass one prefix argument from the command
+selection buffer.
- <command> file1
- <command> file2
- ...
+Note: This does not work on remote files.
+
+With two prefix-args the output is printed to the
+`current-buffer', the command being executed in the same
+conditions as described above.
+NOTE: If your command is not an alias, you can't pass all files at once and print in current buffer at the same time.
+Also note that running multiple files at once is not supported with remote files.
*** Run eshell commands asynchronously
@@ -1974,10 +1994,6 @@ You can run your commands asynchronously by adding \"&\" at end
of any commands, e.g. \"foo %s &\". You can also directly setup
your alias in the eshell alias file with e.g. \"alias foo $1 &\".
-NOTE: If you use \"&\" in a command with marked files and your
-command accept many files as argument don't forget to pass the
-prefix arg to ensure you run only one command on all marked async.
-
** Commands
\\<helm-esh-on-file-map>")