fish config cleanup.

This commit is contained in:
2026-05-26 08:07:51 +02:00
parent 20bcf236ca
commit 8e63ee325b
+4 -31
View File
@@ -87,6 +87,8 @@ alias ldk='lazydocker'
# Custom shortcuts
alias reload='source ~/.config/fish/config.fish'
alias prj='cd ~/Projects/ && ll'
alias dots='cd ~/.dotfiles'
alias dotman='bash ~/.dotfiles/install.sh'
alias todo='cd ~/Todo/ && nvim index.md'
alias myip='curl ipinfo.io/ip; echo ""'
@@ -99,38 +101,9 @@ alias db='lazysql'
alias services-up='docker compose -f /home/jason/Documents/Compose/local-services/docker-compose.yaml up -d'
alias services-down='docker compose -f /home/jason/Documents/Compose/local-services/docker-compose.yaml down'
# ==============================================================================
# FUNCTIONS
# ==============================================================================
# Project Manager
## Basic project picker using mini sessions and neovim
function pp
set -l project_file "$HOME/.projects"
# Create the file if it doesn't exist
if not test -f "$project_file"
touch "$project_file"
end
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 "Added: $absolute_path"
end
else
# Case 2: No arguments - Select and Open
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"
clear
cd "$selection"
commandline -f repaint # Ensures the prompt updates after cd
end
end
nvim -c "lua MiniSessions.select()"
end
# ==============================================================================