diff options
| author | Blake Romero <blake@blkrom.com> | 2025-07-11 18:46:13 +0100 |
|---|---|---|
| committer | Blake Romero <blake@blkrom.com> | 2025-07-11 18:46:13 +0100 |
| commit | a3f546f444d13d2d52904971d1053d01ec64626d (patch) | |
| tree | 343ddbd7a151234c3ae8cbba397dd85c55355911 | |
| parent | 576b7c77ce3d17a51ab5513f738d2b3fe2d145d9 (diff) | |
Make shell output and prompt read-only
| -rw-r--r-- | emacs-config.org | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/emacs-config.org b/emacs-config.org index 30efc17..d16ab1a 100644 --- a/emacs-config.org +++ b/emacs-config.org @@ -1211,6 +1211,18 @@ Auto-close compilation buffer when there are no errors or warnings. (message "Compilation successful"))))))) #+end_src +** Shell +Make shell prompt and output read-only. +#+begin_src elisp + (with-eval-after-load 'shell + (setq-default comint-prompt-read-only t) + (defadvice comint-output-filter (after output-readonly activate) + "Set last process output read-only." + (add-text-properties + comint-last-output-start (line-end-position 0) + '(read-only t rear-nonsticky (inhibit-line-move-field-capture))))) +#+end_src + * Keybindings Unlock previously unusable keybinding. #+begin_src elisp |
