dotfiles

A steaming hot pile of sh...ell scripts and configuration files.
git clone https://kaka.farm/~git/dotfiles
Log | Files | Refs

bash_aliases (2464B)


      1 #!/bin/bash
      2 
      3 # enable color support of ls and also add handy aliases
      4 if [ -x /usr/bin/dircolors ]; then
      5     test -r ~/.dircolors
      6     if [[ $? == 0 ]]; then
      7         eval "$(dircolors -b ~/.dircolors)"
      8     else
      9         eval "$(dircolors -b)"
     10     fi
     11     alias ls='ls --color=auto'
     12     #alias dir='dir --color=auto'
     13     #alias vdir='vdir --color=auto'
     14 
     15     alias grep='grep --color=auto'
     16     alias fgrep='fgrep --color=auto'
     17     alias egrep='egrep --color=auto'
     18 fi
     19 
     20 # some more ls aliases
     21 alias ll='ls -alF'
     22 alias la='ls -A'
     23 alias l='ls -CF'
     24 
     25 # Add an "alert" alias for long running commands.  Use like so:
     26 #   sleep 10; alert
     27 # alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
     28 
     29 alias g=git
     30 alias gl='g l'
     31 alias gs='g s'
     32 alias gc='g c'
     33 alias gd='g d'
     34 
     35 alias hebdate="hdate --hebrew|cut -f 3 -d ','|grep -v '^$'"
     36 # alias emptify="truncate -c -s 0"
     37 
     38 # function pip3fr () { pip3 freeze --user; }
     39 # function pip3i () { pip3 install --user --upgrade $@; }
     40 # function pip3up () { pip3i "$( pip3fr | sed 's#==.*##' )"; }
     41 # function pip3un () { pip3 uninstall "$*"; }
     42 
     43 # http://cs-syd.eu/posts/2015-06-21-gtd-with-taskwarrior-part-2-collection.html
     44 # function inn () { task add +in $@; }
     45 # function tickle () {
     46 #         deadline="$1"
     47 #         shift
     48 #         inn +tickle wait:"$deadline" "$*"
     49 # }
     50 # alias tick=tickle
     51 # alias think='tickle +1d'
     52 
     53 # alias tracli="transmission-remote-cli"
     54 # alias trarem="transmission-remote"
     55 
     56 # function ppgrep ()
     57 # {
     58 #         if [[ $1 == "" ]];
     59 #         then
     60 #                 PERCOL=percol
     61 #         else
     62 #                 PERCOL="percol --query $1"
     63 #         fi
     64 #         ps aux | eval "$PERCOL" | awk '{ print $2 }'
     65 # }
     66 #
     67 # function ppkill ()
     68 # {
     69 #         if [[ $1 =~ ^- ]];
     70 #         then
     71 #                 QUERY=""
     72 #         else
     73 #                 QUERY=$1
     74 #                 [[ $# -gt 0 ]] && shift
     75 #         fi
     76 #         ppgrep $QUERY | xargs kill $*
     77 # }
     78 
     79 # alias yuvallanger="chromium --user-data-dir=~/.chromium-google-yuvallanger"
     80 # alias ontheroad="chromium --user-data-dir=~/.chromium-google-ontheroad"
     81 # alias dark='gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark && gsettings set org.gnome.desktop.interface color-scheme prefer-dark'
     82 # alias light='gsettings set org.gnome.desktop.interface gtk-theme Adwaita && gsettings set org.gnome.desktop.interface color-scheme prefer-light'
     83 alias g=git