Closed stefanos82 closed 3 years ago
I didn't know that, if works the same and is more portable we can replace it. If you make a PR and works fine I would accept.
sure thing, let me do so right now.
I didn't know that either, but I second the request.
~$ which command || echo error
error
~$ command -v which
/usr/bin/which
~$
Done.
By the way, since it got merged, shall I delete the branch?
It's your fork, feel free to manage as you wish, in my case I would probably delete.
Yeah, I will delete it; no need to have it anymore.
At https://github.com/edubart/nelua-lang/blob/master/nelua.sh#L29 you use
which
command which on GNU / Debian is installed as an external binary that is located in/usr/bin/which
, that happens to be a classic shell itself.The question is, what happens if it's not installed?
As far as I know,
command -v
does the exact thing and it's a builtin command which is also POSIX-compliant.Would you like to replace it with the aforementioned suggestion?