Bye OMZ; Hola, Starship
This commit is contained in:
parent
0f1c46d373
commit
c9b459c574
36
aliases.sh
36
aliases.sh
|
@ -2,13 +2,16 @@
|
|||
|
||||
## Variables de ambiente
|
||||
|
||||
export PATH=/home/perro/.local/bin:$PATH
|
||||
export PATH=/home/perro/.cargo/bin:$PATH
|
||||
export VENV=.venv
|
||||
export LENGTH=79
|
||||
export FONT_DIR=$HOME/.fonts
|
||||
export OZSH_ALIAS=$ZSH_CUSTOM/aliases.zsh
|
||||
export BASH_ALIAS=$HOME/.bash_aliases
|
||||
export RLOC_ALIAS=$HOME/Repositorios/aliases/aliases.sh
|
||||
export REPO_ALIAS=https://gitlab.com/perritotuerto/codigo/aliases/-/raw/no-masters/aliases.sh
|
||||
export FLINSTALL=/usr
|
||||
export FREELINGDIR=$FLINSTALL
|
||||
|
||||
## Eliminación de alias previos
|
||||
|
||||
|
@ -286,34 +289,20 @@ aliases () {
|
|||
aliases link
|
||||
else
|
||||
curl -o $BASH_ALIAS $REPO_ALIAS
|
||||
if [ -f "$OZSH_ALIAS" ]; then
|
||||
cp $BASH_ALIAS $OZSH_ALIAS
|
||||
fi
|
||||
fi
|
||||
recargar
|
||||
;;
|
||||
ver | see)
|
||||
if [ -f "$OZSH_ALIAS" ]; then
|
||||
echo $OZSH_ALIAS
|
||||
c $OZSH_ALIAS
|
||||
else
|
||||
echo $BASH_ALIAS
|
||||
c $BASH_ALIAS
|
||||
fi
|
||||
echo $BASH_ALIAS
|
||||
c $BASH_ALIAS
|
||||
;;
|
||||
editar | edit)
|
||||
if [ -f "$OZSH_ALIAS" ]; then
|
||||
e $OZSH_ALIAS
|
||||
else
|
||||
e $BASH_ALIAS
|
||||
fi
|
||||
e $BASH_ALIAS
|
||||
;;
|
||||
empujar | push)
|
||||
repo=$(parent $RLOC_ALIAS)
|
||||
if [ -f "$RLOC_ALIAS" ]; then
|
||||
if [ -f "$OZSH_ALIAS" ] && [ ! -L "$OZSH_ALIAS" ]; then
|
||||
cp -u $OZSH_ALIAS $RLOC_ALIAS
|
||||
elif [ -f "$BASH_ALIAS" ] && [ ! -L "$BASH_ALIAS" ]; then
|
||||
if [ -f "$BASH_ALIAS" ] && [ ! -L "$BASH_ALIAS" ]; then
|
||||
cp -u $BASH_ALIAS $RLOC_ALIAS
|
||||
fi
|
||||
if output=$(git -C $repo status --porcelain) && [ ! -z "$output" ]; then
|
||||
|
@ -330,9 +319,6 @@ aliases () {
|
|||
;;
|
||||
enlazar | link)
|
||||
if [ -f "$RLOC_ALIAS" ]; then
|
||||
if [ -f "$OZSH_ALIAS" ]; then
|
||||
ln -fs $RLOC_ALIAS $OZSH_ALIAS
|
||||
fi
|
||||
if [ -f "$BASH_ALIAS" ]; then
|
||||
ln -fs $RLOC_ALIAS $BASH_ALIAS
|
||||
fi
|
||||
|
@ -374,11 +360,7 @@ Ejemplos:
|
|||
### Recarga aliases
|
||||
|
||||
recargar () {
|
||||
if [ -f "$OZSH_ALIAS" ]; then
|
||||
source $HOME/.zshrc
|
||||
else
|
||||
source $HOME/.bashrc
|
||||
fi
|
||||
source $HOME/.bashrc
|
||||
}
|
||||
|
||||
### Respalda discos
|
||||
|
|
Loading…
Reference in New Issue