Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ declare -f shell_session_history_check
- shell_session_history_check ()
- {
- if [ ${SHELL_SESSION_DID_HISTORY_CHECK:-0} -eq 0 ]; then
- SHELL_SESSION_DID_HISTORY_CHECK=1;
- if shell_session_history_allowed; then
- shell_session_history_enable;
- fi;
- if [ "$PROMPT_COMMAND" = "shell_session_history_check" ]; then
- unset PROMPT_COMMAND;
- else
- if [[ $PROMPT_COMMAND =~ (.*)(; *shell_session_history_check *| *shell_session_history_check *; *)(.*) ]]; then
- PROMPT_COMMAND="${BASH_REMATCH[1]}${BASH_REMATCH[3]}";
- fi;
- fi;
- fi
- }
- $ declare -f shell_session_history_enable
- shell_session_history_enable ()
- {
- ( umask 077;
- /usr/bin/touch "$SHELL_SESSION_HISTFILE_NEW" );
- HISTFILE="$SHELL_SESSION_HISTFILE_NEW";
- SHELL_SESSION_HISTORY=1
- }
Add Comment
Please, Sign In to add comment