浏览代码

feat(term_tab): add support for macOS (#11391)

Richard Mitchell 1 年之前
父节点
当前提交
33aadeced0
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      plugins/term_tab/term_tab.plugin.zsh

+ 1 - 0
plugins/term_tab/term_tab.plugin.zsh

@@ -28,6 +28,7 @@ function _term_list(){
   case $OSTYPE in
     solaris*) dirs=( ${(M)${${(f)"$(pgrep -U $UID -x zsh|xargs pwdx)"}:#$$:*}%%/*} ) ;;
     linux*) dirs=( /proc/${^$(pidof zsh):#$$}/cwd(N:A) ) ;;
+    darwin*) dirs=( $( lsof -d cwd -c zsh -a -w -Fn | sed -n 's/^n//p' ) ) ;;
   esac
   dirs=( ${(D)dirs} )