-
Notifications
You must be signed in to change notification settings - Fork 54
Opening new tmux split runs avn twice #20
Comments
@aaronjensen thanks for the report. I can't reproduce this, but I'm also needing to comment out I'll try to look into this more at some point, but the duplicate message is probably a symptom of PR welcome, though. 😄 For anyone who looks into this in the future, the dotfiles are currently aaronjensen/dotfiles@026bd5b. |
Removing I just added a .nvmrc to my home directory and opened a new window and it repro'd, so no tmux required... |
Here's the problem, a hack to work around problems w/ rvm: https://github.com/aaronjensen/dotfiles/blob/master/zlogin#L2 so... i guess it'd be nice if avn was idempotent. It didn't switch versions if it didn't need to? |
I fixed the root cause (zshenv adding to path multiple times somehow broke rvm's initial path loading) and removed the hacks. All good now. It'd still be nice if avn was idempotent (especially because avn, and to a lesser extent nvm, is surprisingly slow) |
It's |
It's idempotent with respect to itself, but it'd require (more) internal knowledge of nvm and n to truly get there. |
Oh, and on the speed issue: avn should not have any noticeable impact when you cd anywhere without a config file. When it performs a switch, it may be slow (it starts a node process & performs file operations), but as you mention nvm can be slow, too. I could add some profiling timers into the code base to help figure out where speed issues occur. I've had better luck with n for faster startup of new shells and switching. I know @ljharb and others have been working on speed in nvm: |
Using zsh, these dotfiles: https://github.com/aaronjensen/dotfiles
When I open a tmux split from a directory w/ a .nvmrc I get two activation messages. The first is in color, the second is not:
To repro, use my dotfiles:
The text was updated successfully, but these errors were encountered: