puntos/.zshrc

82 lines
2.0 KiB
Bash
Raw Permalink Normal View History

source ~/.profile
HISTFILE=~/.histfile
HISTSIZE=100000
SAVEHIST=100000
2022-02-07 19:35:49 +00:00
# Permitir comentarios en la shell
setopt interactive_comments
setopt autocd extendedglob notify
bindkey -e
bindkey "^[f" forward-word
bindkey "^[b" backward-word
zmodload zsh/complist
zstyle ':completion:*' menu yes select
zstyle ':completion:*' list-dirs-first yes
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
zstyle :compinstall filename ~/.zshrc
autoload -Uz compinit && compinit
# Advertencia: no es seguro entrar a carpetas desconfiables con esto...
# https://blog.sonarsource.com/securing-developer-tools-git-integrations
autoload -Uz vcs_info
zstyle ':vcs_info:*' actionformats \
'%F{4}[%F{2}%b%F{3}|%F{1}%a%F{4}]%f '
zstyle ':vcs_info:*' formats '%F{4}%b%f '
zstyle ':vcs_info:*' enable git
precmd () { vcs_info }
setopt promptsubst
PS1=$'%{\e]133;A%}''%F{5} %3~ ${vcs_info_msg_0_}%f%# '
2021-12-26 20:42:45 +00:00
"$REMOTE" && PS1='%n@%m '$PS1
alias ls='ls --color=always'
alias grep='grep --color=always'
alias ssh='TERM=xterm-256color ssh'
alias e="$EDITOR"
alias r="trash -r"
2022-09-25 20:20:10 +00:00
alias a='nohup nautilus "$(pwd)" >/dev/null &; disown'
2022-03-13 20:54:18 +00:00
2022-03-17 12:31:56 +00:00
alias g='git'
2022-03-17 02:11:39 +00:00
alias gc='git commit'
2022-04-07 17:42:08 +00:00
alias gcp='git commit -p'
2023-01-12 00:55:11 +00:00
alias gr='git restore'
alias grp='git restore -p'
2022-04-07 17:42:08 +00:00
alias gco='git checkout'
alias gl='git log'
2022-03-17 02:42:04 +00:00
alias gs='git status'
2022-03-17 02:11:39 +00:00
alias ga='git add'
2022-04-10 20:26:15 +00:00
alias gap='git add -p'
2022-03-17 02:11:39 +00:00
alias gt='git tag'
alias gp='git push'
alias gpo='git push origin' # Para tags: git push origin 1.0.2 / gpo 1.0.2
alias gitdf='git --git-dir=$HOME/.config/dotfiles/ --work-tree=$HOME'
2022-03-17 12:31:56 +00:00
alias gd='gitdf'
2022-04-10 15:00:24 +00:00
alias gdc='gitdf commit'
2022-03-17 02:11:39 +00:00
alias gdcp='gitdf commit -p'
2022-04-10 20:26:19 +00:00
alias gdl='git log'
2022-03-17 12:31:24 +00:00
alias gda='gitdf add'
2022-04-10 20:26:15 +00:00
alias gdap='gitdf add -p'
2022-03-17 02:42:04 +00:00
alias gds='gitdf status'
2022-03-17 02:11:39 +00:00
alias gdp='gitdf push'
source /usr/share/fzf/key-bindings.zsh
2021-12-23 00:12:11 +00:00
source ~/.config/zsh/bg_notify.zsh
2021-12-26 20:42:45 +00:00
! "$REMOTE" && source ~/.config/zsh/osc_7.zsh
2021-12-26 20:42:45 +00:00
if ! "$REMOTE"; then
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
# Start if not started
gpg-agent --daemon 2>/dev/null
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
fi