From ArchWiki
Jump to navigation Jump to search

Same directory in newly opened tab

I had to append the following to my zshrc

. /etc/profile.d/

such that a newly opened tab opened in the previous working directory (using gnome-terminal). MrWhite (talk) 13:14, 5 November 2017 (UTC)

Missing files?

I've installed (actually, re-installed)

zsh 5.4.2-2
zsh-completions 0.27.0-1
zsh-doc 5.4.2-2
zsh-lovers 0.9.1-1
zsh-syntax-highlighting 0.6.0-1
zshdb 0.08-4

and run the zsh-newuser-install script taking all the defaults.

  • /etc/zsh/zshenv does not exist
  • /etc/zshenv does not exist
  • $ZDOTDIR is undefined

Is this operator error, or should this wiki page be updated?

vgivanovic (talk) 18:21, 31 January 2018 (UTC)

zsh-newuser-install only creates ${ZDOTDIR:-$HOME}/.zshrc, if you require any other files (for user or global config) you need to create them manually. Exception is /etc/zsh/zprofile which is provided by zsh. $ZDOTDIR is not set by default so as the note in Zsh#Startup/Shutdown files says zsh fallbacks to $HOME. -- nl6720 (talk) 08:37, 31 January 2018 (UTC)
What I was trying to say is that the Zsh page does not mention that /etc/zsh/zshenv or /etc/zshenv need to be installed manually. It just assumes that they exist and that they have the appropriate content. As a new zsh user, I found this confusing. (Where did the files go? Did I do something wrong? Is the installation broken? How do I fix it? Should I fix it?) So, I have two suggestions:
  1. Update the Zsh page to note that /etc/zsh/zshenv is not automatically created by the zsh package, but is where root may add, at a later date, environment variables that are used by all zsh users.
  2. Since it appears that zshenv has been renamed from /etc/zshenv to /etc/zsh/zshenv, note this change somewhere, perhaps in the second Note in Zsh#Startup/Shutdown files.
vgivanovic (talk) 19:14, 31 January 2018 (UTC)
Nowhere in Zsh#Startup/Shutdown files does it say that any those files apart from /etc/zsh/zprofile need to exist and nothing is broken by them not existing. The section just documents the order in which they are sourced. If you want to explicitly state, that to use them the files need to created manually, add a sentence explaining it below the file list.
Regarding the global file paths, the note at the bottom of Zsh#Startup/Shutdown files already mentions that the path differs from the man pages. Vote on FS#48992 and maybe someday the man pages will be fixed. -- nl6720 (talk) 10:11, 1 February 2018 (UTC)