gazorby / fifc

🐠 Configurable fzf completions for fish shell
MIT License
142 stars 9 forks source link

macOS: Preview of command options shows error "head: illegal line count -- -1" #23

Closed amok closed 1 year ago

amok commented 1 year ago

Describe the bug Preview of command options shows error head: illegal line count -- -1 on macOS

To Reproduce Type f.e. cat - in and then press TAB (to trigger fifc)

Expected behavior No error in preview pane

Screenshots image

System (please complete the following information):

Additional context

Mostly likely the error happens on https://github.com/gazorby/fifc/blob/adff5966739667d4c13d6388372e40f821571208/functions/_fifc_preview_opt.fish#L17

and it's probably due to the fact macOS' head does not support negative -n (lines count) value

gazorby commented 1 year ago

Thanks for the hint @amok! Should be fixed on main.