You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I notice that fnm env command will always create a new symlink to default directory in fnm_multishells directory. This is not a huge of a deal as it's just a few bytes, but I think it's still better to remove the symlink when the terminal exits as they'll keep piling up unused as we initialize new terminal.
Right now, I can simply add something like trap "rm -rf $FNM_MULTISHELL_PATH" EXIT so the symlink will be removed when the shell exits.
In relate to it, I find that fnm env command can be improved by :
Either it only generate pure script that doesn't create symlink as side-effect (create the symlink on the script using ln) or fully commit on creating the symlink and set up all the script in one process without requiring you to do eval.
Remove previous symlink when fnm env command invoked as it won't be used anymore and be replaced by new one.
Add post clean up script (remove symlink when terminal exits), either on fnm env output script or guide the users to add it in their shell init script.
That are my suggestions if I'm not mistaken on how the command designed.
The text was updated successfully, but these errors were encountered:
I notice that
fnm env
command will always create a new symlink to default directory in fnm_multishells directory. This is not a huge of a deal as it's just a few bytes, but I think it's still better to remove the symlink when the terminal exits as they'll keep piling up unused as we initialize new terminal.Right now, I can simply add something like
trap "rm -rf $FNM_MULTISHELL_PATH" EXIT
so the symlink will be removed when the shell exits.In relate to it, I find that
fnm env
command can be improved by :ln
) or fully commit on creating the symlink and set up all the script in one process without requiring you to doeval
.fnm env
command invoked as it won't be used anymore and be replaced by new one.fnm env
output script or guide the users to add it in their shell init script.That are my suggestions if I'm not mistaken on how the command designed.
The text was updated successfully, but these errors were encountered: