···
(filterAttrs (k: v: v != null) cfg.shellAliases)
18
+
zshStartupNotes = ''
19
+
# Note that generated /etc/zprofile and /etc/zshrc files do a lot of
20
+
# non-standard setup to make zsh usable with no configuration by default.
22
+
# Which means that unless you explicitly meticulously override everything
23
+
# generated, interactions between your ~/.zshrc and these files are likely
24
+
# to be rather surprising.
26
+
# Note however, that you can disable loading of the generated /etc/zprofile
27
+
# and /etc/zshrc (you can't disable loading of /etc/zshenv, but it is
28
+
# designed to not set anything surprising) by setting `no_global_rcs` option
31
+
# echo setopt no_global_rcs >> ~/.zshenv
33
+
# See "STARTUP/SHUTDOWN FILES" section of zsh(1) for more info.
···
90
+
# Note that to manually override this in ~/.zshrc you should run `prompt off`
91
+
# before setting your PS1 and etc. Otherwise this will likely to interact with
92
+
# your ~/.zshrc configuration in unexpected ways as the default prompt sets
93
+
# a lot of different prompt variables.
autoload -U promptinit && promptinit && prompt walters && setopt prompt_sp
···
example = [ "EXTENDED_HISTORY" "RM_STAR_WAIT" ];
103
-
Configure zsh options.
125
+
Configure zsh options. See
126
+
<citerefentry><refentrytitle>zshoptions</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
···
. ${config.system.build.setEnvironment}
173
+
HELPDIR="${pkgs.zsh}/share/zsh/$ZSH_VERSION/help"
175
+
# Tell zsh how to find installed completions.
176
+
for p in ''${(z)NIX_PROFILES}; do
177
+
fpath+=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions)
180
+
# Setup custom shell init stuff.
···
# /etc/zprofile: DO NOT EDIT -- this file has been generated automatically.
# This file is read for login shells.
# Only execute this file once per shell.
if [ -n "$__ETC_ZPROFILE_SOURCED" ]; then return; fi
202
+
# Setup custom login shell init stuff.
···
# /etc/zshrc: DO NOT EDIT -- this file has been generated automatically.
# This file is read for interactive shells.
# Only execute this file once per shell.
if [ -n "$__ETC_ZSHRC_SOURCED" -o -n "$NOSYSZSHRC" ]; then return; fi
224
+
${optionalString (cfg.setOptions != []) ''
226
+
setopt ${concatStringsSep " " cfg.setOptions}
190
-
# Don't export these, otherwise other shells (bash) will try to use same histfile
229
+
# Setup command line history.
230
+
# Don't export these, otherwise other shells (bash) will try to use same HISTFILE.
SAVEHIST=${toString cfg.histSize}
HISTSIZE=${toString cfg.histSize}
195
-
HELPDIR="${pkgs.zsh}/share/zsh/$ZSH_VERSION/help"
235
+
# Configure sane keyboard defaults.
197
-
# Tell zsh how to find installed completions
198
-
for p in ''${(z)NIX_PROFILES}; do
199
-
fpath+=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions)
202
-
${optionalString cfg.enableGlobalCompInit "autoload -U compinit && compinit"}
238
+
${optionalString cfg.enableGlobalCompInit ''
239
+
# Enable autocompletion.
240
+
autoload -U compinit && compinit
243
+
# Setup custom interactive shell init stuff.
${cfge.interactiveShellInit}
${cfg.interactiveShellInit}
208
-
${optionalString (cfg.setOptions != []) "setopt ${concatStringsSep " " cfg.setOptions}"}
214
-
# Need to disable features to support TRAMP
254
+
# Disable some features to support TRAMP.
if [ "$TERM" = dumb ]; then
unsetopt zle prompt_cr prompt_subst