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

Support aliases #21

Closed
alexpearce opened this issue Jan 4, 2016 · 4 comments
Closed

Support aliases #21

alexpearce opened this issue Jan 4, 2016 · 4 comments

Comments

@alexpearce
Copy link

I've come across bash scripts that define aliases, to shorten paths to executables for example, such as

# Source me
alias foobar='/path/to/some_long_executable_name.extension'

Sourcing such a script with bass does not convert the bash alias to a fish one. This can be seen interactively:

$ bass alias foobar='ls'
$ foobar
fish: Unknown command 'foobar'

As far as I can tell, bass works by comparing the output of bash's env before and after running the command passed to bass, so any aliases defined won't be captured.

bass could additionally compare the output of bash's alias, which prints all defined aliases.

@edc
Copy link
Owner

edc commented Apr 15, 2016

@alexpearce great idea. Not sure when I will have time to add that. Patch welcome though :)

@alexpearce
Copy link
Author

I can see if it can work, for sure.

Can you think of something that might make this a non-starter, or only applicable for certain aliases? I have a feeling I had something when I wrote the PR, but now I can't remember 😞

@marcosfede
Copy link

Is there any progress on this? I just found about bass and It's what I've been missing, but I wish my aliases script would work with fish

@edc
Copy link
Owner

edc commented Oct 7, 2016

Just added alias support. LMK if you run into issues:

$ bass alias "xx='echo lol'"
$ xx
lol

@edc edc closed this as completed Oct 7, 2016
@dpinol dpinol mentioned this issue Jan 3, 2018
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

No branches or pull requests

3 participants