mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
terminal: restore HISTFILE on exit to let bash properly update ~/.bash_history
This commit is contained in:
@@ -70,12 +70,11 @@ function configureCommandHistory {
|
||||
local commandHistoryFile="$__INTELLIJ_COMMAND_HISTFILE__"
|
||||
if [ -n "$commandHistoryFile" ] && [ -z "`trap -p EXIT`" ]
|
||||
then
|
||||
if [ ! -s "$commandHistoryFile" ] && [ -f "$HISTFILE" ]
|
||||
trap "history -w \"$commandHistoryFile\"; export HISTFILE=\"$HISTFILE\"" EXIT
|
||||
if [ -s "$commandHistoryFile" ]
|
||||
then
|
||||
command cp "$HISTFILE" "$commandHistoryFile"
|
||||
export HISTFILE="$commandHistoryFile"
|
||||
fi
|
||||
trap "history -w \"$HISTFILE\"" EXIT
|
||||
export HISTFILE="$commandHistoryFile"
|
||||
fi
|
||||
}
|
||||
configureCommandHistory
|
||||
|
||||
Reference in New Issue
Block a user