Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle which not installed #77

Closed
brandon-leapyear opened this issue May 19, 2021 · 3 comments
Closed

Handle which not installed #77

brandon-leapyear opened this issue May 19, 2021 · 3 comments
Assignees

Comments

@brandon-leapyear
Copy link
Contributor

Use type instead, which is a bash built-in

@KyleTryon
Copy link
Contributor

Hey @brandon-leapyear,

Thanks for sending this in. I was not aware of the type command! Thank you for showing it to me.

I am having a little bit of a difficult type researching it but I wanted to share what I found. From my findings it seems that maybe command -v is a better generalized command. But I would like to hear more from you and your use-case.

Apologies if we are too late here, I realize this issue is quite old now.

https://en.wikipedia.org/wiki/Type_(Unix)

The type command was a shell builtin for Bourne shell that was introduced in AT&T's System V Release 2 (SVR2) in 1984,[1] and continues to be included in many other POSIX-compatible shells such as Bash. However, type is not part of the POSIX standard. With a POSIX shell, similar behavior is retrieved with

command -V name

https://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then

The status nowadays is that type and command -v are ubiquitous in all the Bourne-like shells

Here is an interesting point in your favor for POSIX compliant system

POSIX requires that all shell builtins (like command) be also available as external commands, but unfortunately, that's not the case for command on many systems. For instance, it's rare to find a command command on Linux based operating systems while most of them have a which command (though different ones with different options and behaviors).

Would love to better understand the issues you are facing.

@brandon-leapyear
Copy link
Contributor Author

brandon-leapyear commented Mar 18, 2022 via email

@brivu brivu mentioned this issue Mar 29, 2022
@brivu brivu self-assigned this Apr 5, 2022
@brivu
Copy link
Contributor

brivu commented Apr 5, 2022

This was resolved with PR #98

@brivu brivu closed this as completed Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants