diff options
| author | Ellie Huxtable <ellie@elliehuxtable.com> | 2023-10-20 07:57:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-20 07:57:29 +0100 |
| commit | 2f9df9350d5b645c867a440e63071d323fd53409 (patch) | |
| tree | 81c35715b3122726edf32221f65425b547538bed /atuin-common/src/utils.rs | |
| parent | Add enter_accept to immediately execute an accepted command (#1311) (diff) | |
| download | atuin-2f9df9350d5b645c867a440e63071d323fd53409.zip | |
Add fish support for `enter_accept` (#1315)
* Add fish support for `enter_accept`
Also fixes shell detection. Who trusted me to write jetlagged code last
night huh?
* Document
Diffstat (limited to 'atuin-common/src/utils.rs')
| -rw-r--r-- | atuin-common/src/utils.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/atuin-common/src/utils.rs b/atuin-common/src/utils.rs index cd2cd4dc..65fa40cf 100644 --- a/atuin-common/src/utils.rs +++ b/atuin-common/src/utils.rs @@ -115,7 +115,12 @@ pub fn get_current_dir() -> String { pub fn is_zsh() -> bool { // only set on zsh - env::var("ZSH_VERSION").is_ok() + env::var("ATUIN_SHELL_ZSH").is_ok() +} + +pub fn is_fish() -> bool { + // only set on zsh + env::var("ATUIN_SHELL_FISH").is_ok() } #[cfg(test)] |
