Actualización

This commit is contained in:
perro tuerto 2023-07-01 10:15:29 -07:00
parent 7d5147336c
commit fa1c9436ac
1 changed files with 15 additions and 2 deletions

View File

@ -74,6 +74,7 @@ alias pip='pip3'
alias python='python3'
alias ipython='ipython3'
alias selene="selene --config $HOME/.config/selene/config.toml"
alias stylua="stylua --config-path $HOME/.config/stylua/config.toml"
## Acciones
@ -529,7 +530,7 @@ git () {
pymp () {
case $1 in
-f | formatear | format)
black --line-length $LENGTH ${@:$#} ;;
black --line-length $LENGTH ${@:$#} --quiet ;;
-h | --help | help | ayuda)
pymp-help ;;
esac
@ -561,9 +562,21 @@ Ejemplos:
c () {
if [[ $1 == *.json ]]; then
cat $@ | jq | bat -l json
cat $@ | jq | bat --file-name $1 --language json
else
bat $@
fi
}
# Da formato a archivos
format () {
if [[ $1 == *.md ]]; then
md format $1
elif [[ $1 == *.py ]]; then
pymp format $1
elif [[ $1 == *.lua ]]; then
stylua $1
elif [[ $1 == *.rs ]]; then
rustfmt $1
fi
}