* chore(build): compile protobufs with protox
protox is a pure-rust implementation of the protobuf compiler.
Therefore, it can be managed by cargo.
This removes the implicit dependency on protoc being available
in the environment for the build.
* fix(build): replace copypasta in build script
The paths passed to `compile` aren't actually used by the build.
`skip_protoc_run` prevents that.
That's why a clean build succeeds even with this mistake.
However, the paths are passed to a `cargo:rerun-if-changed` directive.
So this mistake would've caused a failed incremental build if the
protobuf definitions were changed.
* fix: gracefully exit on windows
* feat(daemon): tcp support for windows
* feat(daemon): add tcp port configuration
* fix: logging and fix compiler error
* docs: add build dependency to the readme
fix(docs): move a line up
* fix: missing field error
* docs: adds the daemon section to the default config
* fix: clippy and fmt
* feat: Update README.md
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
* refactor: changes tcp port and other stuff as per request
* fix(config): update default tcp port in example config
* fix: complier error on unix
* refactor: make the cfg stuff look better
---------
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
* 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>
* fix(bash): add a guard for interactive shells
* fix(bash): add a guard for the Bash version
* fix(bash): localize READLINE_LINE in bash < 4
In bash < 4, the variables READLINE_LINE and READLINE_POINT are not
supported for the shell commands called by `bind -x`. Even if it is
not supported, atuin works in not a bad way. However, this sometimes
causes a strange behavior by the remaining values of READLINE_LINE set
in the previous calls of __atuin_history. In bash < 4, we can
consistently use an empty string instead of $READLINE_LINE, and the
changes to READLINE_LINE and READLINE_POINT should be localized within
the function.
* fix(bash): add guard for double initialization
In bash, it is customary to reload the settings by sourcing `.bashrc`
again after modifying it. In such a case, `eval "$(atuin init bash)"`
is executed again. This registers duplicate hooks to
`preexec_functions` and `precmd_functions`. To prevent this in this
patch, we introduce an include guard, so that the initialization is
not performed more than once.
* feat(bash): check version of ble.sh
blehooks are only supported in ble.sh >= 0.4, so we require the ble.sh
version to be larger or equal to 0.4. We also describe the version
requirement in README.md.
* fix(bash): use ble.sh's contrib/integration/bash-preexec
ble.sh provides module "contrib/integration/bash-preexec", which can
be used with the same interface as bash-preexec. This module provides
"preexec_functions" and "precmd_functions" without requiring
bash-preexec.
This module also properly handles it when both ble.sh and bash-preexec
are loaded; the module resolves the conflicts between ble.sh and
bash-preexec, and the module also tries to support bash-preexec in the
detached state of ble.sh.
* fix(bash): use ble.sh's accept-line widget for enter_accept
In ble.sh, one can directly call the widget "accept-line" from a shell
script. The widget "accept-line" is the actual widget that reserves
the command execution in ble.sh, so calling "accept-line" is
equivalent to the normal execution. It includes all the necessary
adjustments and processing including stty and history.
In addition, the command will be executed at the top-level context
instead in a function scope. For example, without ble.sh, running
"declare -A dict=()" through enter_accept will create an associative
array in the function scope unexpectedly. With ble.sh, since the
command is executed at the top-level context, such a problem does not
happen.
When ble.sh is in a detached state, we fall back to the manual
execution of the command. In this case, we cannot assume the
existence of the shell function "__bp_set_ret_value", so we always use
__atuin_set_ret_value.
* 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