Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Continuous, continuously-updated history guff:
- HFN="${HOME}/.history/$(date -u +%Y/%m/%d/%H.%M.%S)_${HOSTNAME}_$$"
- mkdir -p `dirname $HFN`
- if [ ! -e $HFN ]; then
- history -r ${HOME}/.history/template
- fi
- HISTFILE=$HFN
- hgrep() {
- grep -h "$@" ${HOME}/.history/*/*/*/* | tac
- }
- Hgrep() {
- grep "$@" ${HOME}/.history/*/*/*/* | tac
- }
- PROMPT_COMMAND='history -w ${HISTFILE}_tmp; mv ${HISTFILE}_tmp ${HISTFILE}'
- HISTFILESIZE=-1
- HISTSIZE=-1
- HISTCONTROL=ignoredups
- # end histfile.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement