Repository: cantino/mcfly (language: rust)

Issue:
Conflict with zoxide

```sh
eval "$(mcfly init bash)"
eval "$(zoxide init bash)"
```

With these two tool enabled at the same time, when I open a new shell I get this:
`
bash: PROMPT_COMMAND: line 0: syntax error near unexpected token `;;'
bash: PROMPT_COMMAND: line 0: `mcfly_prompt_command;;__zoxide_hook'
`
Then, running mcfly:

`
thread 'main' panicked at 'McFly error: Please ensure that MCFLY_HISTORY is set (environment variable not found)', /net/homedirs/arusev/.cargo/registry/src/gitlab.spimageworks.com-dbbe1dfef02d8f03/mcfly-0.5.6/src/settings.rs:261:29
`

If I comment the `zoxide` line in my bashrc then it works. Any ideas which tool cases it?

Thanks.


Discussion / hints:

Fix patch:
diff --git a/mcfly.bash b/mcfly.bash
index 197fe170..e529f06f 100644
--- a/mcfly.bash
+++ b/mcfly.bash
@@ -57,7 +57,7 @@ function mcfly_prompt_command {
 }
 
 # Set $PROMPT_COMMAND run mcfly_prompt_command and then any existing $PROMPT_COMMAND.
-PROMPT_COMMAND="mcfly_prompt_command;$PROMPT_COMMAND"
+PROMPT_COMMAND="mcfly_prompt_command;${PROMPT_COMMAND#;}"
 
 # If this is an interactive shell, take ownership of ctrl-r.
 if [[ $- =~ .*i.* ]]; then


Test patch: