Closed weissewolke closed 2 years ago
Mcfly should leave the PROMPT_COMMAND alone, only appending it's change. What does echo $PROMPT_COMMAND
say?
The result of echo $PROMPT_COMMAND
__lp_set_prompt
My two lines by themselves erase all duplicates from the history file by reading the list, writing to file, clearing the list and reading the new history file and appending its contents to the history list again. This seems to be necessary since erasedups
is quite bugy and does not work reliably.
Activating McFly has two strange effects. Maybe this is of some significance in analysing what is going on:
if [[ ! -f "${MCFLY_HISTORY}" ]]; then
export MCFLY_HISTORY=$(mktemp -t mcfly.XXXXXXXX)
tail -n100 "${HISTFILE}" >| ${MCFLY_HISTORY}
fi
erasedups
does not seem to workAny tips greatly appreciated.
I'm not sure. You could try putting the result of mcfly init bash
into a shell script that you source yourself, then tweak it.
I have these lines in my
.bashrc
:Is it possible to alter the functions in
mcfly.bash
to accomodate for this?