mirror of
https://github.com/Xevion/dotfiles.git
synced 2025-12-06 01:14:48 -06:00
feat: migrate from Zsh to Fish shell with comprehensive configuration
Major shell migration replacing Zsh/Oh-My-Zsh with Fish shell: - Remove all Zsh configurations (dot_zshrc.tmpl, dot_p10k.zsh) - Remove Oh-My-Zsh external dependencies from .chezmoiexternal.toml - Add complete Fish shell setup with config.fish.tmpl and abbr.fish.tmpl - Implement Fish-native functions for lazy-loading tools (mise, pyenv, zoxide, etc.) - Create commonrc.fish.tmpl for cross-shell compatibility - Add Fish plugin management via Fisher (tide prompt, fzf.fish) - Update documentation (CLAUDE.md, TODO.md, ONBOARDING.md) to reflect Fish - Add .fish.tmpl file association to VS Code settings - Enhance PowerShell profile with lsd aliases - Configure git delta pager and zdiff3 merge conflict style - Update WSL keychain integration for Fish shell This migration maintains all existing tool integrations while improving startup performance through lazy-loading and Fish's native features.
This commit is contained in:
@@ -14,9 +14,18 @@ sudo apt install -y xclip xsel
|
||||
{{ end }}
|
||||
|
||||
{{/* TODO: Add basic yes/no prompts before installing packages */ -}}
|
||||
if ! type -P zsh; then
|
||||
echo "chezmoi: Installing zsh"
|
||||
sudo apt install zsh
|
||||
# Install Fisher (Fish plugin manager) and plugins from fish_plugins file
|
||||
if type -P fish; then
|
||||
if [ ! -f ~/.config/fish/functions/fisher.fish ]; then
|
||||
echo "chezmoi: Installing Fisher (Fish plugin manager)"
|
||||
fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher"
|
||||
fi
|
||||
|
||||
# Update plugins from fish_plugins file
|
||||
if [ -f ~/.config/fish/fish_plugins ]; then
|
||||
echo "chezmoi: Updating Fish plugins from fish_plugins file"
|
||||
fish -c "fisher update"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install micro (+ register as text editor)
|
||||
@@ -27,9 +36,8 @@ if ! type -P micro; then
|
||||
sudo mv ./micro /usr/bin/micro
|
||||
fi
|
||||
|
||||
{{/* libpq-dev libssh-dev libsqlite3-dev */ -}}
|
||||
echo "chezmoi: Installing apt packages"
|
||||
PACKAGES='git fzf zsh fish sqlite curl ripgrep jq' # Install and/or update
|
||||
PACKAGES='git fzf fish sqlite curl ripgrep jq' # Install and/or update
|
||||
sudo apt install -y $PACKAGES
|
||||
|
||||
INSTALL_ONLY_PACKAGES='iperf3 unzip p7zip-full nmap reptyr btop' # Install only if missing
|
||||
@@ -75,6 +83,27 @@ if ! type -P chatgpt; then
|
||||
sudo mv chatgpt /usr/local/bin/
|
||||
fi
|
||||
|
||||
# Set Fish as default shell
|
||||
if type -P fish; then
|
||||
FISH_PATH=$(which fish)
|
||||
CURRENT_SHELL=$(getent passwd "$USER" | cut -d: -f7)
|
||||
|
||||
if [ "$CURRENT_SHELL" != "$FISH_PATH" ]; then
|
||||
echo "chezmoi: Setting Fish as default shell"
|
||||
|
||||
# Add fish to /etc/shells if not already present
|
||||
if ! grep -q "^$FISH_PATH$" /etc/shells; then
|
||||
echo "$FISH_PATH" | sudo tee -a /etc/shells
|
||||
fi
|
||||
|
||||
# Change default shell
|
||||
sudo chsh -s "$FISH_PATH" "$USER"
|
||||
echo "chezmoi: Default shell changed to Fish. Please log out and back in for changes to take effect."
|
||||
else
|
||||
echo "chezmoi: Fish is already the default shell"
|
||||
fi
|
||||
fi
|
||||
|
||||
{{- else if eq .chezmoi.os "darwin" -}}
|
||||
#!/bin/sh
|
||||
brew install ripgrep
|
||||
|
||||
Reference in New Issue
Block a user