我在~/.tmuxinator/*.yml文件中定义了Bash别名,如下所示:
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有更好的办法吗?它工作,但显然,这是不方便添加他们这样。
发布于 2018-07-30 02:32:24
基于tmuxinator题为:“预”选项不使用zsh选项、别名、配置(以sh形式运行) #286的问题跟踪器中的这张票证,它看起来要么是pre:,要么是pre_window:。到那张票的行动是在尝试pre:
pre:
- setopt clobber
- source ~/projects/auv/devel/setup.zsh
- stt并得到这个错误:
> 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]其中一个开发人员说:
像setopt、source和别名这样的东西都是在shell命令中构建的,在shell脚本中没有意义。您唯一的选择是将它们放在pre_window中,以便在每个窗口/窗格中使用发送键。
基于这一评论,我认为您唯一的选择是像您正在做的那样使用pre_window:。您可能需要采取不同的策略,而不是直接列出pre_window:中的所有别名,将它们放在一个文件中:
$ 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并拥有这样一个pre_window::
pre_window: source ~/my_aliases但是,您的方法至少与项目打算如何使用pre_window:相一致。
https://unix.stackexchange.com/questions/459236
复制相似问题