beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 140 forks source link

Pager with options not found #447

Closed jdevera closed 10 years ago

jdevera commented 10 years ago

I have this in ~/.ackrc:

--pager="less --quit-if-one-screen --no-init --RAW-CONTROL-CHARS --squeeze-blank-lines --chop-long-lines"

When I run ack, I get this error:

sh: 1: less --quit-if-one-screen --no-init --RAW-CONTROL-CHARS --squeeze-blank-lines --chop-long-lines: not found

I'm using the standalone version dowloaded from the project site:

↠  ack --version
ack 2.12
Running under Perl 5.14.2 at /usr/bin/perl

I'm on Ubuntu 12.04

Is this a bug or perhaps I'm doing something wrong?

hoelzro commented 10 years ago

Hi @jdevera, thanks for the report!

It should work fine if you lose the quotes around less:

--pager=less --quit-if-one-screen --no-init --RAW-CONTROL-CHARS --squeeze-blank-lines --chop-long-lines
jdevera commented 10 years ago

Oh well, thanks and my apologies for the noise. I'd swear I had tried that but clearly I hadn't.