Where to define shell aliases in configs for projects in tmuxinator?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












I define Bash aliases in my ~/.tmuxinator/*.yml files like this:



pre_window: alias cc=heh/path/that;alias ccc='cc clean; clear; cc' ;alias selenium-restart=bin/docker/restart-selenium-chrome ;alias yii=bin/docker/yii/yii


Is there a better way? It works, but, obviously, it is not convenient to add them like that.







share|improve this question



























    up vote
    1
    down vote

    favorite












    I define Bash aliases in my ~/.tmuxinator/*.yml files like this:



    pre_window: alias cc=heh/path/that;alias ccc='cc clean; clear; cc' ;alias selenium-restart=bin/docker/restart-selenium-chrome ;alias yii=bin/docker/yii/yii


    Is there a better way? It works, but, obviously, it is not convenient to add them like that.







    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I define Bash aliases in my ~/.tmuxinator/*.yml files like this:



      pre_window: alias cc=heh/path/that;alias ccc='cc clean; clear; cc' ;alias selenium-restart=bin/docker/restart-selenium-chrome ;alias yii=bin/docker/yii/yii


      Is there a better way? It works, but, obviously, it is not convenient to add them like that.







      share|improve this question













      I define Bash aliases in my ~/.tmuxinator/*.yml files like this:



      pre_window: alias cc=heh/path/that;alias ccc='cc clean; clear; cc' ;alias selenium-restart=bin/docker/restart-selenium-chrome ;alias yii=bin/docker/yii/yii


      Is there a better way? It works, but, obviously, it is not convenient to add them like that.









      share|improve this question












      share|improve this question




      share|improve this question








      edited Jul 30 at 2:16









      slm♦

      232k65479649




      232k65479649









      asked Jul 29 at 23:40









      jojman

      169112




      169112




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          Based on this ticket in tmuxinator's issue tracker titled: "pre" option not using zsh options, alias, configuration (running as sh) #286 it looks like you'd either do it as a pre: or a pre_window:. The OP to that ticket was trying pre:



          pre:
          - setopt clobber
          - source ~/projects/auv/devel/setup.zsh
          - stt


          and getting this error:



          > mux start auv-core
          sh: 13: setopt: not found
          sh: 13: source: not found
          sh: 13: stt: not found
          arranging in: main-vertical
          arranging in: main-vertical
          [exited]


          and one of the developers says this:




          Things like setopt, source and alias are all built in shell commands and don't make sense in a shell script.



          Your only option would be to put them in pre_window so send-keys is used in each window / pane.




          Based on this comment I think your only option is to use pre_window: as you're doing. You might want to take a different tactic rather than list all the aliases in a pre_window: directly, put them in a file:



          $ cat ~/my_aliases
          alias cc=heh/path/that
          alias ccc='cc clean; clear; cc'
          alias selenium-restart=bin/docker/restart-selenium-chrome
          alias yii=bin/docker/yii/yii


          and have a pre_window: like this:



          pre_window: source ~/my_aliases


          But your approach looks consistent with how the project intends you to use pre_window: at the very least.






          share|improve this answer





















          • I didn't realize for some reason that I can put commands in separate list items for pre/pre_window, thanks!
            – jojman
            Aug 3 at 1:21











          • By the way, what I'm doing is what your post suggests to be impossible. Bash aliases in pre_window work fine.
            – jojman
            Aug 3 at 1:23










          • @jojman - no you can put aliases in pre_window you can't put them in pre is what the thread stated.
            – slm♦
            Aug 3 at 1:26










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f459236%2fwhere-to-define-shell-aliases-in-configs-for-projects-in-tmuxinator%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          Based on this ticket in tmuxinator's issue tracker titled: "pre" option not using zsh options, alias, configuration (running as sh) #286 it looks like you'd either do it as a pre: or a pre_window:. The OP to that ticket was trying pre:



          pre:
          - setopt clobber
          - source ~/projects/auv/devel/setup.zsh
          - stt


          and getting this error:



          > mux start auv-core
          sh: 13: setopt: not found
          sh: 13: source: not found
          sh: 13: stt: not found
          arranging in: main-vertical
          arranging in: main-vertical
          [exited]


          and one of the developers says this:




          Things like setopt, source and alias are all built in shell commands and don't make sense in a shell script.



          Your only option would be to put them in pre_window so send-keys is used in each window / pane.




          Based on this comment I think your only option is to use pre_window: as you're doing. You might want to take a different tactic rather than list all the aliases in a pre_window: directly, put them in a file:



          $ cat ~/my_aliases
          alias cc=heh/path/that
          alias ccc='cc clean; clear; cc'
          alias selenium-restart=bin/docker/restart-selenium-chrome
          alias yii=bin/docker/yii/yii


          and have a pre_window: like this:



          pre_window: source ~/my_aliases


          But your approach looks consistent with how the project intends you to use pre_window: at the very least.






          share|improve this answer





















          • I didn't realize for some reason that I can put commands in separate list items for pre/pre_window, thanks!
            – jojman
            Aug 3 at 1:21











          • By the way, what I'm doing is what your post suggests to be impossible. Bash aliases in pre_window work fine.
            – jojman
            Aug 3 at 1:23










          • @jojman - no you can put aliases in pre_window you can't put them in pre is what the thread stated.
            – slm♦
            Aug 3 at 1:26














          up vote
          1
          down vote



          accepted










          Based on this ticket in tmuxinator's issue tracker titled: "pre" option not using zsh options, alias, configuration (running as sh) #286 it looks like you'd either do it as a pre: or a pre_window:. The OP to that ticket was trying pre:



          pre:
          - setopt clobber
          - source ~/projects/auv/devel/setup.zsh
          - stt


          and getting this error:



          > mux start auv-core
          sh: 13: setopt: not found
          sh: 13: source: not found
          sh: 13: stt: not found
          arranging in: main-vertical
          arranging in: main-vertical
          [exited]


          and one of the developers says this:




          Things like setopt, source and alias are all built in shell commands and don't make sense in a shell script.



          Your only option would be to put them in pre_window so send-keys is used in each window / pane.




          Based on this comment I think your only option is to use pre_window: as you're doing. You might want to take a different tactic rather than list all the aliases in a pre_window: directly, put them in a file:



          $ cat ~/my_aliases
          alias cc=heh/path/that
          alias ccc='cc clean; clear; cc'
          alias selenium-restart=bin/docker/restart-selenium-chrome
          alias yii=bin/docker/yii/yii


          and have a pre_window: like this:



          pre_window: source ~/my_aliases


          But your approach looks consistent with how the project intends you to use pre_window: at the very least.






          share|improve this answer





















          • I didn't realize for some reason that I can put commands in separate list items for pre/pre_window, thanks!
            – jojman
            Aug 3 at 1:21











          • By the way, what I'm doing is what your post suggests to be impossible. Bash aliases in pre_window work fine.
            – jojman
            Aug 3 at 1:23










          • @jojman - no you can put aliases in pre_window you can't put them in pre is what the thread stated.
            – slm♦
            Aug 3 at 1:26












          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          Based on this ticket in tmuxinator's issue tracker titled: "pre" option not using zsh options, alias, configuration (running as sh) #286 it looks like you'd either do it as a pre: or a pre_window:. The OP to that ticket was trying pre:



          pre:
          - setopt clobber
          - source ~/projects/auv/devel/setup.zsh
          - stt


          and getting this error:



          > mux start auv-core
          sh: 13: setopt: not found
          sh: 13: source: not found
          sh: 13: stt: not found
          arranging in: main-vertical
          arranging in: main-vertical
          [exited]


          and one of the developers says this:




          Things like setopt, source and alias are all built in shell commands and don't make sense in a shell script.



          Your only option would be to put them in pre_window so send-keys is used in each window / pane.




          Based on this comment I think your only option is to use pre_window: as you're doing. You might want to take a different tactic rather than list all the aliases in a pre_window: directly, put them in a file:



          $ cat ~/my_aliases
          alias cc=heh/path/that
          alias ccc='cc clean; clear; cc'
          alias selenium-restart=bin/docker/restart-selenium-chrome
          alias yii=bin/docker/yii/yii


          and have a pre_window: like this:



          pre_window: source ~/my_aliases


          But your approach looks consistent with how the project intends you to use pre_window: at the very least.






          share|improve this answer













          Based on this ticket in tmuxinator's issue tracker titled: "pre" option not using zsh options, alias, configuration (running as sh) #286 it looks like you'd either do it as a pre: or a pre_window:. The OP to that ticket was trying pre:



          pre:
          - setopt clobber
          - source ~/projects/auv/devel/setup.zsh
          - stt


          and getting this error:



          > mux start auv-core
          sh: 13: setopt: not found
          sh: 13: source: not found
          sh: 13: stt: not found
          arranging in: main-vertical
          arranging in: main-vertical
          [exited]


          and one of the developers says this:




          Things like setopt, source and alias are all built in shell commands and don't make sense in a shell script.



          Your only option would be to put them in pre_window so send-keys is used in each window / pane.




          Based on this comment I think your only option is to use pre_window: as you're doing. You might want to take a different tactic rather than list all the aliases in a pre_window: directly, put them in a file:



          $ cat ~/my_aliases
          alias cc=heh/path/that
          alias ccc='cc clean; clear; cc'
          alias selenium-restart=bin/docker/restart-selenium-chrome
          alias yii=bin/docker/yii/yii


          and have a pre_window: like this:



          pre_window: source ~/my_aliases


          But your approach looks consistent with how the project intends you to use pre_window: at the very least.







          share|improve this answer













          share|improve this answer



          share|improve this answer











          answered Jul 30 at 2:32









          slm♦

          232k65479649




          232k65479649











          • I didn't realize for some reason that I can put commands in separate list items for pre/pre_window, thanks!
            – jojman
            Aug 3 at 1:21











          • By the way, what I'm doing is what your post suggests to be impossible. Bash aliases in pre_window work fine.
            – jojman
            Aug 3 at 1:23










          • @jojman - no you can put aliases in pre_window you can't put them in pre is what the thread stated.
            – slm♦
            Aug 3 at 1:26
















          • I didn't realize for some reason that I can put commands in separate list items for pre/pre_window, thanks!
            – jojman
            Aug 3 at 1:21











          • By the way, what I'm doing is what your post suggests to be impossible. Bash aliases in pre_window work fine.
            – jojman
            Aug 3 at 1:23










          • @jojman - no you can put aliases in pre_window you can't put them in pre is what the thread stated.
            – slm♦
            Aug 3 at 1:26















          I didn't realize for some reason that I can put commands in separate list items for pre/pre_window, thanks!
          – jojman
          Aug 3 at 1:21





          I didn't realize for some reason that I can put commands in separate list items for pre/pre_window, thanks!
          – jojman
          Aug 3 at 1:21













          By the way, what I'm doing is what your post suggests to be impossible. Bash aliases in pre_window work fine.
          – jojman
          Aug 3 at 1:23




          By the way, what I'm doing is what your post suggests to be impossible. Bash aliases in pre_window work fine.
          – jojman
          Aug 3 at 1:23












          @jojman - no you can put aliases in pre_window you can't put them in pre is what the thread stated.
          – slm♦
          Aug 3 at 1:26




          @jojman - no you can put aliases in pre_window you can't put them in pre is what the thread stated.
          – slm♦
          Aug 3 at 1:26












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f459236%2fwhere-to-define-shell-aliases-in-configs-for-projects-in-tmuxinator%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)