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

lib/helpers: fix _command_exists() #2018

Merged
merged 2 commits into from
Jan 24, 2022

Commits on Jan 18, 2022

  1. lib/helpers: fix all_groups()

    - Don't write to disk, just pipe.
    - Don't loop, just do all functions.
    
    Performance of old implementation on my system:
    ```
    real    0m9.996s
    user    0m5.318s
    sys     0m9.126s
    ```
    
    Performance of new implementation on my system:
    ```
    real    0m0.052s
    user    0m0.069s
    sys     0m0.025s
    ```
    gaelicWizard committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    180fb93 View commit details
    Browse the repository at this point in the history
  2. lib/helpers: fix _command_exists()

    The weird subshell is weird AF. Just do a normal `if`.
    
    Ditto `_binary_exists()`, `_completion_exists()`, and `_is_function()`!
    gaelicWizard committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    9b51dc0 View commit details
    Browse the repository at this point in the history