| Commit message (Collapse) | Author |
|
That helps remove duplicated code and rustc/cargo will now also show
dead code correctly.
|
|
|
|
recording (#3358)
<!-- 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 -->
## Summary
Fix nushell history recording completely broken since v18.13.0. No
commands are recorded because `ATUIN_HISTORY_ID` is always set to an
empty string.
Closes #3308
## Root Cause
PR #3183 (first included in v18.13.0) changed the `_atuin_pre_execution`
hook:
```diff
- $env.ATUIN_HISTORY_ID = (atuin history start -- $cmd)
+ $env.ATUIN_HISTORY_ID = (atuin history start -- $cmd e>| complete | get stdout | str trim)
```
The intent was to silence DB errors (e.g. when disk is full) by using
`complete` to swallow failures. However, `e>|` redirects exclusively
stderr into the pipe, dropping stdout. `complete` then sees atuin's
stdout in the `stderr` field and the `stdout` field is empty. The result
is that `ATUIN_HISTORY_ID` is always empty, and no commands are ever
recorded.
All nushell versions are affected. Not only 0.111.0, as I incorrectly
wrote in [the
issue](https://github.com/atuinsh/atuin/issues/3308#issuecomment-4113840110).
## Fix
Replace `e>|` with `|`. The `| complete | get stdout` pattern still
silences errors: `complete` captures stdout, stderr, and exit code into
a record, and `get stdout` discards the rest, preserving the error
suppression from #3183 without breaking stdout capture.
## Testing
Tested with nix shells across three nushell versions (0.98, 0.103,
0.111):
**History recording:**
| Version | `e>\| complete \| get stdout` | `\| complete \| get stdout`
|
|---------|-------------------------------|------------------------------|
| 0.98 | empty (broken) | valid history ID |
| 0.103 | empty (broken) | valid history ID |
| 0.111 | empty (broken) | valid history ID |
**Error silencing** (verified `| complete | get stdout` on a failing
command):
| Version | Error shown to user? | stdout field |
|---------|---------------------|--------------|
| 0.98 | No | empty |
| 0.103 | No | empty |
| 0.111 | No | empty |
## 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
|
|
Fix issue introduced by #3249. Nushell 0.112 will introduce the breaking
change; not 0.111.
|
|
The flag for `job spawn` changed, which prevents the script from
compiling on Nushell 0.111+.
## 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
|
|
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
|
|
# Summary
Adjust the Nushell script to check the version and enable accept support
when Nushell 0.106.0 or greater is found.
See: https://github.com/nushell/nushell/pull/16193
<!-- 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
|
|
Since https://github.com/nushell/nushell/pull/16007, the recommended
flag is `--optional`. To avoid compatibility issues, the builtin optional
access syntax is used instead, which is backwards-compatible.
|
|
|
|
|
|
I'd like to tidy up the root a little, and it's nice to have all the
rust crates in one place
|
|
|
|
|
|
|
|
|
|
* refactor(nushell): update `commandline` syntax, closes #1733
* refactor(nushell): add backwards compatibility for *Nushell* v0.90.x
|
|
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.
|
|
|
|
* clear history id
* fix nu
|
|
fixes #1189
Co-authored-by: Daniel Carosone <dan@geek.com.au>
|
|
Co-authored-by: Andrea Jemmett <1787979+acidghost@users.noreply.github.com>
|
|
|
|
* 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.
|
|
|
|
* fix: join flags with ` `
* refactor: remove dependency on `sh`
|
|
|
|
|
|
* feat: add *Nushell* support
* refactor: use `sh` to swap `STDOUT` and `STDERR` instead of using a temporary file
* feat: include both keybindings, with the current REPL buffer passed to *Atuin*'s
* feat: don't record commands run by keybindings
|