# alias ll='ls --color -lth'
alias lt='ls --color -gohtr --time-style="+%Y %b %d %H:%M"'
alias ll='ls --color -goh --time-style="+%Y %b %d %H:%M"'
+ alias lll='ls --color -lth'
alias l='ls --color -I "*~" -I "*.o"'
alias less='less -R'
else
# alias ll='ls -lth'
alias lt='ls -gohtr --time-style="+%Y %b %d %H:%M"'
alias ll='ls -goh --time-style="+%Y %b %d %H:%M"'
+ alias lll='ls -lth'
alias l='ls -I "*~" -I "*.o"'
fi
function fn () {
name=$1
shift
- find $* -name "*${name}*";
+ find "$@" -name "*${name}*";
}
# Create a dir and cd there
# Capture the screen in a dated png
function cap () {
- name="capture-$(date +%s).png"
+ if [[ $2 ]]; then
+ name=$2
+ else
+ name="capture-$(date +%s).png"
+ fi
+ echo "Waiting $1 s and saving to ${name}."
[[ $1 ]] && sleep $1
+ echo "Please click on the window to capture."
xwd | convert - ${name}
\ls -l ${name}
}
function pho () {
PHO_BIN=/usr/bin/pho
TEMP=$(mktemp /tmp/pho.XXXXXXX)
- ${PHO_BIN} $* | tee ${TEMP}
+ ${PHO_BIN} "$@" | tee ${TEMP}
PHO_NOTE_1=$(grep ^"Note 1: " ${TEMP} | sed -e "s/^[^:]*: //")
PHO_NOTE_2=$(grep ^"Note 2: " ${TEMP} | sed -e "s/^[^:]*: //")
PHO_NOTE_3=$(grep ^"Note 3: " ${TEMP} | sed -e "s/^[^:]*: //")
echo "${VT_BOLD}${VT_GREEN_FG}This is the bash function ifup from .bashrc${VT_RESET}"
if [[ "$1" == "-s" ]]; then
chosen_ifup=$(mktemp /tmp/chosen_ifup.XXXXXX)
- selector -o ${chosen_ifup} <(cat ${IFUPRC} | sort | uniq)
+ selector -i -d -o ${chosen_ifup} ${IFUPRC}
ARGS=$(cat ${chosen_ifup})
rm -f ${chosen_ifup}
echo ${ARGS} >> ${IFUPRC}
function lr () {
HEIGHT=$(stty size | awk '{print $1}')
WIDTH=$(stty size | awk '{print $2}')
- \ls -goth --time-style="+%Y %b %d %H:%M" $* | head -$((HEIGHT-2)) | cut -b1-${WIDTH}
- # \ls -lth $* | head -$((HEIGHT-2)) | cut -b1-${WIDTH}
+ \ls -goth --time-style="+%Y %b %d %H:%M" "$@" | \
+ head -$((HEIGHT-2)) | \
+ cut -b1-${WIDTH}
}
######################################################################