From: Francois Fleuret Date: Fri, 20 Mar 2015 15:06:53 +0000 (+0100) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=39fd98a7b4ac3146d11f866ab41ca413fb280414;p=scripts.git Update. --- diff --git a/bashrc b/bashrc index cb98ffa..4e736e6 100644 --- a/bashrc +++ b/bashrc @@ -23,11 +23,11 @@ PRIVATE_BASHRC="${HOME}/private/bashrc.perso" # 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 !!! @@ -168,7 +168,9 @@ function latexdiff () { # 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/}" @@ -238,10 +240,11 @@ function bak () { 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 } @@ -623,6 +626,12 @@ alias ripcd=abcde 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 @@ -852,6 +861,9 @@ function lsn () { ###################################################################### 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