Zoxide: Difference between revisions

Klinger (talk | contribs)
m Category:Shell (you may be interested when deciding about the shell - or is another category better?)
Angel (talk | contribs)
m Change programs.zoxide.options to programs.zoxide.flags
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Zoxide}}
{{DISPLAYTITLE:Zoxide}}
[https://github.com/ajeetdsouza/zoxide Zoxide] is a smarter CD command that supports all major shells.
[https://github.com/ajeetdsouza/zoxide Zoxide] is a smarter ''cd'' (change directory) command that supports all major shells.


== Installation ==
== Installation ==
Line 13: Line 13:


Change <code>myuser</code> to the username of the user you want to configure.
Change <code>myuser</code> to the username of the user you want to configure.
It may also be necessary to add <code>zoxide</code> to <code>home.packages</code> if it hasn't already been installed by some other method:
<syntaxhighlight lang="nix">
home.packages = with pkgs; [
  zoxide
];
</syntaxhighlight>


== Shell Integration ==
== Shell Integration ==
Line 23: Line 30:
programs.zoxide.enableNushellIntegration = true;
programs.zoxide.enableNushellIntegration = true;
programs.zoxide.enableZshIntegration = true;
programs.zoxide.enableZshIntegration = true;
</syntaxhighlight>
It may be necessary to also ensure that Home Manager can modify your rc file; for example, bash may require:
<syntaxhighlight lang="nix>
programs.bash.enable = true;
</syntaxhighlight>
</syntaxhighlight>


Line 29: Line 41:
== Extra Options ==
== Extra Options ==


You can pass [https://github.com/ajeetdsouza/zoxide?tab=readme-ov-file#flags extra flags] to Zoxide using <code>programs.zoxide.options</code> as follows:
You can pass [https://github.com/ajeetdsouza/zoxide?tab=readme-ov-file#flags extra flags] to Zoxide using <code>programs.zoxide.flags</code> as follows:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
programs.zoxide.options = [
programs.zoxide.flags = [
   "--cmd cd"
   "--cmd cd"
];
];