1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 01:19:06 -08:00

more aliases and some ruby support

This commit is contained in:
Connor Olding 2014-06-02 06:54:57 -07:00
parent 5eac25a5a2
commit fd7fae2e5e
2 changed files with 16 additions and 4 deletions

View file

@ -9,11 +9,15 @@ ADDPATH() {
ADDPATH "$HOME/opt/local/bin" ADDPATH "$HOME/opt/local/bin"
r="$HOME/.gem/ruby/2.1.0/bin"
[ -d "$r" ] && ADDPATH "$r"
unset r
ify() { ify() {
[ $# -ge 2 ] || return [ $# -ge 2 ] || return
local ex=$1 local ex=$1
shift shift
$@ | $ex $@ | $ex
} }
has() { which "$1" >/dev/null 2>&1 && which "$1"; } has() { which "$1" >/dev/null 2>&1 && which "$1"; }
@ -76,6 +80,13 @@ alias unwrap='awk '\''BEGIN{RS="\n\n";FS="\n"}{for(i=1;i<=NF;i++)printf "%s ",$i
alias picky='{ pacman -Qgq base base-devel | tee -; pacman -Qtnq; } | sort | uniq -u' alias picky='{ pacman -Qgq base base-devel | tee -; pacman -Qtnq; } | sort | uniq -u'
alias unused='{ pacman -Qt; pacman -Qe | tee -; } | sort | uniq -u' alias unused='{ pacman -Qt; pacman -Qe | tee -; } | sort | uniq -u'
alias makepkgf='sudo -u $USER MAKEFLAGS=-j2 makepkg -Af --skipchecksums' alias makepkgf='sudo -u $USER MAKEFLAGS=-j2 makepkg -Af --skipchecksums'
alias rakef='rake && gem build *.gemspec && gem install *.gem'
alias rot13='tr "A-Za-z0-9" "N-ZA-Mn-za-m5-90-4"'
alias cleanse='tr -cd "\11\12\15\40-\176"'
function trash() {
dd status=none if=/dev/random bs=1 count="$1"
}
. ~/sh/z/z.sh . ~/sh/z/z.sh

View file

@ -95,6 +95,7 @@ if has('autocmd')
au FileType bash,sh,zsh,awk,python,lua,vim call TabFour() au FileType bash,sh,zsh,awk,python,lua,vim call TabFour()
au BufRead,BufNewFile *.json call TabFour() au BufRead,BufNewFile *.json call TabFour()
au BufRead,BufNewFile PKGBUILD call TabTwo() au BufRead,BufNewFile PKGBUILD call TabTwo()
au FileType ruby call TabTwo()
augroup END augroup END
augroup reload " http://superuser.com/a/417997 augroup reload " http://superuser.com/a/417997