]> Sergey Matveev's repositories - nnn.git/commitdiff
Change history file path.
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 23 Aug 2019 13:40:48 +0000 (19:10 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 23 Aug 2019 13:40:48 +0000 (19:10 +0530)
The new path is ${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.history

src/nnn.c

index 1bc0908efce78d903c3dcd8b28ebee117eb1b99c..665fa658761e6ca160d6c6402662c2e3571f5cc6 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4964,7 +4964,8 @@ int main(int argc, char *argv[])
 #else
        rl_bind_key('\t', rl_complete);
 #endif
-       read_history(NULL);
+       mkpath(cfgdir, ".history", g_buf);
+       read_history(g_buf);
 #endif
 
        if (!initcurses())
@@ -4974,7 +4975,8 @@ int main(int argc, char *argv[])
        exitcurses();
 
 #ifndef NORL
-       write_history(NULL);
+       mkpath(cfgdir, ".history", g_buf);
+       write_history(g_buf);
 #endif
 
        if (cfg.pickraw) {