Advertisement
anujpandey

zshrc-cf

Nov 9th, 2022 (edited)
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.25 KB | None | 0 0
  1. export TERM="screen-256color"
  2. export LANG=en_US.UTF-8
  3. export LC_ALL=$LANG
  4. export ZSH="/home/centos/.oh-my-zsh"
  5. export ANSIBLE_FORCE_COLOR=true
  6. export PATH=$PATH:/home/centos/.local/bin/
  7. export EDITOR='mvim'
  8. ZSH_THEME="robbyrussell"
  9. plugins=(git docker fzf zsh-syntax-highlighting zsh-autosuggestions zsh-completions)
  10. source $ZSH/oh-my-zsh.sh
  11.  
  12. # Preferred editor for local and remote sessions
  13. [[ -n $SSH_CONNECTION ]] &&  export EDITOR='vim'
  14. [[ -s "/usr/local/bin/kubectl" ]] && source <(kubectl completion zsh)
  15. # Git
  16. alias g='git s'
  17. alias gap='git ap'
  18. alias gd='git d'
  19. alias gds='git ds'
  20. alias gl='git l'
  21. alias gl='git l --color --oneline --decorate'
  22. alias gs='git s'
  23. alias gaa='git aa'
  24. alias gc='git c'
  25. alias gcm='git commit -m'
  26.  
  27. alias ff=printf "\e[?1004l"
  28. dex () {
  29.     docker exec -it $(docker ps --format='{{.ID}}\t{{.Names}}\t{{.Status}}' | fzf | awk '{print $2}') ${1:-bash}
  30. }
  31.  
  32. # Get PID from Port
  33. # sudo lsof -nP -iTCP:$PORT | grep LISTEN
  34. port_to_pid() {
  35.   sudo lsof -nP -i:$@ | grep LISTEN
  36. }
  37. # Get Port from PID
  38. alias pid_to_port="sudo lsof -aPi -p"
  39. # grep env variables
  40. alias eg="env | grep -i "
  41. # grep processes
  42. alias pg="ps -ef| grep -i "
  43. # Grep who is using a port
  44. whoseport() { lsof -i ":$1" | grep --color=auto LISTEN }
  45.  
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement