diff --git a/share/functions/__fish_print_make_targets.fish b/share/functions/__fish_print_make_targets.fish index acb1a9fcf..fb8ce9c03 100644 --- a/share/functions/__fish_print_make_targets.fish +++ b/share/functions/__fish_print_make_targets.fish @@ -17,7 +17,7 @@ function __fish_print_make_targets --argument-names directory file end set -l bsd_make - if make -C $directory -pn >/dev/null 2>/dev/null + if make --version 2>/dev/null | string match -q 'GNU*' set bsd_make 0 else set bsd_make 1