From 2f9df9350d5b645c867a440e63071d323fd53409 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Fri, 20 Oct 2023 07:57:29 +0100 Subject: 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 --- atuin-common/src/utils.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'atuin-common/src') 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)] -- cgit v1.3.1