gazorby / fifc

🐠 Configurable fzf completions for fish shell
MIT License
157 stars 11 forks source link

macOS: TAB completion causes "sed: invalid command code f" error #22

Closed amok closed 1 year ago

amok commented 1 year ago

Describe the bug

When I press "TAB" for autocompletion error is shown. Also, "description" pane shows the same error when "in fzf".

~ ❯ fisher rsed: 1: "/var/folders/rz/dz8mzhp ...": invalid command code f 

To Reproduce

It's how the plugin works for me right after installation

Expected behavior Autocompletion should not throw an error

Screenshots

image

image

System (please complete the following information):

Additional context

The error I believe happens on https://github.com/gazorby/fifc/blob/adff5966739667d4c13d6388372e40f821571208/functions/_fifc_action.fish#L10

and is triggered by https://github.com/gazorby/fifc/blob/adff5966739667d4c13d6388372e40f821571208/functions/_fifc.fish#L25

since the second argument is not set printf -- ... evaluates to an empty string which later causes sed to fail

I guess the fix would be to just remove -- in printf call, since

image

(at least this fixes the bug for me)

gazorby commented 1 year ago

Thanks for this! Also fixed on main ;)