Skip to content
New issue

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

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

Already on GitHub? # to your account

Remove unnecessary basename and awk call #15

Merged
merged 2 commits into from
Jul 6, 2021
Merged

Remove unnecessary basename and awk call #15

merged 2 commits into from
Jul 6, 2021

Conversation

kidonng
Copy link
Contributor

@kidonng kidonng commented Jul 5, 2021

It doesn't make sense to call basename if it is a fixed string. Plus it will slow down shell startup time a bit.

Also replaced awk call with string match to reduce external dependencies. This builtin dates back to pre-3.0 version of Fish so compatibility should not be an issue.

I also threw in a change that I don't feel like making a separate PR (but I'd like to if requested): replace exit in return in fish-apple-touchbar function. Therefore innocent scripts that call this function in non-interactive sessions won't exit accidentally.

@kidonng kidonng changed the title Remove unnecessary basename and awk call Remove unnecessary basename and awk call Jul 5, 2021
@rodrigobdz rodrigobdz self-requested a review July 6, 2021 08:48
@rodrigobdz
Copy link
Owner

@kidonng Thanks for your contribution! LGTM. I'm all in for performance improvements

@rodrigobdz rodrigobdz merged commit bf6636c into rodrigobdz:main Jul 6, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants