| Commit message (Collapse) | Author | Age |
| ... | |
| | | |
|
| | |
| |
| |
| | |
also parse query in one place
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Here is my case:
```sh
curl -X POST https://example.com/api \
-H "Content-Type: application/json" \
-d '{
"username": "name",
"password": "pass",
"details": {
"age": 30,
"location": "Earth"
}
}'
```
Using current release version i got:
```sh
curl -X POST https://example.com/api \\
-H "Content-Type: application/json" \\
-d '{\
"username": "name",\
"password": "pass",\
"details": {\
"age": 30,\
"location": "Earth"\
}\
}'
```
and i test with `echo \\`
(https://github.com/atuinsh/atuin/pull/100#issuecomment-836477081) it
also works;
there is similar PR https://github.com/atuinsh/atuin/pull/2390, it only
works on multiline with `\` suffix, in my case i got:
```sh
curl -X POST https://example.com/api \
-H "Content-Type: application/json" \
-d '{\
```
## Checks
- [x] 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
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Configure the interactive search UI appearance. Resolves #998
```toml
[ui]
columns = ["duration", "time", "command"]
```
### `columns`
Default: `["duration", "time", "command"]`
Columns to display in the interactive search, from left to right. The
selection
indicator (`" > "`) is always shown first implicitly.
Each column can be specified as:
- A simple string (uses default width): `"duration"`
- An object with type and optional width/expand: `{ type = "directory",
width = 30 }`
#### Available column types
| Column | Default Width | Description |
| --------- | ------------- |
----------------------------------------------- |
| duration | 5 | Command execution duration (e.g., "123ms") |
| time | 8 | Relative time since execution (e.g., "59m ago") |
| datetime | 16 | Absolute timestamp (e.g., "2025-01-22 14:35") |
| directory | 20 | Working directory (truncated if too long) |
| host | 15 | Hostname |
| user | 10 | Username |
| exit | 3 | Exit code (colored by success/failure) |
| command | * | The command itself (expands by default) |
#### Column options
- **type**: The column type (required when using object format)
- **width**: Custom width in characters (optional, uses default if not
specified)
- **expand**: If `true`, the column fills remaining space. Default is
`true` for `command`, `false` for others. Only one column should have
`expand = true`.
#### Examples
```toml
# Minimal - more space for commands
columns = ["duration", "command"]
# With custom directory width
columns = ["duration", { type = "directory", width = 30 }, "command"]
# Show host for multi-machine sync users
columns = ["duration", "time", "host", "command"]
# Show exit codes prominently
columns = ["exit", "duration", "command"]
# Make directory expand instead of command
columns = ["duration", "time", { type = "directory", expand = true }, { type = "command", expand = false }]
```
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not just pick first from search.filters, consider all options,
filtering based on git-root and workspaces config
Fix: atuinsh/atuin#2700
Might Fix: atuinsh/atuin#2536
Wrote a few simple unit tests, and tried it by running the client
locally. Not sure about which of "[search] filters" vs "workspaces"
should be more respected, so i made it so if workspaces = false,
regardless of whats in "[search] filters" workspace gets filtered out.
First time looking at atuins code, let me know if this needs any
changes.
edit: (from my post here:
https://github.com/atuinsh/atuin/issues/2536#issuecomment-2808053862)
```
workspaces = true
[search]
filters = [ "workspace", "directory", "session", "global" ]
```
| `^R` for the ... time| in a git repo | any other dir|
| ------------- | ------------- | ------------- |
| first | workspace | directory|
| second | directory | session|
| third| session | global|
| fourth | global | directory |
| fifth | workspace | session|
| sixth | directory | global |

<!-- 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
- #1655 might be related, but it seems to also implement code that is
already merged, and has been open for over a year, hope its ok to
suggest this
---------
Co-authored-by: Michelle Tilley <michelle@michelletilley.net>
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<!-- 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 -->
The original implementation of the `replxx` importer, from PR #2024,
only supported `.histfile` as a filename for the history file, since
there is no default filename. However, the replxx codebase does use
`replxx_history.txt` as an example history filename (see
[here](https://github.com/AmokHuginnsson/replxx/blob/release-0.0.4/examples/c-api.c#L183)
and
[here](https://github.com/AmokHuginnsson/replxx/blob/release-0.0.4/examples/cxx-api.cxx#L383)),
so this patch adds support for that as an alternative filename.
The implementation was modeled after [the
one](https://github.com/atuinsh/atuin/blob/v18.10.0/crates/atuin-client/src/import/zsh.rs#L29-L44)
currently used for the `zsh` history file importer, which also means the
`replxx` importer now produces a human-friendly error if no history file
is found in the expected path(s).
## 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
/cc @amosbird who introduced this importer in #2024.
|
| |
|
|
|
| |
Reverts atuinsh/atuin#2932
Resolves #2960
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
### What does this PR do?
Adds simple navigation to the inspector, to explore a session starting
from a single command. This creates a new user flow, where a user can
find a history entry in the interactive view (in, say, Global mode), and
hit Ctrl+o to navigate back and forward through that command's session.
IMAGINED USE-CASE: I remembered that I did a sequence of git steps but I
can't remember the order and forgot to document it. I remember that
`reflog` was involved and want to see the actual sequence, and only
those commands.
IMAGINED USE-CASE: I used a curl command to get my IP address for
greenlisting before I connected to the bastion server `abc.xyz` over SSH
- I could easily find the SSH command with abc.xyz, and go back one step
in the session, but without this change, scrolling through all my curl
commands ever run to find a forgotten URL/domain would be too much work.
Since this gives the inspector tab a broader purpose than viewing
analytics, it needs to function even when there are not enough screen
rows for charts -- hence, this PR also introduces an ultracompact mode
for the inspector that _just_ shows the neighbouring history commands
(as simple scrolling three-entry list, with no panes) if there are fewer
than `auto_hide_height` rows (default: 8). Otherwise, the inspector
behaves as normal, except that Up / Down will change the focused command
by navigating through the session. That means there is no "compact" mode
for the inspector - when the interactive search is compact (but not
ultracompact), the inspector shows its usual chart view.
The UX for this could be improved - to keep this PR as lean as it
realistically can be, I have tried to keep the flow very minimal, but a
follow-up PR could introduce some tooltips, nicer ultracompact
formatting, etc.
A minor QoL improvement that comes with this - since I had to deal with
bold text and would otherwise have need a theming exception, I took the
opportunity to ensure the theme engine sets styles completely (so a
theme can have bold), not just colours. To limit scope creep, I do not
add TOML syntax so (for now) you can only customize colours from config
files, but it means that default-bold text (etc.) can now use the
theming engine if the code-defined default Meaning is bolded.
Key changes:
* introduces a simplified inspector tab, with only previous-current-next
commands as rows, in compact mode
* allows navigation through session history within the inspector (so
compact inspector view is still useful)
It also (see comments below):
* makes `compact` into `compactness`, an enum (to better standardize
across inspector/interactive)
* makes the inspector _only_ change layout for ultracompact mode, which
is still compact+(height<8)
* clippy's complexity limit wanted draw split up a little, so not sure
if this is a reasonable minimal way to do so for now
* adds a `(none)` theme to the theming to enable output testing without
styling
* ~~additional tests, although keen for input on how best to do these~~
one functional test, as a starting point
* ~~documentation~~ [minor doc changes
only](https://github.com/atuinsh/docs/pull/72), as I am not sure there
is much to say
<!-- 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 -->
_Was stacked on #2357, which is now in `main`_
## 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds an `atuin import powershell` command.
Of course, it is related to #2543 but I'm submitting it as a separate PR
since the code is self-contained and simple enough, and the feature
could be useful on its own.
/cc @ajn142 who [requested
it](https://github.com/atuinsh/atuin/issues/84#issuecomment-3091692807).
## 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
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change introduces (optional) acceptance keys of Backspace and Left
Arrow, when at the start of a line. These two are common muscle memory
actions for users.
The configuration defaults to false so as not to disrupt existing user
patterns.
This also adds a test that exercises the various acceptance modes, which
as it turns out was quite easy to do.
I discussed this on discord where [Ellie suggested I raised an
issue](https://discord.com/channels/954121165239115808/1421180955657244703/1422642337481228400),
but I felt like a PR would be more tangiable. I've tested this locally
and I'm very happy with how these keys work, it fits my needs well.
`exit_past_line_start` and `accept_past_line_start` can technically
co-exist. When this happens `accept_past_line_start` takes precedence.
Is this okay, or should we reconsider the config? Perhaps
`acceptance_keys = []` would be better here? I'm very open to changes
here.
<!-- 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
|
| | |
|
| | |
|
| |
|
|
|
|
| |
session start
This mode mimics the default behavior for many shells.
|
| |
|
|
|
|
| |
- Config option: show_numeric_shortcuts (default: true)
- When false, hide 1–9 numeric badges; keep indicator on selected row
- Example key added to example config.toml
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This parses the daemon.socket_path config item to allow it to be set to something like `"${XDG_RUNTIME_DIR}/atuin.sock"`.
Fixes https://github.com/atuinsh/atuin/issues/2490.
<!-- 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
|
| |
|
|
| |
ATUIN_CONFIG_DIR is respected (#2707)
|
| |
|
|
|
|
|
|
|
| |
* fix: honor timezone in inspector stats
fixes: #2567
* docs: fix rustdoc warning about URL markup
* fix: pass timezone by value, as suggested by clippy (oops)
|
| | |
|
| | |
|
| |
|
|
|
| |
* feat: add info for 'official' plugins
* fix default features
|
| |
|
|
|
|
|
| |
* feat: command chaining
Allow for smart completion of commands ending in && or ||
* fmt
|
| |
|
|
|
|
|
|
|
| |
* chore: update to rust 1.88
* clippy + fmt
* update ci version
* update flake
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
* chore: Allow setting script DB path
* Rename scripts.database_path setting to scripts.db_path to match other crates
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat: add atuin-scripts crate
* initial
* define record types
* wip
* wip
* mvp
* add show command, make stdin work
* rewrite execution to use shebang and script file ALWAYS
* rename show -> get, allow fetching script only
* fmt
* clippy
* a bunch of fixes to the edits
* update lock
* variables
* fmt
* clippy
* pr feedback
* fmt
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix: typeerror in client sync code
Fixes #2645
This is really weird
1. I have not touched this code in _years_. It has not changed. In
recent rust versions, it has a typeerror (see linked issue)
2. This does not occur when running `cargo build`, in release mode or
otherwise. It only occurs with `cargo install`
3. I can't find any other occurences of this typeerror online - unsure
if it is a compiler regression? The code here is not very complex at
all.
* chore(clippy): remove unused imports
|
| |
|
|
| |
(#2407)
|
| |
|
|
|
|
| |
Xonsh history import was failing (in the default xonsh configuration)
because $HISTFILE is actually a directory in that case. This change sets
up the xonsh import to check for a *directory* instead of a regular
file, and makes it clearer that other importers expect a regular file.
|
| |
|
|
|
|
|
|
|
| |
* chore: upgrade to 2024 edition
* ugh unsafe
* format
* nixxxxxxxxxxx why
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Check atuin setting paths (eg. `db_path`) for broken symlinks on
initialization and disable all shell hooks + print error message.
sqlite doesn't create db files even with `.create_if_missing` when the
db files are a broken symlink. This would cause sqlite to error and
atuin to panic on every single keypress.
Also improves related error handling when calling atuin client commands
directly.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat: make new arrow key behavior configurable
The arrow key behavior in interactive search was changed in #2453,
make it configurable via keys.exit_past_line_start and
keys.accept_past_line_end
* Update crates/atuin-client/config.toml
* Update crates/atuin-client/config.toml
* Update crates/atuin-client/config.toml
* I've made so many typos with these, sorry
---------
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
|
| | |
|
| |
|
|
|
|
|
| |
Improves the performance of `History::should_save` by constructing the
`SECRET_PATTERNS` `RegexSet` only once with a `LazyLock`.
This speeds up `atuin history prune` by ~100x (~7s to ~70ms on my
machine) (lol).
|
| | |
|
| |
|
|
| |
Use `if let` rather than `is_some()` followed by `unwrap()`, and coerce
errors instead of calling `unwrap()` when available.
|
| |
|
|
|
|
|
| |
Update to use AWS env vars as documented, replace duplicated entries
AWS_SECRET_ACCESS_KEY the secret paired to Access Key IDs
AWS_SESSION_TOKEN the secret session token for STS sessions
|