Skip to content

feature: Improve command-installed #160

@mrlunchbox777

Description

@mrlunchbox777

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 using which and ||ing the result.

Covers this TODO, and this TODO.

Steps to Test

  1. Install omz, nvm, and moreutils.
  2. general-command-installed -c omz should return true
  3. general-command-installed -c nvm should return true
  4. general-command-installed -c moreutils should return true

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions