X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=setup.sh;h=041629f0d2bac00071b5c6d709ee33be08dda398;hb=383f656d488c6b150b96ff2862f3bfb0a39577f9;hp=a5af86b2e6321ab8848fd09582693fac2dee550c;hpb=3f5d80c3a9142c424ca2c482b6ad28c475349d42;p=config%2Fdotfiles.git diff --git a/setup.sh b/setup.sh index a5af86b..041629f 100755 --- a/setup.sh +++ b/setup.sh @@ -39,8 +39,17 @@ fi mkdir -p ~/.tmp chmod 0700 ~/.tmp -# Generate ~/.less with lesskey. -lesskey lesskey +# Generate ~/.less with lesskey. Prevent cluttering ~/ by storing the history +# file in this directory; this requires replacing the constant HISTORY_PATH in +# lesskey. +echo lesskey: generating .lesskey +perl < lesskey \ + -e 'while () { + s/\bHISTORY_PATH\b/$ARGV[0]/; + print; + }' \ + "`pwd`/lesshistory" \ + | lesskey - chmod 0600 ~/.less # Find the required options to get colored ls output. GNU ls is preferred. See