Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • Right ... I had noticed these -o options but I thought they were options that were set-able to override the defaults i.e. to force behavior, rather than to query the actual situation. Am I wrong? Commented Jan 24, 2014 at 11:24
  • @Geeb, [[ -o opt ]] checks if opt is set. I can't see why it would do it only when the option is set some way and not the other. Commented Jan 24, 2014 at 12:10
  • So you're saying querying the option values always reports the truth of the matter? e.g. you couldn't trick a shell instance, started in a non-interactive mode, into reading .zshrc by setting the interactive option? Commented Jan 24, 2014 at 12:38
  • The .zshrc is read on startup when the shell is interactive. It may be read by someone doing source ~/.zshrc. Commented Jan 24, 2014 at 12:49
  • OK a different type of deception: Setting the login option in .zshrc would cause all interactive shells started after this change to behave as though they were a result of a login, right? i.e. the behavior is forced - in truth they are not really login shells, and only behave as such because they have been told to be so by the authority of the option setting? Commented Jan 24, 2014 at 14:09