Last active
July 11, 2022 01:36
-
-
Save jgermade/d7943af70a01f23ed601c24fd0477b43 to your computer and use it in GitHub Desktop.
sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias ll='ls -alF' | |
alias l='ls -alF' | |
alias c='clear' | |
alias .='echo $PWD' | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ....='cd ../../..' | |
alias .....='cd ../../../..' | |
alias ......='cd ../../../../..' | |
alias ~='cd ~' | |
alias nuke='rm -rf' | |
alias pull='echo "Pulling from branch: $(git symbolic-ref --short HEAD)" && git pull origin $(git symbolic-ref --short HEAD)' | |
alias push='echo "Pushing to branch: $(git symbolic-ref --short HEAD)" && git push origin $(git symbolic-ref --short HEAD)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ret_status="%(?:%{$fg_bold[white]%}➤ :%{$fg_bold[red]%}➤ %s)" | |
PROMPT='%{$fg[blue]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%} %{$fg_bold[green]%}%p %{$fg[yellow]%}%~ %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}${ret_status}% %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$bg[blue]%}%{$fg[white]%} " | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg_bold[yellow]%}⚡ %{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[white]%}✓ %{$reset_color%} " | |
# util for custom tab name | |
function git_current_branch() { | |
ingit=`git rev-parse --is-inside-work-tree 2>/dev/null` | |
if [ "$ingit" = "true" ]; then | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || \ | |
ref=$(git rev-parse --short HEAD 2> /dev/null) || return | |
echo " [ ${ref#refs/heads/} ]" | |
fi | |
} | |
# custom tab name | |
function precmd { | |
# echo -ne "\e]1;${PWD//*\//} $(git_prompt_info)\a" | |
print -Pn "\e]0;$(pwd | sed -e "s,^$HOME,~,")$(git_current_branch)\a" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unset color_prompt force_color_prompt | |
export PS1=' \e[93m\w $(__git_ps1 "\e[44;97m %s \e[49m ")\[\033[01;39m\]➤\[\033[00m\] ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ret_status="%(?:%{$fg_bold[white]%}➤ :%{$fg_bold[red]%}➤ %s)" | |
PROMPT='%{$fg_bold[green]%}%p %{$fg[yellow]%}%~ %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}${ret_status}% %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$bg[blue]%}%{$fg[white]%} " | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg_bold[yellow]%}⚡ %{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[white]%}✓ %{$reset_color%} " | |
# util for custom tab name | |
function git_current_branch() { | |
ingit=`git rev-parse --is-inside-work-tree 2>/dev/null` | |
if [ "$ingit" = "true" ]; then | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || \ | |
ref=$(git rev-parse --short HEAD 2> /dev/null) || return | |
echo " [ ${ref#refs/heads/} ]" | |
fi | |
} | |
# custom tab name | |
function precmd { | |
# echo -ne "\e]1;${PWD//*\//} $(git_prompt_info)\a" | |
print -Pn "\e]0;$(pwd | sed -e "s,^$HOME,~,")$(git_current_branch)\a" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mind If I steal alias nuke='rm -rf' ?