aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-common/src/utils.rs (follow)
Commit message (Collapse)AuthorAge
* chore: move crates into crates/ dir (#1958)Ellie Huxtable2024-04-18
| | | | I'd like to tidy up the root a little, and it's nice to have all the rust crates in one place
* perf(dotfiles): cache aliases and read straight from file (#1918)Ellie Huxtable2024-04-03
| | | | | | | | | | | | | * cache aliases when set locally * handle rebuild on sync and tidy things a bit * support all shells except nu * make clippy happy * fmt * fix for no features
* chore(ci): run rust build/test/check on 3 platforms (#1675)Ellie Huxtable2024-02-05
| | | | | | | * chore(ci): run rust build/test/check on 3 platforms * need to properly test windows * do not need to strip here, and windows has a suffix anyway
* Add xonsh support (#1375)Matthieu LAURENT2024-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add basic xonsh support * Add init xonsh command * Add Xonsh install instructions in docs * Add xonsh ctrl-R search * update xonsh script and instructions Summary of changes: * Added duration to postcommand hook * Switched main search operation to use `subproccess.run()` rather than running as an xonsh shell command - this a) allows us to capture stderr without needing a temporary file and b) avoids a weird broken-buffer state that results from running a fullscreen TUI and then programmatically editing the buffer * Added support for immediately executing chosen command via `__atuin_accept__:` (like bash/zsh/fish) * strip newline from command before sending to atuin * Add basic xonsh support * Add init xonsh command * Add xonsh ctrl-R search * Remove advanced-install guide (was accidentally re-added during rebase) * Clean up Xonsh doesn't import private functions into the local namespace when sourcing a file * Add xonsh ro readme * Respect ATUIN_NOBIND * Format with black, and improve PEP8 compliance * Add up search * Format rust code --------- Co-authored-by: Joseph Montanaro <jfmonty2@gmail.com>
* Escape control characters using caret notation (#1585)Peter Holloway2024-01-18
| | | Instead of using their equivalent hex codes.
* Stop control characters being printed to terminal (#1576)Peter Holloway2024-01-17
| | | | | | | | | | | | | | | | | | | | | If a previous command in the history contained a literal control character (eg via Ctrl-v, Ctrl-[), when the command was printed, the control character was printed and whatever control sequence it was part of was interpreted by the terminal. For instance, if a command contained the SGR sequence `^[[31m`, all subsequent output from `atuin history list` would be in red. Slightly less of a problem, control characters would also not appear in the interactive search widget although they would be printed when selected. This meant `echo '^[[31foo'` would appear as `echo '[31foo'`. When the entry was selected, the same problem as before would occur and, for the example above, `echo 'foo'` would be printed with 'foo' in red. When copied, this command would not behave the same as the original as it would be missing the control sequence. This adds an extension trait to add a method to anything that behaves like a string to escape ascii control characters and return a string that can be printed safely. This string can then be copied and run directly without having to add the control characters back.
* chore(deps): uuidv7 stable (#1451)Conrad Ludgate2023-12-16
|
* Add bash support to `enter_accept` (#1316)Ellie Huxtable2023-10-21
|
* Add fish support for `enter_accept` (#1315)Ellie Huxtable2023-10-20
| | | | | | | | * Add fish support for `enter_accept` Also fixes shell detection. Who trusted me to write jetlagged code last night huh? * Document
* Add enter_accept to immediately execute an accepted command (#1311)Ellie Huxtable2023-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * make enter execute the command, tab copy it * Add config for enter_accept enter_accept will make Atuin immediately accept an execute a command when selected. It defaults to false in our binary, but the default config enables it. This means that users who already use atuin will not default to the new behaviour unless they opt in, but new users will have it by default. Thanks to @davidhewitt for the patch and bulk of this implementation! Currently we have it just for zsh, but I'll follow up with other shells (unless anyone beats me to it :D) * Add docs * we need to tidy up the ui code anyway * Check if using zsh * Update docs/docs/config/config.md Co-authored-by: Conrad Ludgate <conradludgate@gmail.com> --------- Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>
* replace chrono with time (#806)Conrad Ludgate2023-09-11
| | | | | | | | | * replace chrono with time * Fix test chrono usage --------- Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
* Run formatting (#1202)Ellie Huxtable2023-08-30
|
* Add workspace mode, enable if in git repo (#1053)Ellie Huxtable2023-07-14
| | | | | | | | | * Add workspace mode, enable if in git repo * Fix tests * Should now be good * Page filter modes correctly if in workspace
* Switch to uuidv7 (#864)Ellie Huxtable2023-04-11
| | | | | | | | | * Add uuid_v7 * Actually use the new uuid * Add a test to ensure all uuids are unique, even in a tight loop * Make clippy happy
* chore: use fork of skim (#803)Conrad Ludgate2023-03-26
| | | | | | | | | * use fuzzy-matcher instead of skim switch to a search-engine abstraction * fmt * fix deprecated warnings
* Prefer PWD environment variable over cwd if available to better support ↵Patrick Decat2023-03-14
| | | | symbolic links (#783)
* Windows support (#754)YummyOreo2023-03-05
| | | | | | | | | | | | | | | | | | | * adds support for getting home dir in windows * fixes bug * adds windows server support + build for linux ^| todo: test server on linux * improvements to redability * removes comment * returns if windows when importing auto * this should be here, to prevent double inputs * adds explanation to why we have to throw away 1 event in the tui * better message when running atuin import on windows + spell fix
* Fix race condition in directory tests (#748)cyqsimon2023-03-02
|
* history list (#340)Conrad Ludgate2022-04-25
|
* Bump uuid from 0.8.2 to 1.0.0 (#311)dependabot[bot]2022-04-22
| | | | | | | | | | | | | | | | | | | | | * Bump uuid from 0.8.2 to 1.0.0 Bumps [uuid](https://github.com/uuid-rs/uuid) from 0.8.2 to 1.0.0. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/0.8.2...1.0.0) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * patch Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
* refactor (#327)Conrad Ludgate2022-04-22
|
* Initial implementation of calendar API (#298)Ellie Huxtable2022-04-13
| | | | | | | | | | | This can be used in the future for sync so that we can be more intelligent with what we're doing, and only sync up what's needed I'd like to eventually replace this with something more like a merkle tree, hence the hash field I've exposed, but that can come later Although this does include a much larger number of count queries, it should also be significantly more cache-able. I'll follow up with that later, and also follow up with using this for sync :)
* Re-add macro_use to atuin-common (#107)Ellie Huxtable2021-05-10
| | | | | | | | | | | * Re-add macro_use to atuin-common When build as a dependency, the macro is available from another crate. When you try to build common by itself, the macro is not found. Magic, huh? * chore: remove unneeded use - clippy is confused Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>
* fix some bugs (#90)Conrad Ludgate2021-05-09
| | | | | * fix some bugs * format
* Update docs, unify on SQLx, bugfixes (#40)Ellie Huxtable2021-04-25
| | | | | | | | | * Begin moving to sqlx for local too * Stupid scanners should just have a nice cup of tea Random internet shit searching for /.env or whatever * Remove diesel and rusqlite fully
* Use cargo workspaces (#37)Ellie Huxtable2021-04-20
* Switch to Cargo workspaces Breaking things into "client", "server" and "common" makes managing the codebase much easier! client - anything running on a user's machine for adding history server - handles storing/syncing history and running a HTTP server common - request/response API definitions, common utils, etc * Update dockerfile