diff options
Diffstat (limited to 'usr.bin/less')
-rw-r--r-- | usr.bin/less/cmdbuf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/less/cmdbuf.c b/usr.bin/less/cmdbuf.c index 9a56979b4dd..93fbf113265 100644 --- a/usr.bin/less/cmdbuf.c +++ b/usr.bin/less/cmdbuf.c @@ -1352,7 +1352,9 @@ histfile_name() return (save(name)); } - /* Otherwise, file is in $HOME. */ + /* Otherwise, file is in $HOME if enabled. */ + if (strcmp (LESSHISTFILE, "-") == 0) + return (NULL); home = lgetenv("HOME"); if (home == NULL || *home == '\0') { |