/tmux.conf
/tmux-window1.conf
/tmux-window2.conf
-# Ignore temporary zsh files.
+# Ignore temporary files.
+/lesshistory
/zsh/cache
/zsh/history*
# ignore-case: Ignore case if the search string doesn't contain any uppercase
# letters.
LESS = --no-init --search-skip-screen --quit-if-one-screen --RAW-CONTROL-CHARS --ignore-case
+
+# Store less' history file in this directory. HISTORY_PATH is replaced by
+# setup.sh because lesskey doesn't expand ~/.
+LESSHISTFILE = HISTORY_PATH
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 (<STDIN>) {
+ 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