From 0639ff49604a44b3c487110860f511ac9b426e60 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Thu, 2 May 2024 16:53:38 +0100 Subject: fix(dotfiles): allow clearing aliases, disable import (#1995) * fix(dotfiles): allow clearing aliases, disable import At the moment there are far too many edge cases to handle importing aliases. 1. We need an interactive shell to print aliases. Without it, most shells won't report much. 2. Many people have their shells print things on startup (graphics, fortunes, etc). This could be detected as an attempt to set an alias. Rather than spend the next year finding import edge cases, I'm disabling it for now. There's probably a better way we can do this? * clippy --- crates/atuin-dotfiles/src/shell.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/atuin-dotfiles/src') diff --git a/crates/atuin-dotfiles/src/shell.rs b/crates/atuin-dotfiles/src/shell.rs index d4cacf8f..3e139819 100644 --- a/crates/atuin-dotfiles/src/shell.rs +++ b/crates/atuin-dotfiles/src/shell.rs @@ -136,7 +136,7 @@ pub fn existing_aliases(shell: Option) -> Result, ShellError> /// Import aliases from the current shell /// This will not import aliases already in the store /// Returns aliases that were set -pub async fn import_aliases(store: AliasStore) -> Result> { +pub async fn import_aliases(store: &AliasStore) -> Result> { let shell_aliases = existing_aliases(None)?; let store_aliases = store.aliases().await?; -- cgit v1.3.1