Actualización
This commit is contained in:
parent
7d5147336c
commit
fa1c9436ac
17
aliases.sh
17
aliases.sh
|
@ -74,6 +74,7 @@ alias pip='pip3'
|
||||||
alias python='python3'
|
alias python='python3'
|
||||||
alias ipython='ipython3'
|
alias ipython='ipython3'
|
||||||
alias selene="selene --config $HOME/.config/selene/config.toml"
|
alias selene="selene --config $HOME/.config/selene/config.toml"
|
||||||
|
alias stylua="stylua --config-path $HOME/.config/stylua/config.toml"
|
||||||
|
|
||||||
## Acciones
|
## Acciones
|
||||||
|
|
||||||
|
@ -529,7 +530,7 @@ git () {
|
||||||
pymp () {
|
pymp () {
|
||||||
case $1 in
|
case $1 in
|
||||||
-f | formatear | format)
|
-f | formatear | format)
|
||||||
black --line-length $LENGTH ${@:$#} ;;
|
black --line-length $LENGTH ${@:$#} --quiet ;;
|
||||||
-h | --help | help | ayuda)
|
-h | --help | help | ayuda)
|
||||||
pymp-help ;;
|
pymp-help ;;
|
||||||
esac
|
esac
|
||||||
|
@ -561,9 +562,21 @@ Ejemplos:
|
||||||
|
|
||||||
c () {
|
c () {
|
||||||
if [[ $1 == *.json ]]; then
|
if [[ $1 == *.json ]]; then
|
||||||
cat $@ | jq | bat -l json
|
cat $@ | jq | bat --file-name $1 --language json
|
||||||
else
|
else
|
||||||
bat $@
|
bat $@
|
||||||
fi
|
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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue