mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-02 11:39:24 +01: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/
|
||||
function __hishtory_precommand() {
|
||||
if [ -z "$HISHTORY_AT_PROMPT" ]; then
|
||||
if [ -z "${HISHTORY_AT_PROMPT:-}" ]; then
|
||||
return
|
||||
fi
|
||||
unset HISHTORY_AT_PROMPT
|
||||
@ -27,7 +27,7 @@ function __hishtory_postcommand() {
|
||||
EXIT_CODE=$?
|
||||
HISHTORY_AT_PROMPT=1
|
||||
|
||||
if [ -n "$HISHTORY_FIRST_PROMPT" ]; then
|
||||
if [ -n "${HISHTORY_FIRST_PROMPT:-}" ]; then
|
||||
unset HISHTORY_FIRST_PROMPT
|
||||
return
|
||||
fi
|
||||
|
@ -19,7 +19,7 @@ function _hishtory_precmd() {
|
||||
# Runs after the command is executed in order to render the prompt
|
||||
# $? contains the exit code
|
||||
_hishtory_exit_code=$?
|
||||
if [ -n "$_hishtory_first_prompt" ]; then
|
||||
if [ -n "${_hishtory_first_prompt:-}" ]; then
|
||||
unset _hishtory_first_prompt
|
||||
return
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user