Better git in home dir
This commit is contained in:
parent
fea6955b8f
commit
bc5fd58ebc
|
@ -243,6 +243,21 @@ function xterm_title_preexec () {
|
||||||
print -Pn -- '\e]2;' && print -n -- "${(q)1}\a"
|
print -Pn -- '\e]2;' && print -n -- "${(q)1}\a"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if [[ "$TERM" == (Eterm*|alacritty*|aterm*|gnome*|konsole*|kterm*|putty*|rxvt*|screen*|tmux*|xterm*) ]]; then
|
||||||
|
add-zsh-hook -Uz precmd xterm_title_precmd
|
||||||
|
add-zsh-hook -Uz preexec xterm_title_preexec
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
###########################################
|
||||||
|
# Aliases
|
||||||
|
###########################################
|
||||||
|
|
||||||
|
|
||||||
|
if command -v fdfind &> /dev/null; then
|
||||||
|
alias fd="fdfind"
|
||||||
|
fi
|
||||||
function o () {
|
function o () {
|
||||||
xdg-open "$1" &!
|
xdg-open "$1" &!
|
||||||
}
|
}
|
||||||
|
@ -253,32 +268,28 @@ function run_waypipe() {
|
||||||
SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t $1 env REMOTE_PATH=\"$REMOTE_PATH\" SSH_SESSION_ID=$SSH_SESSION_ID "zsh --login"
|
SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t $1 env REMOTE_PATH=\"$REMOTE_PATH\" SSH_SESSION_ID=$SSH_SESSION_ID "zsh --login"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function git() {
|
||||||
|
if [ "$HOME" = "$(pwd)" ]; then
|
||||||
|
/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME" "$@"
|
||||||
|
else
|
||||||
|
/usr/bin/git "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
alias mallorea="run_waypipe mallorea"
|
alias mallorea="run_waypipe mallorea"
|
||||||
alias vault="run_waypipe vault"
|
alias vault="run_waypipe vault"
|
||||||
alias riva="run_waypipe riva"
|
alias riva="run_waypipe riva"
|
||||||
alias kell="run_waypipe kell"
|
alias kell="run_waypipe kell"
|
||||||
|
|
||||||
if [[ "$TERM" == (Eterm*|alacritty*|aterm*|gnome*|konsole*|kterm*|putty*|rxvt*|screen*|tmux*|xterm*) ]]; then
|
|
||||||
add-zsh-hook -Uz precmd xterm_title_precmd
|
|
||||||
add-zsh-hook -Uz preexec xterm_title_preexec
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Aliases
|
|
||||||
if command -v fdfind &> /dev/null; then
|
|
||||||
alias fd="fdfind"
|
|
||||||
fi
|
|
||||||
alias ls="ls --color=auto"
|
alias ls="ls --color=auto"
|
||||||
alias gdb='gdb -q'
|
alias gdb='gdb -q'
|
||||||
alias ll='ls -lhat'
|
alias ll='ls -lhat'
|
||||||
alias clip="xsel --clipboard"
|
|
||||||
alias compress="tar --use-compress-program=lbzip2 -cvf"
|
alias compress="tar --use-compress-program=lbzip2 -cvf"
|
||||||
alias vim="nvim"
|
alias vim="nvim"
|
||||||
alias dot='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'
|
|
||||||
alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts"
|
alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts"
|
||||||
alias xbindkeys="xbindkeys -f $XDG_CONFIG_HOME/xbindkeys/config"
|
|
||||||
alias python=python3
|
alias python=python3
|
||||||
alias r=". ranger"
|
alias r="cd \"\$(lf -print-selection -print-last-dir)\""
|
||||||
alias v="vim . && cd \"\$(cat /tmp/oil_dir 2> /dev/null || pwd)\""
|
alias v="nvim -c ':lua require(\"oil\").open()' && cd \"\$(cat /tmp/oil_dir 2> /dev/null || pwd)\""
|
||||||
alias cpr="rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1"
|
alias cpr="rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1"
|
||||||
alias mvr="rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files"
|
alias mvr="rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files"
|
||||||
alias rg="rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'"
|
alias rg="rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'"
|
||||||
|
|
Loading…
Reference in New Issue