Skip to content
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

nixos/autosuggestions: add module #41397

Merged
merged 1 commit into from Jun 10, 2018
Merged

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Jun 2, 2018

Motivation for this change

The zsh-autosuggestions package provides several configuration options
such as a different highlight style (like fg=cyan which is easier to
read).

With rename.nix the old programs.zsh.enableAutosuggestions is still
functional, but yields the following warning like this during evaluation:

trace: warning: The option `programs.zsh.enableAutosuggestions' defined in `<unknown-file>' has been renamed to `programs.zsh.autosuggestions.enable'.

The module provides the most common zsh-autosuggestions (highlight
style and strategy) as options that will be written into the interactive
shell init (/etc/zshrc by default). Further configuration options can
be declared using the extraConfig attr set:

{
  programs.zsh.autosuggestions.extraConfig = {
    "ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE" = "buffer_size";
  };
}

A full list of available configuration options for zsh-autosuggestions
can be viewed here: https://github.com/zsh-users/zsh-autosuggestions/blob/v0.4.3/README.md

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

The `zsh-autosuggestions` package provides several configuration options
such as a different highlight style (like `fg=cyan` which is easier to
read).

With `rename.nix` the old `programs.zsh.enableAutosuggestions` is still
functional, but yields the following warning like this during evaluation:

```
trace: warning: The option `programs.zsh.enableAutosuggestions' defined in `<unknown-file>' has been renamed to `programs.zsh.autosuggestions.enable'.
```

The module provides the most common `zsh-autosuggestions` (highlight
style and strategy) as options that will be written into the interactive
shell init (`/etc/zshrc` by default). Further configuration options can
be declared using the `extraConfig` attr set:

```
{
  programs.zsh.autosuggestions.extraConfig = {
    "ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE" = "buffer_size";
  };
}
```

A full list of available configuration options for `zsh-autosuggestions`
can be viewed here: https://github.com/zsh-users/zsh-autosuggestions/blob/v0.4.3/README.md
@dtzWill
Copy link
Member

dtzWill commented Jun 10, 2018

Neat! Look forward to trying this...!

@xeji
Copy link
Contributor

xeji commented Jun 10, 2018

Just tried it - nice. Maybe it's time for me to move from bash to zsh ...

@xeji xeji merged commit aa46b1e into NixOS:master Jun 10, 2018
@Ma27 Ma27 deleted the zsh-auto-suggestions branch June 10, 2018 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants