kyoheiu / felix

tui file manager with vim-like key mapping
https://kyoheiu.dev/felix/
MIT License
718 stars 26 forks source link

[Bug] Zoxide cannot handle multiple arguments #283

Closed junnunkarim closed 7 months ago

junnunkarim commented 7 months ago

For quick navigation bookmarks are life savers. In nnn I used to use them a lot. I believe many people will be benefited by this feature. Would you kindly consider adding it?

kyoheiu commented 7 months ago

At this moment zoxide may work as a kind of bookmarks: For example, you can type z dot<CR> to go to ~/dotfiles directly. Do you use zoxide integration in felix? And if so, is that not enough?

junnunkarim commented 7 months ago

@kyoheiu

I do use zoxide and I have made cd an alias to it. I also have a ~/dotfiles directory but it doesn't seem to work on felix. I have tried other combinations but they also don't work, even though they work in my terminal.

But even though I come to make it work, but wouldn't having a dedicated bookmark system be better? I think having a way to show all my favourite directories with a single keymap or command would be really useful. What do you think?

kyoheiu commented 7 months ago

Sorry, it causes misunderstanding: I mean if you can move to e.g. ~/dotfiles by z dot in your terminal, then you can do the same thing in felix (z dot to move the directory). It's not restricted to dotfiles directory specifically.

junnunkarim commented 7 months ago

Oh sorry, what I was doing previously was that I was going to the command mode and then tried to use z dot and it wasn't working. I should have just pressed z and typed the directory I wanted to go. It's working great now.

But there seems to be an issue with multiple arguments. For example if I type z main dow, in my terminal it goes to /mnt/main/main_downloads/ directory but on felix it shows Invalid argument for zoxide.. It seems in felix, zoxide can't handle more than one argument.

kyoheiu commented 7 months ago

Fixed so that z arg1 arg2<CR> can work properly. All recent changes are available in latest develop branch: I'd appreciate if you could check how they work.

Other changes:

junnunkarim commented 7 months ago

@kyoheiu

Thank you very much for your fast work. Symlink and ignore_case is working perfectly.

But issue with zoxide still remains. Now when typing z main dow it doesn't show any errors but it goes to the /mnt/main/ directory, not in /mnt/main/main_downloads/.

I have checked your pull request #285 and it seems you have removed the code snippet that checks if the argument count is greater than 2. So now does this line only take the 1st argument?

kyoheiu commented 7 months ago

You're right, thanks! Fixed via #288 and available in the latest develop.

junnunkarim commented 7 months ago

@kyoheiu Great! Everythings working perfectly! Thank you so much!