Skip to content

fix(dotfiles): allow clearing aliases, disable import#1995

Merged
ellie merged 2 commits intomainfrom
ellie/alias-clear
May 2, 2024
Merged

fix(dotfiles): allow clearing aliases, disable import#1995
ellie merged 2 commits intomainfrom
ellie/alias-clear

Conversation

@ellie
Copy link
Copy Markdown
Member

@ellie ellie commented May 2, 2024

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?

Checks

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • I have checked that there are no existing pull requests for the same thing

ellie added 2 commits May 2, 2024 16:29
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?
@ellie ellie merged commit 0639ff4 into main May 2, 2024
@ellie ellie deleted the ellie/alias-clear branch May 2, 2024 15:53
@tessus

This comment was marked as spam.

@ellie
Copy link
Copy Markdown
Member Author

ellie commented May 2, 2024

No matter what? The intent is for it to allow deleting all aliases to remove Atuin set config

I'm not sure on a use case for only deleting imported aliases - this was prompted by the linked issue but I think it's a good thing to have regardless. I should probably have clarified a bit better in the PR body

@tessus

This comment was marked as spam.

@ellie
Copy link
Copy Markdown
Member Author

ellie commented May 3, 2024

Ah I see! No, it doesn't. Run is part of the atuin dotfiles alias command, which contains a pattern match. The pattern match switches based on which subcommand is required, so whether that's alias set, alias clear, etc.

@tessus

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants