Advertisement
Guest User

parrotLike

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