summaryrefslogtreecommitdiff
path: root/Completion/Base/Completer/_external_pwds
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Base/Completer/_external_pwds')
-rw-r--r--Completion/Base/Completer/_external_pwds8
1 files changed, 6 insertions, 2 deletions
diff --git a/Completion/Base/Completer/_external_pwds b/Completion/Base/Completer/_external_pwds
index 4ad50f02b..dfc1abe16 100644
--- a/Completion/Base/Completer/_external_pwds
+++ b/Completion/Base/Completer/_external_pwds
@@ -22,9 +22,13 @@ case $OSTYPE in
)
;;
linux*)
- dirs=( /proc/${^$(pidof zsh):#$$}/cwd(N:A) )
+ dirs=( /proc/${^$(pidof -- -zsh zsh):#$$}/cwd(N:P) )
dirs=( $^dirs(N^@) )
;;
+ freebsd*)
+ dirs=( $(pgrep -U $UID -x zsh) )
+ dirs=( $(procstat -h -f $dirs|awk '{if ($3 == "cwd") print $NF}') )
+ ;;
*)
if (( $+commands[lsof] )); then
dirs=( ${${${(M)${(f)"$(lsof -a -u $EUID -c zsh -p \^$$ -d cwd -F n -w
@@ -32,7 +36,7 @@ case $OSTYPE in
fi
;;
esac
-dirs=( ${(D)dirs} )
+dirs=( ${(D)dirs:#$PWD} )
compstate[pattern_match]='*'
_wanted directories expl 'current directory from other shell' \