Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Enable color support
- autoload -U colors && colors
- # Set the prompt
- PROMPT='%F{white}╰─λ %F{white}'
- RPROMPT=''
- # Function to calculate command execution time
- precmd() {
- elapsed_time=$(( ($(date +%s%3N) - cmd_start_time) ))
- PS1="%F{red}╭─%n@%m %F{magenta}%~ took ${elapsed_time}ms
- %F{white}╰─λ %F{white}"
- }
- preexec() {
- cmd_start_time=$(date +%s%3N)
- }
- # Enable auto-correction
- setopt CORRECT
- # Enable command auto-completion
- autoload -U compinit && compinit
- # Enable extended globbing and regular expressions
- setopt EXTENDED_GLOB
- # History settings
- HISTFILE=~/.zsh_history
- HISTSIZE=1000
- SAVEHIST=1000
- setopt APPEND_HISTORY
- setopt INC_APPEND_HISTORY
- setopt SHARE_HISTORY
- setopt HIST_IGNORE_ALL_DUPS
- setopt HIST_FIND_NO_DUPS
- # Aliases
- alias ll='ls -lah'
- alias ..='cd ..'
- alias ...='cd ../..'
- # Load custom scripts if they exist
- if [ -d "$HOME/.zshrc.d" ]; then
- for file in "$HOME/.zshrc.d"/*.zsh; do
- [ -r "$file" ] && source "$file"
- done
- fi
Add Comment
Please, Sign In to add comment