Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Cross-shell aliases #226

Closed
edmcman opened this issue May 14, 2024 · 2 comments
Closed

Suggestion: Cross-shell aliases #226

edmcman opened this issue May 14, 2024 · 2 comments

Comments

@edmcman
Copy link

edmcman commented May 14, 2024

Is there a suggested way to add cross-shell aliases? I use fish, so right now I put them in both interactive.fish and interactive.sh which is annoying...

@balupton
Copy link
Member

balupton commented May 16, 2024

Many shells, including fish will support sourcing basic POSIX files, ie. I'm a fish shell user, but only have interactive.sh without an interactive.fish:
https://github.com/balupton/dotfiles/blob/master/config/interactive.sh

Try sourcing your interactive.sh file in your interactive.fish file, and if there is say a function or the like inside it which prevents fish compatibility, move the aliases out into an aliases.sh file which is sourced by interactive.sh and interactive.fish

For the long term, perhaps Dorothy could support say a aliases.json file, which then injects the aliases into each shell, or even better, a define_alias function implemented for each shell: #173

@edmcman
Copy link
Author

edmcman commented May 17, 2024

Thanks, I actually looked at your dotfile and didn't realize your aliases were imported to fish.

For now I'll split my aliases into a separate file since I have some stuff in interactive.sh that fish doesn't like.

@edmcman edmcman closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants