Advertisement
Guest User

custom_zshrc

a guest
Jun 13th, 2022
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.08 KB | None | 0 0
  1. # Load colours and then set prompt
  2. # Prompt preview:
  3. # [user@hostname]-[~]
  4. # >>>
  5. autoload -U colors && colors
  6. PS1="%{$fg[blue]%}%B[%b%{$fg[magenta]%}%n%{$fg[blue]%}%B βŒ– %b%{$fg[magenta]%}%m%{$fg[blue]%}%B]-%b%{$fg[blue]%}%B[%b%{$fg[white]%}%~%{$fg[blue]%}%B]%
  7. %{$fg[yellow]%}[%D{%f/%m/%y} %D{%L:%M:%S}]
  8. %{$fg[magenta]%}%B🠢🠢🠢%b%{$reset_color%} "
  9.  
  10. # ZSH history file
  11. HISTSIZE=100
  12. SAVEHIST=100
  13. HISTFILE=~/.zsh_history
  14.  
  15. # Fancy auto-complete
  16. autoload -Uz compinit
  17. zstyle ':completion:*' menu select=0
  18. zmodload zsh/complist
  19. zstyle ':completion:*' format '>>> %d'
  20. compinit
  21. _comp_options+=(globdots) # hidden files are included
  22.  
  23. # Keybindings section
  24. bindkey -e
  25. bindkey '^[[7~' beginning-of-line                               # Home key
  26. bindkey '^[[H' beginning-of-line                                # Home key
  27. if [[ "${terminfo[khome]}" != "" ]]; then
  28.   bindkey "${terminfo[khome]}" beginning-of-line                # [Home] - Go to beginning of line
  29. fi
  30. bindkey '^[[8~' end-of-line                                     # End key
  31. bindkey '^[[F' end-of-line                                     # End key
  32. if [[ "${terminfo[kend]}" != "" ]]; then
  33.   bindkey "${terminfo[kend]}" end-of-line                       # [End] - Go to end of line
  34. fi
  35. bindkey '^[[2~' overwrite-mode                                  # Insert key
  36. bindkey '^[[3~' delete-char                                     # Delete key
  37. bindkey '^[[C'  forward-char                                    # Right key
  38. bindkey '^[[D'  backward-char                                   # Left key
  39. bindkey '^[[5~' history-beginning-search-backward               # Page up key
  40. bindkey '^[[6~' history-beginning-search-forward                # Page down key
  41.  
  42. # Navigate words with ctrl+arrow keys
  43. bindkey '^[Oc' forward-word                                     #
  44. bindkey '^[Od' backward-word                                    #
  45. bindkey '^[[1;5D' backward-word                                 #
  46. bindkey '^[[1;5C' forward-word                                  #
  47. bindkey '^H' backward-kill-word                                 # delete previous word with ctrl+backspace
  48. bindkey '^[[Z' undo                                             # Shift+tab undo last action
  49.  
  50. export LD_PRELOAD=""
  51. export EDITOR="vim"
  52. export PATH="$HOME/bin:/usr/lib/ccache/bin/:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/bin/core_perl:/usr/games/bin:$PATH"
  53.  
  54. # alias
  55. alias c="clear"
  56. alias cd..="cd .."
  57. alias curl="curl --user-agent 'noleak'"
  58. alias l="ls -ahls --color=auto"
  59. alias r="reset"
  60. alias shred="shred -zf"
  61. alias sl="ls --color=auto"
  62. alias vi="vim"
  63. alias ls="ls --color=auto"
  64. alias dir="dir --color=auto"
  65. alias vdir="vdir --color=auto"
  66. alias grep="grep --color=auto"
  67. alias fgrep="fgrep --color=auto"
  68. alias egrep="egrep --color=auto"
  69. alias wget="wget -c --user-agent 'noleak'"
  70. alias dd="dd status=progress"
  71. alias cp="cp -i"                          # confirm before overwriting something
  72. alias rm="rm -i"
  73. alias mv="mv -i"
  74. alias df="df -h"                          # human-readable sizes
  75. alias free="free -h"
  76. alias du="du -h"
  77.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement