kyoheiu / felix

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

" " or ' ' not working in exec key(s) #180

Closed salkin-mada closed 1 year ago

salkin-mada commented 1 year ago

Thanks for a fantastic TUI filemanager!! <3 I just started using it and found the following kinda puzzling.

exec:
  'kitty --detach --hold nvim':
    [scd, sc, cpp, hpp, lua, md, txt, scad]

or lets say I want to use imv -f / feh -. or any other command with some options. I would expect this to work.

kyoheiu commented 1 year ago

Currently options are not supported. I'll check if I can handle it.

kyoheiu commented 1 year ago

Ok, implemented (very naively) handling options by c4e8e35c80b0fed2a90d349a6059c7b0cbe9d135 . (Currently only Enter | l | Right arrow works, 'o' does not work yet) It'd be great if you install it via develop branch and check if this works.

i.e. with the config file

exec:
  'feh -.':
    [jpg, jpeg, png, gif, svg, hdr]

pressing enter key on the image file should execute feh -. <file path>.

salkin-mada commented 1 year ago

Now using cmd --flag as key does work (with Enter | l | Right arrow.) But it always opens the first image in a directory.

salkin-mada commented 1 year ago

Also there seems to be some restrictions in regard to what chars can be used? mpv --fullscreen=no on [mp4] fails.

kyoheiu commented 1 year ago

Now using cmd --flag as key does work (with Enter | l | Right arrow.) But it always opens the first image in a directory.

Haha, I missed the important line: Fixed about with 9f4b3b3173bd2e9f2262c8640c83f8cf3bf8f496, should work now. This is a really useful feature, thanks for the suggestion. I will fully implement this and include this in the next release.

Also there seems to be some restrictions in regard to what chars can be used? mpv --fullscreen=no on [mp4] fails.

I'll check this.

kyoheiu commented 1 year ago

Hm, in my environment 'mpv --fullscreen=no' somewhat works, with a little bit buggy screen though.

screenshot executes

The key is split by ascii-whitespace, so chars like - or = have no effect to the result.

kyoheiu commented 1 year ago

Created PR: #182

kyoheiu commented 1 year ago

Released by v2.2.5.

salkin-mada commented 1 year ago

nice!