Commit Graph

77 Commits

Author SHA1 Message Date
5a690fc54f feat(:term): confine undo to comint/eshell prompts
Otherwise, undo could delete entire chunks of a shell buffer. This
addresses the issue in eshell, comint shells, and derivatives (like
ielm, shell, or inferior-* shells).

Ref: #8410
2025-07-13 21:13:00 +02:00
1b125ddf7b feat(:term): make previous command output read-only
This makes the output of previous commands and prompts immutable (by
default), so users can't accidentally alter them, which can leave the
buffer in a half-broken state (requiring the user flush out the garbled
input with a couple RETs).

This targets comint shells (shell, ielm, etc), eshell, (ansi-)term, and
any derivatives thereof.

Fix: #8411
2025-07-13 21:12:57 +02:00
6a6ac8f315 fix(eshell): disable undo while process is executing
After further experimentation these will be replaced with named
functions.
2025-06-01 00:26:56 +02:00
b4276f41f4 fix(eshell): "attempt to open-code ‘anonymous lambda’ with too few arguments"
Fix: #8364
Ref: #6867
Amend: c7ca3ea8cc
2025-04-16 03:48:29 -04:00
d209e519af fix(eshell): highlight syntax after completing from history
Fix: #6867
Co-authored-by: aikrahguzar <aikrahguzar@users.noreply.github.com>
2025-04-13 02:50:09 -04:00
5fdffe19db feat(eshell): add help command & lookup handler
Fix: #6867
Co-authored-by: aikrahguzar <aikrahguzar@users.noreply.github.com>
2025-04-13 02:50:09 -04:00
c7ca3ea8cc fix(eshell): don't error if command manpages has no SYNOPSIS
Fix: #6867
Ref: tom-tan/esh-help#7
2025-04-13 02:50:09 -04:00
13b64229a0 fix(popup): fringe/margins adjusted in wrong window
Due to a race condition in some contexts, hooks that adjusted window
fringes or margins weren't targeting the windows (usually popups) they
were supposed to, often affecting the last selected window instead. This
could cause the fringes (or margins) to resize or outright vanish
unexpectedly in the wrong windows (e.g. after opening or killing a vterm
or eshell popup).

