Zoxide: Difference between revisions

From NixOS Wiki
imported from old wiki
 
Klinger (talk | contribs)
m Category:Shell (you may be interested when deciding about the shell - or is another category better?)
Line 36: Line 36:
];
];
</syntaxhighlight>
</syntaxhighlight>
[[Category:Shell]]

Revision as of 19:08, 25 June 2024

Zoxide is a smarter CD command that supports all major shells.

Installation

A basic user-specific installation with Home Manager may look like this:

home-manager.users.myuser = {
  programs.zoxide.enable = true;
};

Change myuser to the username of the user you want to configure.

Shell Integration

You can choose which shell integrations to enable with the enable*Integration options. By default all are enabled.

programs.zoxide.enableBashIntegration= true;
programs.zoxide.enableFishIntegration= true;
programs.zoxide.enableNushellIntegration = true;
programs.zoxide.enableZshIntegration = true;

After adding Zoxide, you will have to restart your shell to gain access to the z command.

Extra Options

You can pass extra flags to Zoxide using programs.zoxide.options as follows:

programs.zoxide.options = [
  "--cmd cd"
];