diff --git a/config/fish/config.fish b/config/fish/config.fish index 7ac2b49..a41d222 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -9,8 +9,8 @@ set -gx EDITOR nvim set -gx VISUAL nvim set -gx MANPAGER "nvim +Man!" set -gx BROWSER firefox -set -gx TERM "xterm-256color" -set -gx COLORTERM "truecolor" +set -gx TERM xterm-256color +set -gx COLORTERM truecolor set -gx LANG "en_US.UTF-8" set -gx LC_ALL "en_US.UTF-8" @@ -42,17 +42,16 @@ set -gx FZF_DEFAULT_COMMAND 'fdfind --exclude={.git,.cache,.xmake,.zig-cache,bui # Fish's 'fish_add_path' is smart: it checks if the dir exists and prevents duplicates. fish_add_path "$HOME/.local/bin" fish_add_path "$HOME/bin" -fish_add_path "/usr/local/bin" +fish_add_path /usr/local/bin fish_add_path "$HOME/.local/apps/nvim/bin" fish_add_path "$HOME/.npm-global/bin" -fish_add_path "/var/lib/flatpak/exports/bin" +fish_add_path /var/lib/flatpak/exports/bin fish_add_path "$HOME/.local/share/flatpak/exports/bin" -fish_add_path "/usr/local/go/bin" +fish_add_path /usr/local/go/bin fish_add_path $GOPATH/bin fish_add_path "$HOME/.local/bin" fish_add_path "$HOME/bin" - # ============================================================================== # ALIASES & ABBREVIATIONS # ============================================================================== @@ -105,24 +104,24 @@ function pp touch "$project_file" end - if count $argv > /dev/null + if count $argv >/dev/null # Case 1: Path provided - Add to list set -l absolute_path (realpath $argv[1]) if grep -Fxq "$absolute_path" "$project_file" echo "Project already exists in list." else - echo "$absolute_path" >> "$project_file" + echo "$absolute_path" >>"$project_file" echo "Added: $absolute_path" end else # Case 2: No arguments - Select and Open - set -l selection (cat "$project_file" | fzf --height 40% --reverse --header="Select Project") + set -l selection (cat "$project_file" | awk -F'/' '{print $NF "\t" $0}' | fzf --height 40% --reverse --header="Select Project" --with-nth=1 --delimiter=(printf '\t') | cut -f2) if test -n "$selection" cd "$selection" commandline -f repaint # Ensures the prompt updates after cd - nvim + hx end end end