Fix: #8346
2025-04-07 13:59:30 -04:00
dbcd30820b fix(eshell): eshell-did-you-mean: sequencep 771 error
Also removes obsolete hack for eshell-did-you-mean (see
xuchunyang/eshell-did-you-mean#2).

Ref: xuchunyang/eshell-did-you-mean#2
2024-08-21 14:53:23 -04:00
659f7bfc71 refactor!: deprecate IS-* OS constants
BREAKING CHANGE: This deprecates the IS-(MAC|WINDOWS|LINUX|BSD) family
of global constants in favor of a native `featurep` check:

  IS-MAC      ->  (featurep :system 'macos)
  IS-WINDOWS  ->  (featurep :system 'windows)
  IS-LINUX    ->  (featurep :system 'linux)
  IS-BSD      ->  (featurep :system 'bsd)

The constants will stick around until the v3 release so folks can still
use it -- and there are still some modules that use it, but I'll phase
those uses out gradually.

Fix: #7479
2024-02-04 17:54:29 -05:00
d1d0a7e258 fix(eshell): remove fish executable advice
Ref: LemonBreezes/emacs-fish-completion@99f0672c20
2024-02-01 18:47:20 -05:00
dc16fe10e3 feat(eshell): add imenu support 2023-11-24 10:31:35 -05:00
e4b1ed5a6a refactor(eshell): eshell-prompt-regexp
This new default makes eshell-prompt-regexp's consumers a little less
susceptible to false positives in garbage/process output and a little
more resistant to user changes to eshell-prompt-function. It's also
closer to its default value (KISS).
2023-11-24 10:29:29 -05:00
a180579d6f bump: :term eshell
Ambrevar/emacs-fish-completion@1038488181 -> Ambrevar/emacs-fish-completion@df42e15308
akreisher/eshell-syntax-highlighting@8bf0494ca7 -> akreisher/eshell-syntax-highlighting@4ac27eec6595# Please enter the commit message for your changes. Lines starting

- (#7529) Fix elisp code-completion in Eshell.

Close: #7529
2023-11-23 17:29:37 -05:00
8340141e69 fix(eshell): pcomplete after quotes in emacs <=28
Fixes an upstream issue in pcomplete where completion after quotes fails
with the following message:

  Completion function pcomplete-completions-at-point uses a deprecated
  calling convention

This issue is fixed in 29+, but I backport this fix for 27-28
users (credit for the fix goes minad/cape, which is where I adapted this
fix from).

Fix: #3817
Co-authored-by: minad <minad@users.noreply.github.com>
2023-09-16 16:17:02 +02:00
034da90693 refactor(eshell): remove wait for esh-module 2023-09-02 11:46:07 -05:00
aa54383b5d refactor: deprecate doom-etc-dir for doom-data-dir
doom-etc-dir will be renamed to doom-data-dir, to better reflect its
purpose, and align it with XDG_DATA_HOME (where it will be moved to in
v3, where Doom will begin to obey XDG directory conventions more
closely).
2022-08-14 20:43:35 +02:00
a5c80fcb4b refactor: deprecate doom-private-dir for doom-user-dir
- Deprecates the doom-private-dir variable in favor of doom-user-dir.
- Renames the pseudo category for the user's module: :private -> :user.
- Renames the doom-private-error error type to doom-user-error.

Emacs uses the term "user" to refer to the "things" in user space (e.g.
user-init-file, user-emacs-directory, user-mail-address, xdg-user-dirs,
package-user-dir, etc), and I'd like to be consistent with that. It also
has the nice side-effect of being slightly shorter. I also hope
'doom-user-error' will be less obtuse to beginners than
'doom-private-error'.
2022-08-14 20:43:35 +02:00
ad6a3d0f33 refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
6185767c41 refactor(eshell,term): move hscroll-margin settings
...out of core and into their respective modules. A tiny step toward
thinning out core.
2022-03-31 14:05:45 +02:00
012b97fafb tweak(eshell): bind C-l to clear-scrollback
Make C-l have the same behavior as the clear alias by clearing the
scrollback.
2021-11-21 19:05:18 +01:00
2d2246d7ca term/eshell: alias ff = find-file-other-window
The old alias was redundant with "f"
2021-07-06 02:32:38 -04:00
4b90f28e08 Default eshell-term-name to eterm-color
Fixes #4688
2021-05-24 13:34:24 -04:00
2a294d1ea8 Tell git not to use pager in eshell
Eshell can't handle pagers.
2021-04-14 18:06:33 +07:00
eae7ca2c57 term/eshell: alias cdp to cd-to-project 2021-02-24 18:27:45 -05:00
7ec18961b0 Migrate term to variable and add README note 2021-02-23 19:38:31 +00:00
67ca6b8bd8 Set default eshell TERM 2021-02-22 06:29:57 +00:00
06c13d9a0c term/eshell: bind C-l to eshell/clear
Closes #4615
2021-02-11 22:05:17 -05:00
1b6cf5777a Fix void-variable eshell-modules-list
Only affected Emacs 26 users.
2021-01-10 04:49:00 -05:00
1ba06ed5df Enable eshell-tramp by default 2021-01-07 01:43:17 -05:00
4dab595ad3 Minor refactors & comment revision 2020-11-20 14:10:29 -05:00
892493741f term/eshell: add syntax highlighting 2020-11-19 00:44:15 -05:00
6f3f4de46d Fix #4279: runaway duplication in eshell-command-aliases-list 2020-11-17 12:46:10 -05:00
d20590b8d6 Remove eshell obsolete variable
`eshell-buffer-shorthand` was removed in Emacs 25, see https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.25#L1078-L1082
2020-11-05 23:10:51 +08:00
57ef63d6ba Fix #4176: wrong-type-arg keymapp opening eshell 2020-10-29 05:42:10 -04:00
1b44cf9215 Fix #4176: eshell keybinds bound too soon
eshell-mode-map is defined in esh-mode.el, which isn't loaded
immediately by eshell.el.
2020-10-29 01:54:59 -04:00
8eb8f41b33 EMACS28+ gate eshell keymap fix 2020-10-29 01:42:09 -04:00
f33b141650 term/eshell: fix eshell resetting eshell-mode-map
This "backports" a Emacs 28 fix which prevents eshell from resetting
eshell-mode-map every time eshell-mode is activated.

Now users can bind keys to eshell-mode-map like they could for any
normal mode.
2020-10-27 21:19:59 -04:00
72c03965cc Bump :editor evil
emacs-evil/evil@25fc5c6 -> emacs-evil/evil@017b442
emacs-evil/evil-collection@e065da3 -> emacs-evil/evil-collection@3e62b6b
emacs-evil/evil-surround@1c34944 -> emacs-evil/evil-surround@346d4d8
redguardtoo/evil-nerd-commenter@1bd2de5 -> redguardtoo/evil-nerd-commenter@87734b9

Some functionality has been upstreamed into evil-collection and thus
removed from their respective modules.

Closes #3577
2020-07-17 19:40:19 -04:00
d93b789ef5 Move point to eshell prompt when switching to insert mode
This advice was broken (and superseded) by changes upstream in
evil-collection-eshell.
2020-06-05 13:08:01 -04:00
2d3eab7a35 Make C-c {h,j,k,l} eshell keybinds evil-only
The h,j,k,l paradigm is distinctly vim's, and should not be bound for
vanilla users, so now it's only available to evil users.

Also, since C-c l is the vanilla localleader prefix, this causes "Key
sequence C-c l b starts with non-prefix key C-c l" errors.

Fixes #3224
2020-05-26 14:06:19 -04:00
eafad7bbad Reformat term/eshell module
- Two newlines between use-package! blocks
- Remove comment that was redundant with the code below it
2020-05-15 22:54:50 -04:00
ceb1d4e91f Disable {bash,fish}-completion on Windows
Because neither is available on windows, you'll get errors when trying
to complete in eshell. Better to disable it so eshell can fall back to
pcomplete.
2020-05-15 22:53:17 -04:00
ea18c83c0a General refactors & reformatting across the board 2020-05-15 01:44:53 -04:00
c881f98960 Merge branch 'develop' into eshell-improvements 2020-05-13 09:17:10 -04:00
1529dcaaf5 Fix #3007: wrong-type-arg stringp on eshell completion 2020-05-11 05:32:51 -04:00
a82d93630f Fix DYM and add aliases
Fixed the use-package! declaration for eshell-did-you-mean since it
needed a different mode in the :after than I thought.
I also put together a quick hack to try and fix an issue with
did-you-mean, but it doesn't seem to work reliably right now. More
testing required.

Also added two aliases, one `gg` for to open magit-status and one `ff`
as an additional alias to find-file that follows the Doom keybindings
better.
2020-04-28 16:54:34 -04:00
85cf7a794b Fixes from PR feedback
This contains fixes suggested by Henrik as feedback from the initial PR,
including updating and correcting the Eshell module README, and few
tweaks to the module configuration, and properly pinning
eshell-did-you-mean.
2020-04-28 09:35:06 -04:00
73de701073 Merge branch 'develop' into eshell-improvements 2020-04-28 09:33:56 -04:00
06d5d5e6c0 General refactors, reformatting & comment revision 2020-04-23 23:56:17 -04:00