aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-dotfiles/src
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2024-05-02 16:53:38 +0100
committerGitHub <noreply@github.com>2024-05-02 16:53:38 +0100
commit0639ff49604a44b3c487110860f511ac9b426e60 (patch)
treec4a2f597e5477f01e6111565758aa3b0c192c8d5 /crates/atuin-dotfiles/src
parentrefactor: preview_auto to use enum and different option (#1991) (diff)
downloadatuin-0639ff49604a44b3c487110860f511ac9b426e60.zip
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
Diffstat (limited to 'crates/atuin-dotfiles/src')
-rw-r--r--crates/atuin-dotfiles/src/shell.rs2
1 files changed, 1 insertions, 1 deletions
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<Shell>) -> Result<Vec<Alias>, 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<Vec<Alias>> {
+pub async fn import_aliases(store: &AliasStore) -> Result<Vec<Alias>> {
let shell_aliases = existing_aliases(None)?;
let store_aliases = store.aliases().await?;