mileszs / ack.vim

Vim plugin for the Perl module / CLI script 'ack'
Other
3.08k stars 396 forks source link

Unknown option: s (ack-grep 1.92) #118

Closed LArVs closed 10 years ago

LArVs commented 10 years ago

Any search with error:

|| Unknown option: s || ack: See ack-grep --help, ack-grep --help-types or ack-grep --man for options.

Phyks commented 10 years ago

The -s option was implemented in ack 2.0 and aims at suppressing messages about unreadables or non existing files. As you are using ack-grep 1.92, it's not implemented and hence you have an error message.

A quick fix would be to edit plugin/ack.vim and change line 12 from :

let s:ack_default_options = " -s -H --nocolor --nogroup --column"

to

let s:ack_default_options = " -H --nocolor --nogroup --column"

But that's just a temp solution and the best way would maybe be to test which version of ack the user is running and emulate -s option if ack version is < 2.0 ?

kassio commented 10 years ago

I can fix in the master version, but version 1.0 will support only ack >= 2.0

LArVs commented 10 years ago

Better, change: let s:ack_default_options to let g:ack_default_options for override in .vimrc ;)

LArVs commented 10 years ago

what's do you think?

kassio commented 10 years ago

@larvjob, I liked it, I'll change it for feature and implement on v1.0. :smile:

kassio commented 10 years ago

Fixed on master, and add g:ack_default_options on v1.0