#nushell

3 posts · Last used 16h

handling of PATH i’ve been configuring my system and when i checked my PATH there were duplicates. so i started trying to deduplicate it for tidiness, so far i’ve been messing around with 90-user.conf and .profile files. i also did some other stuff in my nushell configs but that’s because of how nushell works, so i don’t have much doubts about that. i’ll try to be as clear, concise as possible, but since i’ve started doing this stuff very recently i might not exactly know where to aim my question. so i guess i have doubts regarding if this is a correct way to handle PATH declaration and deduplication. from what i understand, i need to define it in various places because having a correct path depends largely on where you’re inheriting it. so maybe your GUI session has a proper PATH, but if you log in through a TTY or similar you might have a different one. also different files also add their own stuff. so should i only care about these 2 files to have a proper file or is there something else i should keep in mind? is the reasoning correct? if you need some other file just let me know and i’ll share it if it’s useful. below is system information in case it’s relevant. ❯ fastfetch ╭─ システム [ghost-user] │ │ os Fedora Linux 43 │ kernel 7.2.13-100.fc43.x86_64 │ age 345 days │ uptime 8 hours, 10 mins │ shell nushell 0.99.1 │ de GNOME 49.10 │ wm Mutter (Wayland) │ cpu AMD Ryzen 5 5600G 4.46 GHz │ memory 5.23 GiB / 7.05 GiB (74%) │ │ 過去を殺せ ╰────────────────────────────────────────── #90-user.conf EDITOR=hx BROWSER=firefox XDG_DATA_HOME=$HOME/.local/share XDG_CONFIG_HOME=$HOME/.config XDG_CACHE_HOME=$HOME/.cache PATH=$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.opencode/bin:/usr/local/go/bin${PATH:+:$PATH} PKG_CONFIG_PATH=/usr/lib64/pkgconfig #.profile export _DOTFILES_PROFILE_SOURCED=1 case ":$PATH:" in *":$HOME/.opencode/bin:"*) ;; *) PATH="$HOME/.opencode/bin:$PATH" ;; esac [ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env" case ":$PATH:" in *":/usr/local/go/bin:"*) ;; *) PATH="$PATH:/usr/local/go/bin" ;; esac if [ -n "$PATH" ]; then pinned="" IFS_OLD=$IFS IFS=: for _d in $PATH; do [ -z "$_d" ] && continue case ":$pinned:" in *":$_d:"*) continue ;; esac [ "$_d" = "$HOME/.local/bin" ] && continue pinned="${pinned}${pinned:+:}${_d}" done IFS=$IFS_OLD unset _d export PATH="$HOME/.local/bin:$pinned" fi verification: #bash ❯ echo "$PATH" | tr ':' '\n' /home/ghost_user/.local/bin /usr/lib64/ccache /home/ghost_user/.cargo/bin /home/ghost_user/.opencode/bin /usr/local/go/bin /usr/local/bin /usr/bin #nushell ❯ $env.PATH ╭───┬────────────────────────────────╮ │ 0 │ /home/ghost_user/.local/bin │ │ 1 │ /usr/lib64/ccache │ │ 2 │ /home/ghost_user/.cargo/bin │ │ 3 │ /home/ghost_user/.opencode/bin │ │ 4 │ /usr/local/go/bin │ │ 5 │ /usr/local/bin │ │ 6 │ /usr/bin │ ╰───┴────────────────────────────────╯
0
1
0
0
Is there a quick way to disable colors in #nushell without writing the whole theme by hand (I guess a oneliner is possible, but…) I want it too look good on both light random pastel background as well as on dark or black background, and I don't want to toy around too much until I actually want something highlighted. Can even have even no attributes like bold at first.
0
4
0
0
Replying to
Posh starts for ages. #Nushell… just had a bad issue in ubuntu snap for over a year, [the issue of it segfaulting on any attempt to use its http client][https://github.com/nushell/nushell/issues/15587] Haven’t thought to try it outside WSL. But I don’t really trust it with how it cant even respect NO_COLOR fully and seems to rely on 256color
0
2
0
0