Skip to content


respect the user's values for $LESS, if already set #66

merged 1 commit into from

2 participants


commander overrides any values the user may have already set for their LESS environment variable, and doesn't provide a way to configure what the override values will be.

this pull request changes the behavior from overriding to defaulting, so the user or host program has a chance to configure the pager behavior.

@ggilder ggilder merged commit 650fa32 into tj:master

Thanks for the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 10, 2014
  1. @ellemenno
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/commander/user_interaction.rb
2  lib/commander/user_interaction.rb
@@ -284,7 +284,7 @@ def enable_paging
$stdin.reopen read
write.close; read.close [$stdin]
- ENV['LESS'] = 'FSRX'
+ ENV['LESS'] = 'FSRX' unless ENV.key? 'LESS'
pager = ENV['PAGER'] || 'less'
exec pager rescue exec '/bin/sh', '-c', pager
Something went wrong with that request. Please try again.