Unix Shell .bash_profile脚本在同一个窗口中的sublime文本中打开两个文件

时间:2017-07-18 12:09:06

标签: bash shell unix sublimetext3

所以我在.bash_profile文件中有以下代码。这段代码允许我使用sub命令后跟文件夹/文件名在sublime文本中打开该文件夹/文件!太棒了!

但是我试图使用别名定义的editbashpro命令在sublime文本中打开.bash和.bash_profile文件...但是它会在SEPARATE窗口中打开两个文件。

我不想通过更改Sublime Text本身的设置来解决这个问题,似乎所有的教程都指引着我......

有没有办法只使用terminal / bash_profile脚本在sublime的同一窗口中打开.bash和.bash_profile?我是非常终端的新手并使用shell脚本? idk它甚至叫什么?看我有多新鲜?

# Sublime Text Open File/Folder Command
function sub() {
    open $1 -a "Sublime Text"
}
echo 'sub <file/folder> ->
    open file/folder in sublime
'

# Edit Bash Profiles Command
alias editbashpro='cd ~/;
sub .bash_profile;
sub .bashrc;'
echo 'editbashpro ->
opens .bashrc and .bash_profile in Sublime Text Editor' 

0 个答案:

没有答案