Zsh: Difference between revisions
→Oh-My-Zsh
imported>Yeshey m (The option oh-my-zsh has been changed to ohMyZsh) |
|||
(19 intermediate revisions by 18 users not shown) | |||
Line 9: | Line 9: | ||
Zsh can be configured with [[Home Manager]]. | Zsh can be configured with [[Home Manager]]. | ||
Full list of home-manager options for zsh can be found [https:// | Full list of home-manager options for zsh can be found [https://nix-community.github.io/home-manager/options.xhtml#opt-programs.zsh.enable here.] | ||
=== Example Configuration === | === Example Configuration === | ||
Line 15: | Line 15: | ||
programs.zsh = { | programs.zsh = { | ||
enable = true; | enable = true; | ||
enableCompletion = true; | |||
autosuggestions.enable = true; | |||
syntaxHighlighting.enable = true; | |||
shellAliases = { | shellAliases = { | ||
ll = "ls -l"; | ll = "ls -l"; | ||
update = "sudo nixos-rebuild switch"; | update = "sudo nixos-rebuild switch"; | ||
}; | }; | ||
history | history.size = 10000; | ||
history.path = "${config.xdg.dataHome}/zsh/history"; | |||
}; | }; | ||
</nowiki>}} | </nowiki>}} | ||
Line 43: | Line 45: | ||
</nowiki>}} | </nowiki>}} | ||
==== Oh-My-Zsh ==== | ==== Oh-My-Zsh ==== | ||
{{file|~/.config/nixpkgs/home.nix|nix|<nowiki> | <code>oh-my-zsh</code> is a framework to manage your ZSH configuration including completion scripts for several CLI tools or custom prompt themes. It is documented in the [https://nixos.org/manual/nixos/stable/#module-programs-zsh-ohmyzsh NixOS manual].{{file|~/.config/nixpkgs/home.nix|nix|<nowiki> | ||
programs.zsh = { | programs.zsh = { | ||
... # Your zsh config | ... # Your zsh config | ||
Line 53: | Line 55: | ||
}; | }; | ||
</nowiki>}} | </nowiki>}} | ||
==== Manual ==== | ==== Manual ==== | ||
{{file|~/.config/nixpkgs/home.nix|nix|<nowiki> | {{file|~/.config/nixpkgs/home.nix|nix|<nowiki> | ||
Line 110: | Line 113: | ||
== See also == | == See also == | ||
* [[Command Shell]] | * [[Command Shell]] | ||
[[Category:Shell]] | |||
[[Category:NixOS Manual]] |