Improve the command-installed function by supporting more types of command installations, particularly aliases and package bundles/libraries.
Why?
There are managed packages (omz, nvm, moreutils) that command-installed currently, incorrectly, returns false.
What should happen?
This is not a bug because we handle it in different ways right now, but they are bespoke workarounds.
command-installed needs to support different package installations, this is probably most easily done by importing aliases then testing for them, using the package managers themselves, using command -v, and using which and ||ing the result.
Contact Details
mrlunchbox777@gmail.com
Feature Description
Improve the command-installed function by supporting more types of command installations, particularly aliases and package bundles/libraries.
Why?
There are managed packages (omz, nvm, moreutils) that command-installed currently, incorrectly, returns false.
What should happen?
This is not a bug because we handle it in different ways right now, but they are bespoke workarounds.
command-installed needs to support different package installations, this is probably most easily done by importing aliases then testing for them, using the package managers themselves, using
command -v
, and usingwhich
and||
ing the result.Covers this TODO, and this TODO.
Steps to Test
general-command-installed -c omz
should returntrue
general-command-installed -c nvm
should returntrue
general-command-installed -c moreutils
should returntrue
Code of Conduct