cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.85k stars 178 forks source link

fix: don't interpret search contents #138

Closed scooter-dangle closed 3 years ago

scooter-dangle commented 3 years ago

In the fish script, calling

 # Note: mcfly opts omitted for brevity
mcfly search (commandline)

can cause issues if the command line contained anything that mcfly parses as an option. E.g., if I wanted to search for the last time I ran a command that a I know included -o 5, the interpolated mcfly call would be

mcfly search -o 5

which causes issues since mcfly search will assume -o 5 is specifying an output selection of 5.


Note: I explicitly verified the bug when calling CTRL-R with -o 5 on the command line. I didn't look into how __mcfly_add_command was being called. Maybe the -- precaution isn't needed there?

cantino commented 3 years ago

Thank you!

cantino commented 3 years ago

Released in v0.5.6