diff options
author | Crazazy | 2022-02-21 13:41:38 +0100 |
---|---|---|
committer | Crazazy | 2022-02-21 13:41:38 +0100 |
commit | 60f3268f6997ffa0a3d089dd0b7685182e5cc904 (patch) | |
tree | 9d4b01dbb5fe10b5c2ab33339fdd5b7adf4f85e4 | |
parent | f019892c99b5a172ff4af4f340e345e63277b135 (diff) |
updated emenu
properly separate the reading and list function in emenu and all-commands
-rw-r--r-- | emacs.org | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/emacs.org b/emacs.org index 24339ce..b84a311 100644 --- a/emacs.org +++ b/emacs.org @@ -491,10 +491,10 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto (not (file-executable-p fullpath))))) (directory-files path nil directory-files-no-dot-files-regexp nil)))) (split-string (getenv "PATH") ":" t))) - (alias-output (split-string (shell-command-to-string "alias -p | sed -E 's/^alias ([^=]*)=.*$/\1/'") "\n"))) - (ido-completing-read "Command: " (append ls-output alias-output)))) + (alias-output (split-string (shell-command-to-string "alias -p | sed -E 's/^alias ([^=]*)=.*$/\\1/'") "\n"))) + (append ls-output alias-output))) - (defun emenu () + (defun emenu (&optional command-list) "A dmenu-inspired application launcher using a separate emacs frame" (interactive) (with-selected-frame (make-frame '((name . "emenu") @@ -503,7 +503,12 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto (height . 1))) (unwind-protect (progn - (call-process (all-commands) nil 0) + (call-process + (ido-completing-read "Command: " (or + command-list + (all-commands))) + nil + 0) (keyboard-quit)) (delete-frame)))) #+end_src |