Aliases doesn't work
janemba opened this issue · 9 comments
Helllo,
I am using zsh with oh-my-zsh and I'm storing aliases in $HOME/.oh-my-zsh/custom/aliases.zsh. How can I make it work with sway-launcher-desktop ?
Any thoughts on this ?
Sorry, I have zero experience with zsh.
But since the sway-launcher-desktop.sh
expects #!/usr/bin/env bash
as interpreter, it shouldn make that much of a difference.
What is it that does not work currently?
I just got an idea reading your reply. So I am using zsh
and as sway-launcher-desktop.sh
is a bash
script, my aliases cannot be read.
So I created a .bash_aliases
file with all my aliases:
zsh $ alias -L > .bash_aliases
Then I added the following in .bashrc
:
zsh $ cat .bashrc
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
So if I switch shell to bash
I got all aliases but still sway-launcher-desktop.sh
do not contain any aliases. Do I need a specific step to get aliases as a command in sway-launcher-desktop.sh
?
What is it that does not work currently?
I execute the launcher in terminal and aliases are not in list (even with bash
).
You can pass a custom TERMINAL_COMMAND
to run the resulting command through bash again, which will cause your .bashrc
to be read.
For example: TERMINAL_COMMAND="urxvt -e /bin/bash -i -c " sway-launcher-desktop
I tried the following:
TERMINAL_COMMAND="foot /bin/bash -i -c " .local/share/sway-launcher-desktop/sway-launcher-desktop.sh
The issue is the same no aliases are loaded in sway-launcher-desktop
. I have no idea if .bashrc
is read or not. When I'm trying the following: foot /bin/bash
, I can use my aliases.
Any update on this ?
Any update on this ? (x2)
Well I don't know what the launcher script itself could do to aid here since it is not concerned with any specific terminal or shell. Whatever the problem is, I really think it must be possible to solve it with the right TERMINAL_COMMAND
Well ok but how the launcher script read aliases ?