"Mann, der" sagt:
--all, -a
Print all matching executables in PATH, not just the first.
Aber wenn ich das tue, bekomme ich:
> which --all g++
--all: Command not found.
/usr/bin/g++
> which -a g++
-a: Command not found.
/usr/bin/g++
Versucht, --all oder -a nach "g ++" zu platzieren, kein Glück.
which -vkönnte vielleicht das problem klären, auch erwähnen deine shell könnte hinweise geben.
whichBefehl mit NUR "-a" (es gibt keine "all" -Option). Und es funktioniert gut.