You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Command setting in config does not work with aliases #202
Hi! Today I tried to change my layout and I was not able to save it - button just does not do anything. Adding new layout does not work as well. Moreover, in my old layout all working directories have gone and I am not able to set them up again, since the save does not work. I tried to modify the config file, but working_directory option does not work. I think, I was using it earlier to set up my working directories. Was there an update or something recently? Please let me know how to setup working directory in each terminal and how to run a custom command in each terminal. Thank you.
I found out that the option for the working directory should be called directory in the config file.
To set up the command I tried command, which breaks the config and terminator loads with some strange layout. This command option is added automatically to the config, if I change it in the gui's Custom command setting. If I try custom_command in the config, it does not do anything.
changed the title [-]Not able to save current layout and setup working directories[/-][+]Not able to save current layout and setup custom command for each terminal[/+]on Sep 1, 2020
It seems, it does not recognise my alias command, which is setup in my ~/.bash_profile, although this alias works fine in the terminator, if I execute it manually. I tried command = python3 in the config and it was working.
So, the question becomes: why is my alias not working and is there a way to make it working, when terminator starts?
changed the title [-]Not able to save current layout and setup custom command for each terminal[/-][+]Command setting in config does not work with aliases[/+]on Sep 1, 2020
Do you have "Run command as a login shell" checked off in Preferences -> Profiles -> Command? Bash initialization is kind of a black art and I always have to check which config files bash reads when it starts up in differing modes.
I am very happy about terminator. I think, it is the best terminal at the moment, although I should have adjusted most of the shortcuts for my wow. Having my alias working would be just another nice feature :-)
I have also noticed, that the manual is missing some parts about the config file. It is not mentioning that command line argument --working-directory is called directory in the config file. It took me some time to figure it out. And a couple of other things.
Good news: I found a problem with Terminator that means the "login_shell" option is not passed to the shell spawned.
Bad news: aliases do not get evaluated in bash, as far as I can tell.
If I put alias foo=ls in my .zprofile, and then run zsh -l -c foo it spits out my directory listing.
If I put alias foo=ls in my .bash_profile, and then run bash -l -c foo, I get bash: foo: command not found even though if I run alias in my .bash_profile it will list foo as an alias when I run the exact same command
Good news: I found a problem with Terminator that means the "login_shell" option is not passed to the shell spawned.
Bad news: aliases do not get evaluated in bash, as far as I can tell.
If I put alias foo=ls in my .zprofile, and then run zsh -l -c foo it spits out my directory listing.
If I put alias foo=ls in my .bash_profile, and then run bash -l -c foo, I get bash: foo: command not found even though if I run alias in my .bash_profile it will list foo as an alias when I run the exact same command
Activity
alevikpes commentedon Sep 1, 2020
I found out that the option for the working directory should be called
directoryin the config file.To set up the command I tried
command, which breaks the config and terminator loads with some strange layout. Thiscommandoption is added automatically to the config, if I change it in the gui'sCustom commandsetting. If I trycustom_commandin the config, it does not do anything.[-]Not able to save current layout and setup working directories[/-][+]Not able to save current layout and setup custom command for each terminal[/+]alevikpes commentedon Sep 1, 2020
It seems, it does not recognise my alias command, which is setup in my
~/.bash_profile, although this alias works fine in the terminator, if I execute it manually. I triedcommand = python3in the config and it was working.So, the question becomes: why is my alias not working and is there a way to make it working, when terminator starts?
[-]Not able to save current layout and setup custom command for each terminal[/-][+]Command setting in config does not work with aliases[/+]mattrose commentedon Sep 1, 2020
Do you have "Run command as a login shell" checked off in
Preferences -> Profiles -> Command? Bash initialization is kind of a black art and I always have to check which config files bash reads when it starts up in differing modes.alevikpes commentedon Sep 1, 2020
No, I have it on.
I am very happy about terminator. I think, it is the best terminal at the moment, although I should have adjusted most of the shortcuts for my wow. Having my alias working would be just another nice feature :-)
I have also noticed, that the manual is missing some parts about the config file. It is not mentioning that command line argument
--working-directoryis calleddirectoryin the config file. It took me some time to figure it out. And a couple of other things.mattrose commentedon Sep 5, 2020
there's weird stuff here. Thanks for opening this.
mattrose commentedon Sep 8, 2020
Good news and Bad news.
Good news: I found a problem with Terminator that means the "login_shell" option is not passed to the shell spawned.
Bad news: aliases do not get evaluated in bash, as far as I can tell.
If I put
alias foo=lsin my .zprofile, and then runzsh -l -c fooit spits out my directory listing.If I put
alias foo=lsin my .bash_profile, and then runbash -l -c foo, I getbash: foo: command not foundeven though if I runaliasin my .bash_profile it will list foo as an alias when I run the exact same commandmattrose commentedon Sep 8, 2020
So this was caused by two bugs, only one of which is in my power to fix.
vanarp0915 commentedon Aug 8, 2022
Did anyone find a solve for this?
mattrose commentedon Aug 9, 2022
There's a solve for this checked into master for the first issue, with terminator. I haven't found a solution for the issue with bash tho.
vanarp0915 commentedon Aug 10, 2022
I found an alternative method to do the task..
Follow this reference .
https://unix.stackexchange.com/questions/243850/use-aliases-as-custom-commands-in-terminator