Skip to content

Commit ffc3cb5

Browse files
committed
feat(nushell): Add env.nu with zoxide init and stow it
- Add env.nu that initializes zoxide for nushell - Source ~/.zoxide.nu in config.nu - Update stow_nushell_config to also handle env.nu stowing Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
1 parent eb94f70 commit ffc3cb5

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

omarchy/install.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,10 @@ stow_nushell_config() {
264264

265265
local config_home="${XDG_CONFIG_HOME:-$HOME/.config}"
266266
local nushell_dir="$config_home/nushell"
267-
local config_source="$SCRIPT_DIR/nushell/.config/nushell/config.nu"
268-
local config_target="$nushell_dir/config.nu"
269267

270268
mkdir -p "$nushell_dir"
271-
remove_target_if_identical "$config_target" "$config_source"
269+
remove_target_if_identical "$nushell_dir/config.nu" "$SCRIPT_DIR/nushell/.config/nushell/config.nu"
270+
remove_target_if_identical "$nushell_dir/env.nu" "$SCRIPT_DIR/nushell/.config/nushell/env.nu"
272271

273272
stow "${STOW_FLAGS[@]}" -d "$SCRIPT_DIR" -vt "$HOME" nushell
274273
}

omarchy/nushell/.config/nushell/config.nu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@
1717
# options using:
1818
# config nu --doc | nu-highlight | less -R
1919
use /home/eduardo/repos/claude-nu/claude-nu/
20+
21+
source ~/.zoxide.nu
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# env.nu
2+
#
3+
#
4+
# Installed by:
5+
# version = "0.107.0"
6+
#
7+
# Previously, environment variables were typically configured in `env.nu`.
8+
# In general, most configuration can and should be performed in `config.nu`
9+
# or one of the autoload directories.
10+
#
11+
# This file is generated for backwards compatibility for now.
12+
# It is loaded before config.nu and login.nu
13+
#
14+
# See https://www.nushell.sh/book/configuration.html
15+
#
16+
# Also see `help config env` for more options.
17+
#
18+
# You can remove these comments if you want or leave
19+
# them for future reference.
20+
#
21+
zoxide init nushell | save -f ~/.zoxide.nu

0 commit comments

Comments
 (0)