You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
1.8KB

  1. #
  2. # ~/.bashrc
  3. #
  4. export PREFIX=$HOME/.$(whoami)/
  5. ## git
  6. ######
  7. #source ~/.bash-git-prompt/gitprompt.sh
  8. alias gs="git status"
  9. alias gl="git log --all --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit"
  10. alias gp="git pull"
  11. ## ssh keygen
  12. #############
  13. alias newpubkey='ssh-keygen -f ~/.ssh/id_rsa -y'
  14. alias fingerprint='ssh-keygen -lf ~/.ssh/id_rsa.pub'
  15. ## lazy
  16. #######
  17. alias mp3="mplayer *.mp3"
  18. alias n="nano"
  19. alias nani="nano"
  20. function h () {
  21. grep "$1" ~/.bash_history
  22. }
  23. ## lua
  24. ######
  25. function lua_environment () {
  26. if (("$#" == 1)); then
  27. if [ $1 == "51" ]; then
  28. eval $(luarocks-5.1 path)
  29. elif [ $1 == "52" ]; then
  30. eval $(luarocks-5.2 path)
  31. elif [ $1 == "53" ]; then
  32. eval $(luarocks-5.3 path)
  33. fi
  34. fi
  35. }
  36. alias uselua="lua_environment"
  37. export LUA_CPATH=$HOME/.$(whoami)/lib/lua/5.3/?.so
  38. ## matlab/octave
  39. ################
  40. alias matlab="/home/markus/MATLAB/bin/matlab"
  41. alias m="/home/markus/MATLAB/bin/matlab -nodesktop -nosplash"
  42. alias o="octave-cli"
  43. ## local compiles
  44. #################
  45. export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/.$(whoami)/lib"
  46. # set PATH so it includes user's private bin if it exists
  47. if [ -d "$HOME/.$(whoami)/bin" ] ; then
  48. export PATH="$HOME/.$(whoami)/bin:$HOME/.$(whoami)/usr/bin:$HOME/.$(whoami)/usr/local/bin:$PATH"
  49. fi
  50. if [ -d "$HOME/.$(whoami)/lib/pkgconfig" ]; then
  51. export PKG_CONFIG_PATH="$HOME/.$(whoami)/lib/pkgconfig"
  52. fi
  53. if [ $(uname) = "NetBSD" ]; then
  54. PKG_PATH="http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/7.0/All/"
  55. export PKG_PATH
  56. fi
  57. ### autojump
  58. # https://github.com/wting/autojump
  59. if [ -f "/usr/share/autojump/autojump.bash" ]; then
  60. source /usr/share/autojump/autojump.bash
  61. fi
  62. ## wttr.in
  63. function wttr () {
  64. curl wttr.in/"$1"
  65. }
  66. alias wetter="wttr"