X-Git-Url: http://id.pley.net/dotfiles.git/blobdiff_plain/eaa23ff9f75b7242773ccc3214fa3aea21730d8c..f73b91fa7274c8ff92daff6e3780426159a43043:/.aliases diff --git a/.aliases b/.aliases old mode 100644 new mode 100755 index f7bc77c..57300ae --- a/.aliases +++ b/.aliases @@ -1,8 +1,12 @@ -#!/usr/tcsh -# -# source -# -#stty erase  +#!/bin/bash + +# The following aliases vary depending on the host OS: +if [[ "x$(uname -s)" == "xLinux" ]]; then + alias ls='ls -F --color=auto' +elif [[ "x$(uname -s)" == "xDarwin" ]]; then + alias ls='ls -FG' +fi + alias m='pine' alias beep='echo ' alias h=history @@ -12,7 +16,6 @@ alias hh='history -r | head' alias ht='history 10' alias p='ps -au' alias tf='tail -25f' -alias ls='ls -FG' alias l='ls -lF' alias la='ls -laF' alias clr='clear' @@ -23,13 +26,10 @@ alias v='vi' alias vt='vi -t' alias ta='vi -t' alias wh='whoami' -alias ff='perl ~/tools/ff.c' alias new='frm -s new' alias du='du -k' -alias df='df -bk' +alias df='df -k' alias shizzle="perl -pe 's/\b(\w*[^aoeuiy])[aoeuiy]+[bcdfghjklmnpqrstvwxz]*\w\b/\1izzle/g'" -alias gvim='open ~/Applications/Vim.app/' -alias qtmlenv='source ~/Projects/qtmlenv' function lh () { last $@ | head; } function ll () { ls -ltF $@ | head; } @@ -47,6 +47,17 @@ function viw () { vi $(which $1); } function toss () { mv -f $@ ~/.trashcan; } function xcopy () { tar cvf - -C $1 $1/* | tar xvf - -C $2; } function checkdns () { ping $( grep nameserver /etc/resolv.conf | awk '{print $2}' | head -1); } -function pidof () { ps -e -o pid,comm | grep "$1" | awk '{print $1}'; } +if [[ $(which -s pidof) -eq 0 ]]; then + function pidof () { ps -e -o pid,comm | grep "$1" | awk '{print $1}'; } +fi + +function ssh-forget() { + sed -i "" "/^$1,/d" ~/.ssh/known_hosts +} + +function ssh-learn() { + sed -i "" "/^$1,/d" ~/.ssh/known_hosts + ssh-keyscan -t rsa $1 >> ~/.ssh/known_hosts +}