cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.76k stars 176 forks source link

Updating mcfly settings in .zshrc does not update any settings #298

Open navazjm opened 1 year ago

navazjm commented 1 year ago

Updating .zshrc, running 'exec zsh' or opening a new terminal window does not update mcfly settings.

For example, by default the menu interface is enabled. When setting 'export MCFLY_DISABLE_MENU=TRUE' , it will remove the interface. I comment out the same setting '# export MCFLY_DISABLE_MENU=TRUE' in my .zshrc, but disabling the interface persists.

I am on the latest changes on the master branch, commit 78a5422e7a2bd4213b13691183c020361aea608f

Initial Settings

initial-settings

Initial output

Note: I am in vim mode and using last run sort

Screen Shot 2022-11-08 at 9 52 36 AM

update settings

update-settings

update output

Note I am still in vim mode, should be in emacs mode. McFly is also still using last run sort instead of rank sort.

Screen Shot 2022-11-08 at 9 56 51 AM

cantino commented 1 year ago

Are your env variables somehow persisting between sessions? If you type env, do you see the expected settings, yet McFly doesn't use them?

navazjm commented 1 year ago

It looks like my env variables are somehow persisting between sessions.

For example, if I set export MCFLY_KEY_SCHEME=vim and run exec zsh, I will then be in vim mode which is to be expected. If I comment out the variable above (# export MCFLY_KEY_SCHEME=vim), run exec zsh, type env, and it still shows MCFLY_KEY_SCHEME=vim and McFly is still in vim mode.

However, if I do the same steps as above, but launch a new terminal instead of running exec zsh, then everything works as expected.

cantino commented 1 year ago

Okay, so it sounds like it's not a mcfly bug— your env is persisting somehow.