dev: automated commit - 2025-09-28 19:29:58

This commit is contained in:
Mariano Z. 2025-09-28 19:29:58 -03:00
parent c9829cac0f
commit efa863631d
7 changed files with 140 additions and 111 deletions

View file

@ -88,3 +88,30 @@ elif [[ -n "${ZSH_VERSION:-}" ]]; then
compdef _yay_zsh_completion yay
fi
_use_node_completion() {
local -a versions
local script_dir=""
# Find the script directory
if [ -f "./use-node.sh" ]; then
script_dir="."
else
# Find the actual script location
script_dir="$(dirname "$(readlink -f ~/.local/bin/use-node 2>/dev/null || echo ~/.local/bin/use-node)")"
fi
# Get versions from nodejs-* directories only
if [ -d "$script_dir" ]; then
versions=($(find "$script_dir" -maxdepth 1 -type d -name "nodejs-*" 2>/dev/null | sed 's/.*nodejs-/node@/'))
fi
if [[ ${#versions[@]} -gt 0 ]]; then
_describe 'node versions' versions
fi
}
# Register the completion
compdef _use_node_completion ./use-node.sh
compdef _use_node_completion use-node.sh
compdef _use_node_completion use-node

View file

@ -723,7 +723,7 @@ yay() {
# System update
update|"-Syu")
echo "Updating NixOS system..."
nh os switch ~/.config/nixos --update
nh os switch ~/.config/nixos --update --ask
;;
# Search packages
@ -781,7 +781,7 @@ EOF
# Default: rebuild system
"")
echo "Rebuilding NixOS system..."
nh os switch ~/.config/nixos
nh os switch ~/.config/nixos --ask
;;
# Try to install unknown commands

View file

@ -21,18 +21,18 @@ zap() {
# Update plugins sequentially (clean output)
for plugin in "${plugins[@]}"; do
plugin_name=${plugin##*/}
if [ ! -d "$PLUGIN_DIR/$plugin_name" ]; then
echo "Installing $plugin_name"
git clone --quiet "https://github.com/$plugin" "$PLUGIN_DIR/$plugin_name" --depth=1
else
old_hash=$(git -C "$PLUGIN_DIR/$plugin_name" rev-parse HEAD 2>/dev/null)
git -C "$PLUGIN_DIR/$plugin_name" fetch --quiet
git -C "$PLUGIN_DIR/$plugin_name" reset --hard origin/HEAD --quiet
new_hash=$(git -C "$PLUGIN_DIR/$plugin_name" rev-parse HEAD 2>/dev/null)
if [ "$old_hash" = "$new_hash" ]; then
echo "$plugin_name (up to date)"
else
@ -40,7 +40,7 @@ zap() {
fi
fi
done
for dir in "$PLUGIN_DIR"/*; do
if [ -d "$dir" ]; then
plugin_name=$(basename "$dir")
@ -50,7 +50,7 @@ zap() {
fi
fi
done
echo "Plugin update complete!"
}
@ -80,6 +80,6 @@ source "$ZDOTDIR/rose-pine.sh"
# Defer loading
zsh-defer source "$PLUGIN_DIR/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
for config in mise.zsh tmux.zsh functions.zsh alias.zsh keymap.zsh path.zsh pnpm.zsh; do
for config in tmux.zsh functions.zsh alias.zsh keymap.zsh path.zsh pnpm.zsh; do
zsh-defer source "$ZDOTDIR/$config"
done