mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-20 11:57:50 +02:00
This commit is contained in:
parent
0a81799609
commit
3a49c9c11f
@ -7,7 +7,7 @@ __hishtory_bash_config_sourced=`date`
|
|||||||
|
|
||||||
# Implementation of running before/after every command based on https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/
|
# Implementation of running before/after every command based on https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/
|
||||||
function __hishtory_precommand() {
|
function __hishtory_precommand() {
|
||||||
if [ -z "$HISHTORY_AT_PROMPT" ]; then
|
if [ -z "${HISHTORY_AT_PROMPT:-}" ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
unset HISHTORY_AT_PROMPT
|
unset HISHTORY_AT_PROMPT
|
||||||
@ -27,7 +27,7 @@ function __hishtory_postcommand() {
|
|||||||
EXIT_CODE=$?
|
EXIT_CODE=$?
|
||||||
HISHTORY_AT_PROMPT=1
|
HISHTORY_AT_PROMPT=1
|
||||||
|
|
||||||
if [ -n "$HISHTORY_FIRST_PROMPT" ]; then
|
if [ -n "${HISHTORY_FIRST_PROMPT:-}" ]; then
|
||||||
unset HISHTORY_FIRST_PROMPT
|
unset HISHTORY_FIRST_PROMPT
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
@ -19,7 +19,7 @@ function _hishtory_precmd() {
|
|||||||
# Runs after the command is executed in order to render the prompt
|
# Runs after the command is executed in order to render the prompt
|
||||||
# $? contains the exit code
|
# $? contains the exit code
|
||||||
_hishtory_exit_code=$?
|
_hishtory_exit_code=$?
|
||||||
if [ -n "$_hishtory_first_prompt" ]; then
|
if [ -n "${_hishtory_first_prompt:-}" ]; then
|
||||||
unset _hishtory_first_prompt
|
unset _hishtory_first_prompt
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user