-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
[WIP] remove call to external ls when loading chruby #492
base: master
Are you sure you want to change the base?
Conversation
when the shell does not find files to match a glob expression, the expression is left unchanged. this tests that the expression has been expanded to detect if a directory has files
WIP: sorry, in zsh it worked for non-existing director, or a directory with rubies, but not for a directory that was empty and zsh is complicated due to the default of blowing up when there is a bad glob running |
@kbrock yep, we ended up using In the 1.0.0 branch, I changed |
ooh, sweet! Ugh, I guess I have been living in the homebrew world and forgot about version 1.0. |
I've been slowly working on 1.0.0 branch where I can make breaking changes. The last feature I was trying to work on is adding a |
|
before
after
why?
I was trying to figure out ways to make nvm.sh load faster on my system.
chruby loads so much faster, and when I looked to see why, I was distracted by the call to
ls -A "$dir"
. It was using a builtin to list the files in the directory, but an external command to detect if there were files in the directory.So yea, I converted the already quick method to made it even faster.
~/.rubies
, and a non-existent/opt/rubies
.PREFIX
with a space in the name.This is yak shaving, and you probably can think up a better implementation. But it seems to work in
zsh
andbash
.If you prefer not to introduce change (because change always introduces risk), then that is cool. Just close.
I just saw this change and wanted to share.
As you will note,
nvm
is noticeably slower and the reason for my original tangent:Thanks again for such a great tool. And it already performs heads and shoulders better than other tools out there. (ruby or other)
refs: