Browse Source

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

Richard Mitchell 1 year ago
parent
commit
33aadeced0
1 changed files with 1 additions and 0 deletions
  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} )