shell: small fixes
This commit is contained in:
@@ -19,11 +19,12 @@ git_branch() {
|
||||
HOST="\[\033[0;33m\]\h\[\033[m\]"
|
||||
GIT="\[\033[0;31m\]\$(git_branch)\[\033[m\]"
|
||||
DIR="\[\033[0;34m\]\w\[\033[m\]"
|
||||
NEWLINE=$'\n'
|
||||
|
||||
PROMPT_COMMAND=__prompt_command
|
||||
__prompt_command() {
|
||||
local EXIT="$?"
|
||||
export PS1="${HOST} ${DIR} ${GIT}"
|
||||
export PS1="${HOST} ${DIR} ${GIT}${NEWLINE}"
|
||||
|
||||
local red_lambda='\[\033[0;31m\]λ>\[\033[00m\] '
|
||||
local green_lambda='\[\033[0;32m\]λ>\[\033[00m\] '
|
||||
|
||||
@@ -36,6 +36,7 @@ alias truecolor='curl -s https://raw.githubusercontent.com/JohnMorales/dotfiles/
|
||||
alias nssh='SSH_AUTH_SOCK= ssh'
|
||||
alias cpu='watch -n.1 "grep \"^[c]pu MHz\" /proc/cpuinfo"'
|
||||
alias fixagent='eval $(tmux show-env -s | grep "^SSH_")'
|
||||
alias whatsmyip='curl https://ipinfo.io/ip ; echo'
|
||||
|
||||
# nmcli
|
||||
alias con='nmcli con'
|
||||
|
||||
@@ -15,7 +15,7 @@ GIT="%{$fg[red]%}\$vcs_info_msg_0_"
|
||||
HOSTN="%{$fg[yellow]%}%m "
|
||||
NEWLINE=$'\n'
|
||||
|
||||
export PROMPT="${HOSTN}${DIR}${GIT} ${BREAK}${NEWLINE}${ICON}%{$reset_color%} "
|
||||
export PROMPT="${HOSTN}${DIR}${GIT}${NEWLINE}${ICON}%{$reset_color%} "
|
||||
zstyle ':vcs_info:git:*' formats ' (%b )'
|
||||
|
||||
# show info in title bar
|
||||
@@ -96,7 +96,6 @@ if [[ -d ~/.vim/plugged/fzf ]]; then
|
||||
[[ -x $(which fzf 2> /dev/null) ]] || export PATH=$PATH:$HOME/.vim/plugged/fzf/bin
|
||||
source ~/.vim/plugged/fzf/shell/completion.zsh
|
||||
source ~/.vim/plugged/fzf/shell/key-bindings.zsh
|
||||
bindkey '^F' fzf-file-widget
|
||||
fi
|
||||
|
||||
# ============================== Fancy Hacks
|
||||
|
||||
Reference in New Issue
Block a user