1
0

aliases.sh 974 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. # ls
  3. alias l='ls -lFh' # size,show type,human readable
  4. alias la='ls -lAFh' # long list,show almost all,show type,human readable
  5. alias lr='ls -tRFh' # sorted by date,recursive,show type,human readable
  6. alias lt='ls -ltFh' # long list,sorted by date,show type,human readable
  7. alias ll='ls -l' # long list
  8. # export local .env file
  9. alias export-env="export \$(grep -v '^#' .env | xargs -0)"
  10. # docker
  11. alias d='docker'
  12. alias dc='docker-compose'
  13. # k8s
  14. alias k='kubectl'
  15. alias kx='kubectx'
  16. # http
  17. alias http-server='python -m SimpleHTTPServer'
  18. # osx-only aliases
  19. if [[ "$(uname -s)" = 'Darwin' ]]; then
  20. alias get-buffer="$HOME/dotfiles/bin/get-iterm2-buffer"
  21. alias chrome-tabs="$HOME/dotfiles/bin/chrome-tabs"
  22. fi
  23. # other bin
  24. alias awsp="$HOME/dotfiles/bin/aws-profile"
  25. # display docker statuses
  26. alias dockerps="docker ps --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}'"
  27. # set terminal title
  28. function title {
  29. echo -ne "\033]0;"$*"\007"
  30. }