| Commit message (Collapse) | Author |
|
|
|
That helps remove duplicated code and rustc/cargo will now also show
dead code correctly.
|
|
|
|
This PR fixes a shell hang when daemon autostart happens from the
interactive search widget.
The bash/zsh/fish integrations run `atuin search -i` under command
substitution and swap stdout/stderr so the TUI can draw to the terminal
while the selected command is captured:
```sh
3>&1 1>&2 2>&3
```
This leaves fd 3 open in the atuin search process. If search autostarts
the daemon, the spawned long-running `atuin daemon start --daemonize`
inherits fd 3, the command-substitution pipe, so the shell keeps waiting
for EOF until the daemon is killed.
The fix: close fd 3 after the swap in the non-tmux bash/zsh/fish paths:
```sh
3>&1 1>&2 2>&3 3>&-
```
Tested on zsh; I still need to confirm for bash and fish. Near as I can
tell, the other shell integrations don't need this change.
Fixes #3499
|
|
This PR fixes two minor issues when using Atuin with fish's vim mode(s):
1. Add support for `fish_hybrid_key_bindings`: in addition to
`fish_vi_key_bindings`, fish also provides `fish_hybrid_key_bindings`,
which is a vi-based mode with some extra keybinds; but the key bind
check for `atuin search` only checks for the former.
2. The AI keybind inserts a `?` on the command line in vim mode even
though it can only be called from normal mode, when pressing `?`
normally does nothing.
|
|
The functionality to run a tmux popup has the problem that the command
runs as a child of the `tmux` *server* process, rather than the current
shell. One potential issue is that the `$PATH` is not forwarded to this
command, so the `atuin` command may not be found.
Fixes: https://github.com/atuinsh/atuin/issues/3182 (#3182)
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
|
|
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
Silent DB failures breaking shell when disk is full
When storage runs out (i.e. disk full), atuin breaks the shell by
continuously printing database errors for every character typed. This is
a fix to silence the DB errors
|
|
Resolves #3169
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
|
|
This PR fixes:
+ #3154
+ #3164
+ #3166
It changes the following:
+ Pass ATUIN_SESSION to tmux popup
+ Use `command rm` to bypass user-defined configs
+ Disable tmux popup by default
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
---------
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
|
|
This is a "continuation" of #1177 - which was a draft that used FIFOs
(named pipes) to get output from the popup, however this causes popup
not being closed properly, so in this PR I use tmpfile to store the
result and read after popup closes. @ellie could you review this PR
please?
P.S. Thank you @immae for sharing your idea!
## Feature
+ Option to use tmux popup window in `config.toml`
+ Customize window width/height in `config.toml`
+ Tmux display-popup for `zsh, bash, fish`
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
---------
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
|
eg, the user uses tmux, runs zsh again as a nested session, etc
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
|
|
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
|
|
|
|
The command chaining feature can be implemented without the prefix.
|
|
* feat: command chaining
Allow for smart completion of commands ending in && or ||
* fmt
|
|
I'd like to tidy up the root a little, and it's nice to have all the
rust crates in one place
|
|
* fix: pass search query in via env
* fix
|
|
* feat(search): introduce keymap-dependent vim-mode
* fix(zsh): provide widgets with specific keymaps
* fix(settings): unify "vim" and "keymap_mode"
|
|
* Fix fish integration on older fishes
- On fish 3.3 the bash-style `$(...)` doesn't work, we should use `(...)`
- Also quoting `"(moo)"` on older fishes gives a literal `moo`
- The result of a `(subcommand)` is a single token, so no need to quote it, anyway
Tested by making the change, executing `cargo run -- init fish --disable-up-arrow` and then
executing that shell script on a system with fish 3.3, as well as 3.6 and observing both still work.
Fixes #1562.
* Alternative way of fixing the problem. Compatible with 3.3 and 3.4+
|
|
When a child shell session is started from another shell session
(parent session), the environment variable ATUIN_HISTORY_ID set by the
parent session causes Atuin's precmd hook of the child session to be
unexpectedly performed before the first call of Atuin's preexec hook.
In this patch, we clear ATUIN_HISTORY_ID (possibly set by the parent
session) on the startup of the session.
|
|
|
|
|
|
|
|
|
|
Fixes 2 issues with the fish shell prompt when using `enter_accept`
1. Runs pre/post exec so the command is added to the atuin history.
2. Adds padding so that the repainting of the shell prompt doesn't overwrite the output.
This adds 2 lines of padding to account for prompts up to 2 lines tall, larger prompts will still cause repainting problems and smaller prompts will be getting an extra line.
|
|
Oops. `string match` is a bit too noisy, make it quiet. Also print the
match before executing it.
Resolve #1335
|
|
* Add fish support for `enter_accept`
Also fixes shell detection. Who trusted me to write jetlagged code last
night huh?
* Document
|
|
* clear history id
* fix nu
|
|
This was failing for commands that spanned multiple lines, and contained
a backslash.
Thanks to @saulrh for suggesting the fix! I just tested and pushed it.
Resolves #1211
Resolves #1232
|
|
* Try different workspace structure
Move main crate (atuin) to be on the same level with other crates in
this workspace
* extract common dependencies to the workspace definition
* fix base64 v0.21 deprecation warning
* questionable: update deps & fix chrono deprecations
possible panic sites are unchanged, they're just more visible now
* Revert "questionable: update deps & fix chrono deprecations"
This reverts commit 993e60f8dea81a1625a04285a617959ad09a0866.
|
|
|
|
* Rework `atuin init`
This allows users to disable the CTRL-R and Up Arrow bindings,
independently from one another
* Document --disable-{ctrl-r,up-arrow}
* Apply suggestions from code review
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
|
|
* Allow overriding filter and search modes from CLI arguments
* Use session filter mode for bash up key binding
* We precisely do not want to add quotes here so that all arguments are properly passed
* Add --shell-up-key-binding hidden command argument and filter_mode_shell_up_key_binding configuration option to allow customizing the filter mode used when atuin is invoked from a shell up-key binding
* Correct up binding for zsh
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
|
|
|
|
|
|
PR #420 addressed the existence of pagination in a fish prompt by trying
to track when pagination was enabled and disabled. This introduced
atuin-specific bindings for common keys: `\t`, `\e`, `\r`, and `\n`
which exports a variable and informs the `_autiun_search` function to
not show the TUI.
Fish has a commandline function that will instead tell you whether
pagination is enabled so the user doesn't need to keep track of that
state. This PR uses this function, `commandline -P` to replace the prior
TUI supression scheme. Removing these extra function calls allows us to
remove the additional bindings which were breaking fish vi key bindings.
Replacing the value for `bind -M insert \e` completely breaks vi mode by
blocking the user from exiting insert mode. By removing these extra
binds, this PR restores fish vi mode compatability.
|
|
|
|
The use of `--` in the shell scripts prevents clap attempting to parse
the command name as a flag, in the case that it starts with `--`.
|
|
binding on "up" can conflict with the default fish keybindings as when
in tab-completion mode, you are supposed to be able to use arrow keys
to navigate the grid of suggestions, however pressing "up" will open
the tui instead.
This attempts to work around it by tracking when the user is probably in
a tab completion mode by setting a variable that we use to determine
whether to open atuin or perform the default fish up action
|
|
|
|
|
|
* make a start on fish
* fix
* test
* enable fish
* fmt
* update histpath
set up fish init script
* update readme
* cover edge case
* fmt
* fix session variables
Co-authored-by: PJ <me@panekj.dev>
* respect NOBIND
Co-authored-by: PJ <me@panekj.dev>
* fix env var setting
Co-authored-by: PJ <me@panekj.dev>
* fix whitespace
Co-authored-by: PJ <me@panekj.dev>
* add fish to supported shells
Co-authored-by: PJ <me@panekj.dev>
|