alias rd=rmdir
alias md='mkdir -pv'
alias ps='ps uxaf'
-alias df='df -hT --sync'
+alias df='df -hT'
+# alias df='df -hT --sync'
alias grep='grep -i -E --color=auto'
alias find='ionice -c3 find'
alias pd=pushd
function keep () {
if [[ ${KEPT_COMMANDS} ]]; then
- LINE="$*"
- [[ "${LINE}" ]] || LINE=$(history | tail -2 | head -1 | sed -e "s/^[0-9 ]*//")
- echo $LINE
- echo $(date)": "${LINE} >> ${KEPT_COMMANDS}
+ TOKEEP=$(mktemp /tmp/keep.XXXXXX)
+ if [[ "$*" ]]; then
+ echo "$*" > ${TOKEEP}
+ else
+ selector -b -i -d -l ${HISTSIZE} -o "${TOKEEP}" <(history)
+ fi
+
+ if [[ -s "${TOKEEP}" ]]; then
+ echo $(date)": "$(cat ${TOKEEP}) >> ${KEPT_COMMANDS}
+ cat "${TOKEEP}"
+ else
+ echo "No command stored!"
+ fi
+
+ \rm ${TOKEEP}
else
echo "You have to set \$KEPT_COMMANDS"
fi
}
+# function keep () {
+ # if [[ ${KEPT_COMMANDS} ]]; then
+ # LINE="$*"
+ # [[ "${LINE}" ]] || LINE=$(history | tail -2 | head -1 | sed -e "s/^[0-9 ]*//")
+ # echo $LINE
+ # echo $(date)": "${LINE} >> ${KEPT_COMMANDS}
+ # else
+ # echo "You have to set \$KEPT_COMMANDS"
+ # fi
+# }
+
######################################################################
# I sometime burn CDs and DVDs
function burn () {
- DEVICE="/dev/cdrw"
+ DEVICE="/dev/cdrw1"
if [[ ! "$1" ]]; then
echo "burn <iso name | dirname>" >&2
elif [[ -f "$1" ]]; then
-quiet \
-alang en -slang en \
-softvol -softvol-max 1000 \
- -dvd-device ${dvd_device} $* dvd://${title}
+ -dvd-device ${dvd_device} ${MPLAYER_OPTIONS} dvd://${title}
}
function ripdvd () {
TMP=$(mktemp /tmp/lsn.XXXXXX)
\ls -pa | sort > ${TMP}
if diff > /dev/null ${TMP} ${LSN_MEMORY}; then
- echo "${VT_GREEN_FG}${VT_BOLD}No change${VT_RESET}"
+ echo "${VT_GREEN_FG}${VT_BOLD}No change (since $(date +"%b %d, %Y" -r ${LSN_MEMORY}))${VT_RESET}"
else
\comm -1 -3 ${LSN_MEMORY} ${TMP}
\comm -2 -3 ${LSN_MEMORY} ${TMP} | while read line; do