find $* -name "*${name}*";
}
+# Move things to a trash directory in /tmp/
+
+function trash () {
+ TRASH=$(date +/tmp/trash-%Y-%b-%d-%H_%M_%S)
+ mkdir ${TRASH} && mv $* ${TRASH}
+ \ls -ad ${TRASH}/*
+}
+
######################################################################
# http://www.reddit.com/r/linux/comments/akt3j/a_functional_programming_style_map_function_for/
;;
esac
- convert ${rotation_cmd} $i ${PARAMS} ${DEST_DIR}/$i
+ if [[ -f ${i/JPG/MOV} ]]; then
+ CAPTION_PARAMS="-font vera-sans -pointsize 24 -fill white -annotate +10+32 Video"
+ else
+ CAPTION_PARAMS=""
+ fi
+
+ convert ${rotation_cmd} $i ${PARAMS} ${CAPTION_PARAMS} ${DEST_DIR}/$i
fi
\ls -lt ${DEST_DIR}/$i
NB=$((NB+1))
# git clone http://fleuret.org/git/selector/
function selector-history () {
- ARGS="-c 7 4 0 3 -q -b -i -d -v -w -l 15000"
- FILES=""
-
- # I may have a "local bash history" specific to the current
- # directory, and I also maintain a global "kept command" file. I
- # take all this into account here.
-
- if [[ ${LOCAL_HISTORY_FILE} ]] && [[ -f ${LOCAL_HISTORY_FILE} ]]; then
- FILES="${FILES} ${LOCAL_HISTORY_FILE}"
- fi
-
- if [[ ${KEPT_COMMANDS} ]] && [[ -f ${KEPT_COMMANDS} ]]; then
- selector ${ARGS} ${FILES} <(sed < ${KEPT_COMMANDS} -e 's/^.*: /0 /') <(history)
- else
- selector ${ARGS} ${FILES} <(history)
- fi
-
+ selector -c 7 4 0 3 -q -b -i -d -v -w -l 15000 <(history)
}
# M-r puts the selected history line in place of the current one
bind '"\C-[t":"\C-a\C-kselector-history\C-m\C-a\C-y\C-e"'
-# Finds path in the history and make a list of the existing ones
+# Find pathes in the history and make a list of the existing ones
function selector-cd () {
LIST_TEMP=$(mktemp /tmp/cdlist.XXXXXX)
\rm ${LIST_TEMP}
}
-alias c=selector-cd
-
bind '"\C-[c":"\C-a\C-kselector-cd\C-m"'
# And we avoid to put in the history the use of the selector, which we
history -a
# and the local histories system defined above
keep_local_history
-# and the no-history
+# and the history cue
histfile_cue
}