# If the MANPATH is not set, set it
-[ "${MANPATH}" ] || MANPATH=$(manpath)
+[[ "${MANPATH}" ]] || MANPATH=$(manpath)
# If the private bashrc exists, execute it
-[ -f "${PRIVATE_BASHRC}" ] && source "${PRIVATE_BASHRC}"
+[[ -f "${PRIVATE_BASHRC}" ]] && source "${PRIVATE_BASHRC}"
# !!! THIS HAS TO BE HERE EVEN IN THE NON-INTERACTIVE PART OR YOU WILL
# LOSE YOU PREVIOUS HISTORY !!!
# corresponding tex file
function rl () {
- RECENT_LOG=$(ls -t $(find -maxdepth 1 -name "*.log" -type f) | head -1)
+ # RECENT_LOG=$(ls -t $(find -maxdepth 1 -name "*.log" -type f) | head -1)
+
+ RECENT_LOG=$(ls -t *.log | head -1)
if [[ ${RECENT_LOG} ]]; then
FILEBASE="${RECENT_LOG/.log/}"
done
}
-# Password generator
+# A password generator
-function pwgen () {
+function genpw () {
tr -dc A-Za-z0-9 < /dev/urandom | head -c16
+ # tr -dc [:graph:] < /dev/urandom | head -c16
echo
}
function mksmall () {
+ if [[ "$1" == "--params" ]]; then
+ shift
+ PARAMS="$1"
+ shift
+ fi
+
[[ "${PARAMS}" ]] || PARAMS="-geometry 800x600"
# Auto-orient does not seem to work at all, hence the ugly hack
######################################################################
function prompt_command () {
+ # if [[ $(umask) != 0022 ]]; then
+ # echo "Umask changed to $(umask)"
+ # fi
# save the history after every command to avoid loosing some when
# multiple shells are open
history -a