I had a problem parsing the command line in parse_history despite setting and double checking the PROMPT_COMMAND to the specified value as I wasn't getting a leading space before the pid eg:
93418 vim /usr/lib/python3.6/site-packages/recent.py None recent: cannot parse command output, please check your bash trigger looks like this: export PROMPT_COMMAND='log-recent -r $? -c "$(HISTTIMEFORMAT= history 1)" -p $$'
Changing the regex in parse_history to
r'^\s*(\d+)\s+(.*)$'
ie allowing zero or more whitespace before the command start, fixed it.
I had a problem parsing the command line in parse_history despite setting and double checking the PROMPT_COMMAND to the specified value as I wasn't getting a leading space before the pid eg:
93418 vim /usr/lib/python3.6/site-packages/recent.py None recent: cannot parse command output, please check your bash trigger looks like this: export PROMPT_COMMAND='log-recent -r $? -c "$(HISTTIMEFORMAT= history 1)" -p $$'
Changing the regex in parse_history tor'^\s*(\d+)\s+(.*)$'
ie allowing zero or more whitespace before the command start, fixed it.