mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
My pkgfile hook wasn't handling multiple results properly. Should be fixed now.
This commit is contained in:
parent
3fb01c9531
commit
3527b4cad4
1 changed files with 5 additions and 2 deletions
|
|
@ -11,10 +11,13 @@ if [[ -x /usr/bin/pkgfile ]]; then
|
||||||
read pid cmd state ppid pgrp session tty_nr tpgid rest < /proc/self/stat
|
read pid cmd state ppid pgrp session tty_nr tpgid rest < /proc/self/stat
|
||||||
[[ $$ -eq $tpgid ]] && return 127
|
[[ $$ -eq $tpgid ]] && return 127
|
||||||
|
|
||||||
pkg=$(pkgfile -b -v -- $1)
|
saveIFS=$IFS; IFS=$'\n';
|
||||||
|
pkg=($(pkgfile -b -v -- $1))
|
||||||
|
IFS=$saveIFS
|
||||||
|
|
||||||
if [[ -z $pkg ]] && return 127
|
if [[ -z $pkg ]] && return 127
|
||||||
|
|
||||||
echo "The command \"$1\" can be found in the following packages:"
|
echo "The command \"$1\" can be found in the following packages:"
|
||||||
for p in $pkg; echo " $p"
|
for p in $pkg; echo " $p"
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue