diff options
author | Thierry Volpiatto <thievol@posteo.net> | 2021-10-08 14:35:46 +0200 |
---|---|---|
committer | Thierry Volpiatto <thievol@posteo.net> | 2021-10-08 14:56:25 +0200 |
commit | 54c8bfb7792141baab37793e7f1da4246ce9af50 (patch) | |
tree | 77a3951adfd8a8010b8cea66626c89ca89224629 /helm-files.el | |
parent | f3418c954eb3f2b3bbe4f2a921ba915fb6f747ed (diff) |
Use helm-aand for chaining replace-regexp-in-string
Diffstat (limited to 'helm-files.el')
-rw-r--r-- | helm-files.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/helm-files.el b/helm-files.el index 25471cbf..dfa825ab 100644 --- a/helm-files.el +++ b/helm-files.el @@ -1533,11 +1533,15 @@ this working." for file = (shell-quote-argument (helm-basename f)) ;; \@ => placeholder for file without extension. ;; \# => placeholder for incremental number. - for fcmd = (replace-regexp-in-string - "\\\\@" (regexp-quote (file-name-sans-extension file)) - (replace-regexp-in-string - "\\\\#" (format "%03d" n) command t t) - t t) + for fcmd = (helm-aand command + (replace-regexp-in-string + "\\\\#" (format "%03d" n) + it t t) + (replace-regexp-in-string + "\\\\@" + (regexp-quote + (file-name-sans-extension file)) + it t t)) for com = (if (string-match "%s" fcmd) ;; [1] This allow to enter other args AFTER filename ;; i.e <command %s some_more_args> |