Commit graph

27 commits

Author SHA1 Message Date
1ac4895529
Merge pull request #10 from alan-w-255/not_sorting_history
Some checks failed
melpazoid / build (push) Has been cancelled
stop completing-read sorting atuin history.
2025-03-01 11:33:21 +03:00
wangyuanmou
c408d07c5f stop completing-read sorting atuin history. 2025-02-27 13:10:41 +08:00
1bffa5e921 README: add note for #9
Some checks failed
melpazoid / build (push) Has been cancelled
2025-02-22 16:21:36 +03:00
b8bff27bbd eshell-atuin: fix byte compile 2024-05-20 01:00:22 +03:00
952e663839 eshell-atuin: support TRAMP host filtering 2024-05-20 00:44:05 +03:00
256982e335 readme: add filter mode 2024-05-20 00:31:41 +03:00
1e0e2503b5 eshell-atuin: switch filter mode 2024-05-20 00:23:12 +03:00
83f5011711 eshell-atuin: reset cache on update search options 2024-05-19 23:50:22 +03:00
a2565bf599 readme: add MELPA 2024-04-12 12:51:11 +03:00
1b71d4c180
Merge pull request #7 from jeffkreeftmeijer/eshell-bol-ignoring-prompt
Use eshell-bol-ignoring-prompt on Emacs 30
2024-04-09 12:32:39 +03:00
Jeff Kreeftmeijer
4e599d2c2a
Use eshell-bol-ignoring-prompt on Emacs 30
Currently, the `eshell-atuin--get-input` function uses the
`beginning-of-line` function to move the point to the beginning of the
line (before the prompt). It then checks if the prompt is present
through `looking-at-p` to ensure the current line is a command instead
of output that's scrolled back to.

This works on Emacs 29, but the behaviour of the `beginning-of-line`
function changed in Emacs 30. There, it doesn't actually move the
point before the prompt, but behaves like `eshell-bo`l function (which
is also deprecated on Emacs 30, in favor of using `beginning-of-line`).

To get eshell-atuin to work on Emacs 30, it therefor needs to use
`eshell-bol-ignoring-prompt` instead of `beginning-of-line`.

This patch adds `eshell-atuin--bol-ignoring-prompt`, which calls
`eshell-bol-ignoring-prompt` if available, and falls back to
`beginning-of-line` if it doesn't. This fixes compatibility with Emacs 30.
2024-04-08 17:39:39 +02:00
3113b9a7ea
Merge pull request #6 from jeffkreeftmeijer/dont-require-match
Don't require history matches in completing-read
2024-04-05 12:17:49 +03:00
Jeff Kreeftmeijer
efaea1ef9f
Don't require history matches in completing-read
Currently, eshell-atuin's `eshell-atuin-history` doesn't allow
inserting commands that aren't yet in the history. This patch proposes
unmatched commands are inserted even if they don't match.

Consider the following scenario; you're running eshell-atuin with
`eshell-atuin-history` bound to `C-r`. In Eshell, you type part of a
command, let's say `ls`. Because the command you're looking for should
be in Atuin's database, you press `C-r` and find `ls -l`. That's
helpful, but not the full command you're looking for. You press
`<tab>` to insert the match and add `ah` to get `ls -lah`, the command
you meant to execute. However, after pressing `<ret>`, you find that
eshell-atuin won't let you insert a command that's not in the history
yet.

This patch flips the `REQUIRE-MATCH` boolean in the `completing-read`
call in `eshell-atuin-history` to `nil`, allowing for commands that
aren't in the history yet.

The resulting `compl` variable, which holds the command is then used
to find the command in the history. This is done to make sure any
changes to `eshell-atuin-history-format` don't affect the inserted
command. However, because there is no match in the history in this
scenario, the `command` variable remains empty.

In the end, what's inserted is either the cleaned `command` variable
which mached in the history, or the `compl` variable that didn't
match, and is inserted as-is.
2024-04-05 00:00:26 +02:00
405788b4c5
Add MELPA badge 2024-04-01 17:34:02 +03:00
0731963667
Merge pull request #5 from purcell/patch-1
Fix typo in description line, and broken URL
2024-04-01 17:14:53 +03:00
Steve Purcell
2ea6beeb6e
Fix typo in description line, and broken URL 2024-04-02 00:19:10 +13:00
24ac9fac36 eshell-atuin: use with-environment-variables for ATUIN_SESSION (#4) 2024-03-12 18:46:05 +03:00
a7ec9718b2 eshell-atuin: add default values for format-spec (#2) 2024-03-09 13:05:31 +03:00
8415f1a5aa eshell-atuin: add flag to turn off --duration (#3) 2024-03-09 12:58:56 +03:00
5d206c3192 readme: add sentence 2024-03-08 20:39:12 +03:00
b0ff8ec5b8 shell-atuin: fix CI (x2) 2024-03-08 20:35:53 +03:00
c09e4f7bf5 eshell-atuin: fix CI 2024-03-08 20:31:50 +03:00
a56dd797b1 readme: add 2024-03-08 20:25:34 +03:00
26a8dcf7b1 eshell-atuin: replace avl-tree with list & add docs 2024-03-08 19:48:25 +03:00
1ccac4b746 eshell-atuin: history works 2024-03-07 22:58:38 +03:00
5043d8b879 eshell-atuin: fix post-exec 2024-03-07 22:58:30 +03:00
1e7ccba75c eshell-atuin: initial commit 2024-03-07 22:58:15 +03:00