Closed josephrexme closed 7 years ago
Hey, nice catch!
historie
uses sindresorhus/execa
I'm not sure how can I make aliases work with that. This might be helpful: https://github.com/sindresorhus/execa#shell
If only it were only bash users using this we'd only have to change the command of execa to bash -i
. I can't find a shell agnostic way of looking in the startup configuration and being aware of aliases
As @sindresorhus mentioned in that issue you'd have to spawn it through an interactive shell. which is what I suggested with bash -i
but the goal is to make this shell agnostic hence why POSIX sh
is the default of execa, so it might be difficult to achieve that. What I'd suggest is that you don't try to run the command at all with historie. Check out how fzf handles this. When you run a command like vim **
it stdout the file name after providing you with suggestions. It doesn't run the command for you. Perhaps by doing this we'd escalate this problem.
I also tried this in ruby using carets to exec shell code and it couldn't expand aliases so I'll be closing this and hopefully we can just stdout the result of matching command rather than trying to run it from within historie
When historie suggests an alias then you go ahead to type that it gives
command not found
if it's an alias