-
Notifications
You must be signed in to change notification settings - Fork 179
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
Document better or detect the fact that .zimrc
should not be used as it was sourced during shell startup
#448
Comments
Excellent idea for discussion! The thing that initially fooled me was The second thing that fooled me was that the That being said, it seems like the only things that should go in If so, my proposal would be to scan the
|
@Bananaman, great point on the EDIT: Or maybe |
@ericbn I guess so, but it's not too late to deprecate it, like But the filename being a bit confusing isn't a major issue, as long as one of two things happens:
I saw your edits to the top post now, with the complexities, such as "what if someone uses complex logic such as |
I had two ideas...
|
An ideia for a Zim version 2.0 would be to allow users to define everything in their On the other hand, I like how we can easily detect if the |
Hmm, I like the idea of "Okay, the It just wasn't clear enough (I am still unsure actually) what the The idea of merging it with the You could just move the "did Edit: And yeah moving everything to the |
You're correct in your current ideas about And yeah, we're on the same page about the ideas for the future. |
Is your feature request related to a problem? Please describe.
When users define variables in their
.zimrc
file, the variables will be set after runningzimfw
with most commands*, giving users the wrong impression that they've done the right thing. But.zimrc
is not sourced during the shell startup. So those variables will not be set when starting a new terminal.Describe the solution you'd like
A nice but maybe too complex solution would be to detect this scenario and to print a warning to the user.
Or to source
.zimrc
in a "closed" way where everything defined there is forced to be local -- not sure if this is possible though.Describe alternatives you've considered
Or maybe we should just document this better.
Another option would be to only allow
zmodule
calls in the.zimrc
, and print a warning or error for anything else. The reason I don't like this option, and why I made the.zimrc
a complete Zsh script, is because the intention is to allow users to still add any logic they want in there. There hasn't been a real practical use of the extended scripting beyond just the plainzmodule
calls though.Additional context
This has been a common misunderstanding from users, most recently by @Bananaman here.
*
build
,clean
,clean-compiled
,clean-dumpfile
,compile
,init
,list
,install
,update
,uninstall
The text was updated successfully, but these errors were encountered: