Merge remote-tracking branch 'origin/main'

This commit is contained in:
Eryn Wells 2025-08-09 07:46:48 -07:00
commit 196004e993
4 changed files with 36 additions and 2 deletions

View file

@ -120,7 +120,8 @@ lspconfig.rust_analyzer.setup {
enable = true,
},
},
checkOnSave = {
checkOnSave = true,
check = {
command = 'clippy',
extraArgs = {
"--",

31
zsh/func/bool Normal file
View file

@ -0,0 +1,31 @@
# Eryn Wells <eryn@erynwells.me>
# vim: set ft=zsh:
function bool {
if [[ "$1" =~ '^-?[0-9]+$' ]]; then
if (( $1 == 0 )); then
echo "no"
return 1
else
echo "yes"
return 0
fi
fi
local lowercase_value=${(L)1}
if [[ "$lowercase_value" == "yes" || "$lowercase_value" == "true" ]]; then
echo "yes"
return 0
fi
if [[ "$lowercase_value" == "no" || "$lowercase_value" == "false" ]]; then
echo "no"
return 1
fi
echo "no"
return 1
}
bool "$@"

View file

@ -20,7 +20,8 @@ Arguments
---------
%B-e%b | %B--export%b | %B--no-export%b
Export the variable after modification.
Export the variable after modification. The default is to export if the
variable is modified.
%B-f%b | %B--force%b
Unconditionally add the path, even if it doesn't exist.

1
zshrc
View file

@ -21,6 +21,7 @@ fi
do_init_functions zsh_init_rc_functions
autoload -Uz bool
autoload -Uz g
autoload -Uz nethack
autoload -Uz pw