mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-13 03:03:15 +00:00
Fix make and gmake completion
Submitted by: Daniel Shahaf (on zsh mailing list) Reported by: Guilherme Salazar (on zsh mailing list)
This commit is contained in:
parent
6217deba5d
commit
f121cb0019
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=424080
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= zsh
|
||||
DISTVERSION= 5.2
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= shells
|
||||
MASTER_SITES= http://www.zsh.org/pub/ \
|
||||
SF \
|
||||
|
31
shells/zsh/files/patch-Completion_Unix_Command___make
Normal file
31
shells/zsh/files/patch-Completion_Unix_Command___make
Normal file
@ -0,0 +1,31 @@
|
||||
--- Completion/Unix/Command/_make.orig 2016-10-16 18:41:19 UTC
|
||||
+++ Completion/Unix/Command/_make
|
||||
@@ -262,17 +262,20 @@ _make() {
|
||||
|
||||
if [[ -n "$file" ]]
|
||||
then
|
||||
- if [[ $is_gnu == gnu ]] && zstyle -t ":completion:${curcontext}:targets" call-command
|
||||
+ if [[ $is_gnu == gnu ]]
|
||||
then
|
||||
- _make-parseMakefile $PWD < <(_call_program targets "$words[1]" -nsp --no-print-directory -f "$file" .PHONY 2> /dev/null)
|
||||
+ if zstyle -t ":completion:${curcontext}:targets" call-command; then
|
||||
+ _make-parseMakefile $PWD < <(_call_program targets "$words[1]" -nsp --no-print-directory -f "$file" .PHONY 2> /dev/null)
|
||||
+ else
|
||||
+ _make-parseMakefile $PWD < $file
|
||||
+ fi
|
||||
else
|
||||
- case "$OSTYPE" in
|
||||
- freebsd*)
|
||||
- _make-parseMakefile $PWD < <(_call_program targets "$words[1]" -nsp -f "$file" .PHONY 2> /dev/null)
|
||||
- ;;
|
||||
- *)
|
||||
+ if [[ $OSTYPE == (freebsd|dragonfly|netbsd)* || /$words[1] == */bmake* ]]; then
|
||||
+ TARGETS+=(${=${(f)"$(_call_program targets "$words[1]" -s -f "$file" -V.ALLTARGETS 2> /dev/null)"}})
|
||||
+ _make-parseMakefile $PWD < <(_call_program targets "$words[1]" -nsdg1Fstdout -f "$file" .PHONY 2> /dev/null)
|
||||
+ else
|
||||
_make-parseMakefile $PWD < $file
|
||||
- esac
|
||||
+ fi
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user