branch: externals/shell-command+ commit c3954087c7858fbf496bd6bbd1b37fc9e46bef78 Author: Philip K <phi...@warpmail.net> Commit: Philip K <phi...@warpmail.net>
Re-added % substitution --- bang.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bang.el b/bang.el index 068fed9..070018d 100644 --- a/bang.el +++ b/bang.el @@ -119,7 +119,13 @@ insert a literal % quote it using a backslash." (has-< (match-string-no-properties 4 command)) (has-> (match-string-no-properties 5 command)) (has-| (match-string-no-properties 6 command)) - (rest (match-string-no-properties 7 command))) + (rest (condition-case nil + (replace-regexp-in-string + (rx (* ?\\ ?\\) (or ?\\ (group "%"))) + buffer-file-name + (match-string-no-properties 7 command) + nil nil 1) + (error (match-string-no-properties 7 command))))) (cond (arg-! (bang (bang--find-last-command arg-!) beg end)) (num-! (bang (bang--get-command-number num-! rest)