Updated fish project manager for better paths.
This commit is contained in:
@@ -9,8 +9,8 @@ set -gx EDITOR nvim
|
|||||||
set -gx VISUAL nvim
|
set -gx VISUAL nvim
|
||||||
set -gx MANPAGER "nvim +Man!"
|
set -gx MANPAGER "nvim +Man!"
|
||||||
set -gx BROWSER firefox
|
set -gx BROWSER firefox
|
||||||
set -gx TERM "xterm-256color"
|
set -gx TERM xterm-256color
|
||||||
set -gx COLORTERM "truecolor"
|
set -gx COLORTERM truecolor
|
||||||
set -gx LANG "en_US.UTF-8"
|
set -gx LANG "en_US.UTF-8"
|
||||||
set -gx LC_ALL "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'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/.local/bin"
|
||||||
fish_add_path "$HOME/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/.local/apps/nvim/bin"
|
||||||
fish_add_path "$HOME/.npm-global/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 "$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 $GOPATH/bin
|
||||||
fish_add_path "$HOME/.local/bin"
|
fish_add_path "$HOME/.local/bin"
|
||||||
fish_add_path "$HOME/bin"
|
fish_add_path "$HOME/bin"
|
||||||
|
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# ALIASES & ABBREVIATIONS
|
# ALIASES & ABBREVIATIONS
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
@@ -117,12 +116,12 @@ function pp
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
# Case 2: No arguments - Select and Open
|
# 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"
|
if test -n "$selection"
|
||||||
cd "$selection"
|
cd "$selection"
|
||||||
commandline -f repaint # Ensures the prompt updates after cd
|
commandline -f repaint # Ensures the prompt updates after cd
|
||||||
nvim
|
hx
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user