Lesspipe 2.16 Error On Usage #5736
Unanswered
bimmerite
asked this question in
Tap maintenance and brew development
Replies: 2 comments 1 reply
-
I think a better solution is to have |
Beta Was this translation helpful? Give feedback.
1 reply
-
This worked like a charm. Saw that reinstalling lesspipe installed bash dependencies. Once done I re-ran less and no more error. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Output of
brew config
Output of
brew doctor
Description of issue
MacOS 14.7.1. Below is the 'Brew info lesspipe' output:
==> lesspipe: stable 2.16 (bottled)
Input filter for the pager less
https://www-zeuthen.desy.de/~friebel/unix/lesspipe.html
Installed
/usr/local/Cellar/lesspipe/2.16 (15 files, 215KB) *
Poured from bottle using the formulae.brew.sh API on 2024-11-14 at 13:13:56
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/l/lesspipe.rb
License: GPL-2.0-only AND GPL-2.0-or-later AND MIT AND (Artistic-1.0-Perl OR GPL-1.0-or-later)
When running less, I received the following error:
$ less .zshenv
/usr/local/bin/lesspipe.sh: line 844: declare: -l: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
I found the bug that was reported back in 2023 in the lesspipe git with the solution being to run the lesspipe.sh file using zsh instead of bash due to limitations in MacOS BASH implementation.
When I checked the installed copy of lesspipe.sh I found that it was still calling bash instead of zsh:
$ vim /usr/local/bin/lesspipe.sh
From the lesspipe.sh file:
#!/usr/bin/env bash
I changed this to: #!/usr/bin/env zsh
And the error went away.
Was the brew install of lesspipe supposed to be updated to call the zsh shell instead of the bash shell?
Beta Was this translation helpful? Give feedback.
All reactions