Skip to content

Command setting in config does not work with aliases #202

Closed

Description

@alevikpes

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.

Activity

  1. alevikpes commented on Sep 1, 2020

    @alevikpes
    Author

    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.

  2. 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
  3. alevikpes commented on Sep 1, 2020

    @alevikpes
    Author

    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?

  4. 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
  5. mattrose commented on Sep 1, 2020

    @mattrose
    Member

    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.

  6. alevikpes commented on Sep 1, 2020

    @alevikpes
    Author

    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-directory is called directory in the config file. It took me some time to figure it out. And a couple of other things.

  7. mattrose commented on Sep 5, 2020

    @mattrose
    Member

    there's weird stuff here. Thanks for opening this.

  8. mattrose commented on Sep 8, 2020

    @mattrose
    Member

    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=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

  9. mattrose commented on Sep 8, 2020

    @mattrose
    Member

    So this was caused by two bugs, only one of which is in my power to fix.

  10. vanarp0915 commented on Aug 8, 2022

    @vanarp0915

    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=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

    Did anyone find a solve for this?

  11. mattrose commented on Aug 9, 2022

    @mattrose
    Member

    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.

  12. vanarp0915 commented on Aug 10, 2022

    @vanarp0915

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions