使用当前工作目录在OSX上打开多个新的终端选项卡
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用当前工作目录在OSX上打开多个新的终端选项卡相关的知识,希望对你有一定的参考价值。
# Open a new tab on OSX Terminal with the current working dir. # Optionally, pass the number of tabs as parameter. # # Example: # # cd /my/very/long/path/and/i/dont/want/to/repeat/myself # nt 10 # # You should add this to your ~/.profile # function nt { if [ $# -ne 1 ]; then TIMES=1 else TIMES=$1 fi osascript -e " repeat $TIMES times tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down tell application \"Terminal\" to do script \"cd $PWD; clear;\" in selected tab of the front window end repeat " > /dev/null 2>&1 }
以上是关于使用当前工作目录在OSX上打开多个新的终端选项卡的主要内容,如果未能解决你的问题,请参考以下文章
如何在同一目录的 Windows 终端中打开一个新的 git-bash 选项卡?
iTerm2和tmux:在当前选项卡的工作目录中打开新选项卡