Rosettea / Hilbish

🌓 The Moon-powered shell! A comfy and extensible shell for Lua fans! 🌺 ✨
https://rosettea.github.io/Hilbish/
MIT License
505 stars 22 forks source link

[FAQ] How to add alias with | pipe? #201

Closed linuxmobile closed 2 years ago

linuxmobile commented 2 years ago

Hi, i want to know if there is a way to add commands like: "pacman -Q | fzf".

When i add this as a normal alias it return: image

I don't know too much about lua. Sorry if i'm a dumb!

linuxmobile commented 2 years ago

Oh. Ignore it.

I'll fix adding this: "sh -c 'pacman -Q | fzf'"

TorchedSammy commented 2 years ago

this was a problem with how hilbish and the sh interpreter work interactively. i just expanded the alias before going to the sh runner now, so it is fixed.

note that this still not work if you want to pipe to/from the alias (that never worked)

TorchedSammy commented 2 years ago

fyi before i fixed it you could have aliased to hilbish.runner.sh "<command here>" and that would be faster and less overhead

linuxmobile commented 2 years ago

fyi before i fixed it you could have aliased to hilbish.runner.sh "<command here>" and that would be faster and less overhead

Amazing!!! I will check it now. Thx u