Specifically, allow variable expansion for the key codes by switching
from single to double quotes.
This also adds a helpful suggestion to descriptions. Taken from the
project's README, see
4abed97b6e/README.md (L71-L74))
Previously, lines in .zshrc were added with quotes in keys
(e.g. ZSH_HIGHLIGHT_STYLES['comment']='fg=#6c6c6c'). However, zsh
considered these quotes to be part of the key, so the "comment" key
remained unchanged.
It's pretty common to need multiple bindings to
history-substring-search, since different terminals will send different
keys for up/down.
This does not break back-compatibility, and introduces a new test
This patch moves both home.sessionVariables and
programs.zsh.sessionVariables from .zshrc to .zshenv. Additionally,
these two kinds of session variables will not be sourced more than
once to allow user-customized ones to take effect.
Before, session variables are in .zshrc, which causes non-interactive
shells to not be able to get those variables. For example, running a
command through SSH is in a non-interactive and non-login shell, which
suffers from this. With this patch, all kinds of shells can get
session variables.
The reason why these session variables are not moved to .zprofile is
that programs started by systemd user instances are not able to get
variables defined in that file. For example, GNOME
Terminal (gnome-terminal-server.service) is one of these programs and
doesn't get variables defined in .zprofile. As a result, the shells it
starts, which are interactive and non-login, do not get those
variables.
Fixes#2445
Related NixOS/nixpkgs#33219
Related NixOS/nixpkgs#45784
This file is not formatted before and is excluded by ./format, so I don't format it.
This option provides a more convenient way to overlay dummy packages.
It also adds a function `config.lib.test.mkStubPackage` that can,
e.g., be used for `package` options.
* zsh: update prezto path structure
The path structure was changed in Nixpkgs and this commit updates
the module to match.
Fixes#1773
* zsh-prezto: fix tests, small tidyup
Co-authored-by: Nick Hu <me@nickhu.co.uk>
- Default value is set to static '$HOME/.zsh_history' -- dotDir is not
prepended anymore
- $HOME is not prepended to the option value
- Ensure history path directory exists
Fixes#886, replaces #427.
This replaces some derivation outputs by simple strings rather than
full Nix store paths. This removes the need to download the whole
derivation when all we need is a static string.
Unfortunately, using `attrsOf` is not possible since it results in too
eager evaluation. In particular, the
home.sessionVariables = {
FOO = "Hello";
BAR = "${config.home.sessionVariables.FOO} World!";
};
example will cause an infinite recursion.
This commit restores the option type of
- `home.sessionVariables`,
- `pam.sessionVariables`,
- `programs.bash.sessionVariables`, and
- `programs.zsh.sessionVariables`
to `attrs`. It also adds test cases for the above options to avoid
regressions.
Fixes#659