/usr/bin/which -> type -P#3944
Conversation
Library/Homebrew/shims/scm/git
Outdated
There was a problem hiding this comment.
This isn't the same behaviour as which -a; it produces a single result rather than multiple.
b5de197 to
a397ea1
Compare
|
I suggest using the bash builtin |
Works for me. There may be other locations where that would be useful/needed too. |
|
Do you like bash-isms in this project? For example, |
Yup, we use a bunch and we require |
a397ea1 to
c259d2f
Compare
Migrated from Linuxbrew/brew#621
c259d2f to
0a2e649
Compare
|
To be absolutely sure that you're using a builtin, a not |
|
Thanks again @bukzor! |
|
@maxim-belkin Is there any case where $PATH will override a built-in? I was pretty sure that Also, I can't find any mention of |
|
builtins can be disabled with #!/bin/sh
# $FreeBSD: src/usr.bin/alias/generic.sh,v 1.2 2005/10/24 22:32:19 cperciva Exp $
# This file is in the public domain.
builtin `echo ${0##*/} | tr \[:upper:] \[:lower:]` ${1+"$@"}and |
|
I'm happy with this as-is. We can investigate further if we hit any bugs. |
This allows odd POSIXen (i.e. Android) to (at least attempt to) function.
Ported from Linuxbrew/brew#621