Last active
February 8, 2025 09:55
-
-
Save Pandit98himanshu/dfaf5d7d0b3949e6fa5a4067e96a1802 to your computer and use it in GitHub Desktop.
Customize your zsh shell
This file contains 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
# Run Platform Tools Daemon for ADB | |
export PATH=$PATH:~/platform-tools/ | |
# Homebrew binaries path | |
export PATH=/opt/homebrew/bin:$PATH | |
export PATH=$PATH:~/.local/bin | |
# Remove username and replace it with "previous-directory/current-directory % " | |
# Source : https://scriptingosx.com/2019/07/moving-to-zsh-06-customizing-the-zsh-prompt/ | |
PROMPT='[%*]%B%F{blue}%2~%f%b > ' | |
# Display command execution time | |
#RPROMPT='%*' | |
# Type 'tree' to print directory list in tree format | |
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" | |
# Alias for ls | |
alias ls='ls -GFh' | |
# Run java program | |
runj () | |
{ | |
javac "$1.java" && java "$1" | |
} | |
# Set CLICOLOR environment | |
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
# Git support | |
autoload -Uz vcs_info | |
precmd_vcs_info() { vcs_info } | |
precmd_functions+=( precmd_vcs_info ) | |
setopt prompt_subst | |
RPROMPT=\$vcs_info_msg_0_ | |
zstyle ':vcs_info:git:*' formats '%F{240}(%b)%r%f' | |
zstyle ':vcs_info:*' enable git |
All lines start with # is a comment.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is my ~/.zshrc file.