Skip to content

HOWTO: set environment variables

Ajeet D'Souza edited this page May 16, 2024 · 14 revisions

The way you set environment variables is dependent on your shell. Assuming you want to set the _ZO_ECHO variable to 1:

Bash

Add this to your configuration (usually ~/.bashrc):

export _ZO_ECHO='1'
cmd.exe (with Clink)

Add this to your configuration (find it by running clink info in cmd.exe):

set _ZO_ECHO=1
Elvish

Add this to your configuration (usually ~/.elvish/rc.elv):

set E:_ZO_ECHO = '1'
Fish

Add this to your configuration (usually ~/.config/fish/config.fish):

set -x _ZO_ECHO '1'
Nushell

Add this to your configuration (find it by running config path in Nushell):

[env]
_ZO_ECHO = "1"
PowerShell

Add this to your configuration (find it by running echo $profile in PowerShell):

$env:_ZO_ECHO = '1'
Xonsh

Add this to your configuration (usually ~/.xonshrc):

$_ZO_ECHO = '1'
Zsh

Add this to your configuration (usually ~/.zshrc):

export _ZO_ECHO='1'
Any POSIX shell

Add this to your configuration:

export _ZO_ECHO='1'

Note

These must be set before calling zoxide init. The full list of configurable variables can be found here.

Clone this wiki locally