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

This commit is contained in:
Richard Mitchell 2023-04-04 17:52:16 -04:00 committed by GitHub
parent 8d23fbd696
commit 33aadeced0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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