AdeAttwood / ivy.nvim

An ivy-mode port to neovim.
35 stars 4 forks source link

Better shell commands #50

Closed AdeAttwood closed 1 year ago

AdeAttwood commented 1 year ago

fix: escape \ when running shell commands

This is causing an issue when running shell commands though ivy and trying to escape chars is in strings or regexes.

fix: never let a shell command fail

This makes the terminal go really funkie and sometimes crash when printing the error messages to the current process stdout where nvim is running.

Now the error output is sent to the popen output and displayed in the ivy completion buffer without messing with the current process io.

perf: return a table of results from the command finder

When reading the output of a command we are now reading the stream line by line and building the table of results. This will save us a loop of the results later, if we returned a string we need to split the string before adding each line to the completion buffer because nvim only supports replacing one line at a time