[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/shell-command+ 0b6145b0f3: Add "clear" command to 'shel
From: |
ELPA Syncer |
Subject: |
[elpa] externals/shell-command+ 0b6145b0f3: Add "clear" command to 'shell-command+-substitute-alist' |
Date: |
Thu, 11 Jul 2024 03:58:50 -0400 (EDT) |
branch: externals/shell-command+
commit 0b6145b0f39f6a8209a076ebb60ce04f60282344
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Add "clear" command to 'shell-command+-substitute-alist'
---
shell-command+.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/shell-command+.el b/shell-command+.el
index 532d70707f..057f99ee8e 100644
--- a/shell-command+.el
+++ b/shell-command+.el
@@ -284,6 +284,12 @@ prefix the command with \"../../../../\" or \"....\".")
(pcase-let ((`(,_ ,directory) (shell-command+-tokenize command)))
(cd directory)))
+(defun shell-command+-cmd-clear (&rest _command)
+ "Empty the contents of the the *Shell Output* buffer."
+ (with-current-buffer (or (bound-and-true-p shell-command-buffer-name)
+ "*Shell Command Output*")
+ (erase-buffer)))
+
(defcustom shell-command+-substitute-alist
'(("grep" . shell-command+-cmd-grep)
("fgrep" . shell-command+-cmd-grep)
@@ -297,7 +303,8 @@ prefix the command with \"../../../../\" or \"....\".")
("diff" . shell-command+-cmd-diff)
("make" . compile)
("sudo" . shell-command+-cmd-sudo)
- ("cd" . shell-command+-cmd-cd))
+ ("cd" . shell-command+-cmd-cd)
+ ("clear" . shell-command+-cmd-clear))
"Association of command substitutes in Elisp.
Each entry has the form (COMMAND . FUNC), where FUNC is passed
the command string. To disable all command substitutions, set
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/shell-command+ 0b6145b0f3: Add "clear" command to 'shell-command+-substitute-alist',
ELPA Syncer <=