Question

I have a script that invokes a new shell and runs a generated command. This is what a typical command looks like:

exec nocorrect vim file:///rails_app/app/controllers/cow_controller.rb +214

I thought adding the 'nocorrect' would solve my problem, but when the above line is run I still get 'zsh: correct 'vim' to '.vim' [nyae]?'. What am I missing ?

(For background, I'm using better_errors which generates urls with line numbers, and vim _in_iterm to be the protocol handler that will pass along the command string to zsh)

Was it helpful?

Solution

You have a wrong order: nocorrect exec …, not exec nocorrect …:

nocorrect

Spelling correction is not done on any of the words. This must appear before any other precommand modifier, as it is interpreted immediately, before any parsing is done.

In the paragraph just above this it is stated that exec is also a precommand modifier. Thus you are violating “must appear before any other precommand modifier” requirement.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top