]> git.phdru.name Git - dotfiles.git/commitdiff
Pass -FSX options to pager less
authorOleg Broytman <phd@phdru.name>
Fri, 6 May 2016 15:43:03 +0000 (18:43 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 6 May 2016 15:43:03 +0000 (18:43 +0300)
Some full-screen programs (like mutt) redraw the screen after 'less'
exists so the default must not contain option -F. -F and -X are
recommended for command-line programs that can produce a lot of output.
Option -S is recommended for wide output.

'git' became a shell wrapper for the real git to allow calling it from
other scripts.

.my.cnf
.psqlrc
bin/git [new file with mode: 0755]

diff --git a/.my.cnf b/.my.cnf
index 353a5fa68e8ec853478994938261d8d98e923d64..bbc3fd4ad66dbe8c7f7ed529fd5c820ce2cf40e9 100644 (file)
--- a/.my.cnf
+++ b/.my.cnf
@@ -1,5 +1,5 @@
 [mysql]
 auto-rehash
 default-character-set=utf8
-pager
+pager="less -FSX"
 prompt="\u@\d > "
diff --git a/.psqlrc b/.psqlrc
index baa95d465e61a191aedcf850a9dc3905d6fd739b..0b2527724fec66ce1df0b05201b50d7d19f55d34 100644 (file)
--- a/.psqlrc
+++ b/.psqlrc
@@ -10,5 +10,6 @@
 \set PROMPT2 '... %R '
 \set PROMPT3 '>> '
 \set VERBOSITY verbose
+\setenv LESS 'FRSXgimq'
 \timing on
 \unset QUIET
diff --git a/bin/git b/bin/git
new file mode 100755 (executable)
index 0000000..733b5b2
--- /dev/null
+++ b/bin/git
@@ -0,0 +1,2 @@
+#! /bin/sh
+LESS=FSX"$LESS" exec /usr/bin/git "$@"