Last active
September 25, 2025 03:57
-
-
Save fuzzbuster/f44692171d5c059d5d5368be7b21d852 to your computer and use it in GitHub Desktop.
[Kali](https://gitlab.com/kalilinux/packages/kali-defaults/-/blob/kali/master/etc/skel/.zshrc) + [OhMyZsh](https://github.com/ohmyzsh/ohmyzsh)
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
| # Minimal merge of oh-my-zsh with Kali-specific features | |
| export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$HOME/go/bin:$PATH | |
| export ZSH="$HOME/.oh-my-zsh" | |
| # Oh-my-zsh configuration | |
| # Use custom Kali prompt | |
| # ZSH_THEME="" | |
| plugins=( | |
| git | |
| tmux | |
| fzf | |
| mise | |
| docker | |
| extract | |
| debian | |
| aliases | |
| alias-finder | |
| command-not-found | |
| colored-man-pages | |
| # git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions | |
| # git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting | |
| zsh-autosuggestions | |
| zsh-syntax-highlighting | |
| ) | |
| apt_pref='apt' | |
| apt_upgr='full-upgrade' | |
| source $ZSH/oh-my-zsh.sh | |
| # Kali-specific zsh options | |
| setopt magicequalsubst # filename expansion for 'anything=expression' | |
| setopt nonomatch # hide pattern match errors | |
| setopt numericglobsort # numeric filename sorting | |
| WORDCHARS='_-' # word characters | |
| # Kali-specific key bindings | |
| bindkey '^[[3;5~' kill-word # Ctrl + Del | |
| bindkey '^[[5~' beginning-of-buffer-or-history # Page Up | |
| bindkey '^[[6~' end-of-buffer-or-history # Page Down | |
| bindkey '^[[Z' undo # Shift + Tab | |
| # OhMyZsh - alias finder configure | |
| zstyle ':omz:plugins:alias-finder' autoload yes # disabled by default | |
| # zstyle ':omz:plugins:alias-finder' longer yes # disabled by default | |
| # zstyle ':omz:plugins:alias-finder' exact yes # disabled by default | |
| zstyle ':omz:plugins:alias-finder' cheaper yes # disabled by default | |
| # Completion enhancements | |
| zstyle ':completion:*' auto-description 'specify: %d' | |
| zstyle ':completion:*' format 'Completing %d' | |
| zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s | |
| zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' | |
| # Color support enhancements | |
| if [ -x /usr/bin/dircolors ]; then | |
| test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
| export LS_COLORS="$LS_COLORS:ow=30;44:" # fix ls color for 777 folders | |
| alias ip='ip --color=auto' | |
| # Completion colors (override defaults if needed) | |
| zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' | |
| fi | |
| # Time format | |
| TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P' | |
| # Kali-specific prompt | |
| PROMPT_EOL_MARK="" # Hide EOL sign | |
| configure_prompt() { | |
| prompt_symbol=π | |
| local git_info='$(git_prompt_info)' | |
| case "$PROMPT_ALTERNATIVE" in | |
| twoline) | |
| PROMPT=$'%F{%(#.blue.green)}βββ${debian_chroot:+($debian_chroot)β}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))β}(%B%F{%(#.red.blue)}%n'$prompt_symbol$'%m%b%F{%(#.blue.green)})-[%B%F{reset}%(6~.%-1~/β¦/%4~.%5~)%b%F{%(#.blue.green)}]'$git_info$'\nββ%B%(#.%F{red}#.%F{blue}$)%b%F{reset} ' | |
| ;; | |
| oneline) | |
| PROMPT=$'${debian_chroot:+($debian_chroot)}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{%(#.red.blue)}%n@%m%b%F{reset}:%B%F{%(#.blue.green)}%~%b%F{reset}'$git_info$'%(#.#.$) ' | |
| ;; | |
| backtrack) | |
| PROMPT=$'${debian_chroot:+($debian_chroot)}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{red}%n@%m%b%F{reset}:%B%F{blue}%~%b%F{reset}'$git_info$'%(#.#.$) ' | |
| ;; | |
| esac | |
| } | |
| # Git prompt styling | |
| ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}β[%F{green}" | |
| ZSH_THEME_GIT_PROMPT_SUFFIX="%F{yellow}]%f" | |
| ZSH_THEME_GIT_PROMPT_DIRTY="%F{red}β%f" | |
| ZSH_THEME_GIT_PROMPT_CLEAN="%F{green}β%f" | |
| # Prompt setup | |
| PROMPT_ALTERNATIVE=twoline | |
| NEWLINE_BEFORE_PROMPT=yes | |
| if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then | |
| debian_chroot=$(cat /etc/debian_chroot) | |
| fi | |
| VIRTUAL_ENV_DISABLE_PROMPT=1 | |
| configure_prompt | |
| # Terminal title | |
| case "$TERM" in | |
| xterm*|rxvt*|Eterm|aterm|kterm|gnome*|alacritty) | |
| TERM_TITLE=$'\e]0;${debian_chroot:+($debian_chroot)}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%n@%m: %~\a' | |
| ;; | |
| esac | |
| precmd() { | |
| print -Pnr -- "$TERM_TITLE" | |
| if [ "$NEWLINE_BEFORE_PROMPT" = yes ]; then | |
| if [ -z "$_NEW_LINE_BEFORE_PROMPT" ]; then | |
| _NEW_LINE_BEFORE_PROMPT=1 | |
| else | |
| print "" | |
| fi | |
| fi | |
| } | |
| # Prompt toggle (Ctrl+P) | |
| toggle_oneline_prompt(){ | |
| if [ "$PROMPT_ALTERNATIVE" = oneline ]; then | |
| PROMPT_ALTERNATIVE=twoline | |
| else | |
| PROMPT_ALTERNATIVE=oneline | |
| fi | |
| configure_prompt | |
| zle reset-prompt | |
| } | |
| zle -N toggle_oneline_prompt | |
| bindkey ^P toggle_oneline_prompt | |
| # Syntax highlighting styles | |
| if [[ -n "$ZSH_HIGHLIGHT_STYLES" ]]; then | |
| ZSH_HIGHLIGHT_STYLES[unknown-token]=underline | |
| ZSH_HIGHLIGHT_STYLES[reserved-word]=fg=cyan,bold | |
| ZSH_HIGHLIGHT_STYLES[suffix-alias]=fg=green,underline | |
| ZSH_HIGHLIGHT_STYLES[global-alias]=fg=green,bold | |
| ZSH_HIGHLIGHT_STYLES[precommand]=fg=green,underline | |
| ZSH_HIGHLIGHT_STYLES[commandseparator]=fg=blue,bold | |
| ZSH_HIGHLIGHT_STYLES[autodirectory]=fg=green,underline | |
| ZSH_HIGHLIGHT_STYLES[path]=bold | |
| ZSH_HIGHLIGHT_STYLES[globbing]=fg=blue,bold | |
| ZSH_HIGHLIGHT_STYLES[history-expansion]=fg=blue,bold | |
| ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]=fg=magenta,bold | |
| ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]=fg=magenta,bold | |
| ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=fg=green | |
| ZSH_HIGHLIGHT_STYLES[double-hyphen-option]=fg=green | |
| ZSH_HIGHLIGHT_STYLES[single-quoted-argument]=fg=yellow | |
| ZSH_HIGHLIGHT_STYLES[double-quoted-argument]=fg=yellow | |
| ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]=fg=yellow | |
| ZSH_HIGHLIGHT_STYLES[rc-quote]=fg=magenta | |
| ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]=fg=magenta,bold | |
| ZSH_HIGHLIGHT_STYLES[redirection]=fg=blue,bold | |
| ZSH_HIGHLIGHT_STYLES[comment]=fg=black,bold | |
| ZSH_HIGHLIGHT_STYLES[arg0]=fg=cyan | |
| ZSH_HIGHLIGHT_STYLES[bracket-error]=fg=red,bold | |
| ZSH_HIGHLIGHT_STYLES[bracket-level-1]=fg=blue,bold | |
| ZSH_HIGHLIGHT_STYLES[bracket-level-2]=fg=green,bold | |
| ZSH_HIGHLIGHT_STYLES[bracket-level-3]=fg=magenta,bold | |
| ZSH_HIGHLIGHT_STYLES[bracket-level-4]=fg=yellow,bold | |
| ZSH_HIGHLIGHT_STYLES[bracket-level-5]=fg=cyan,bold | |
| ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]=standout | |
| fi | |
| # Auto-suggestions style | |
| ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=244' | |
| # Mise integration | |
| if command -v mise >/dev/null 2>&1; then | |
| eval "$(mise activate zsh)" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment