Use ~ for HOME directory in folder search

This commit is contained in:
Francesco Abbate
2020-12-19 16:31:42 +01:00
parent 03e95b2cc3
commit 35c87462a6
2 changed files with 34 additions and 11 deletions
+3 -5
View File
@@ -132,14 +132,12 @@ init_lua:
" DATADIR = prefix and (prefix .. '/share/lite-xl') or (EXEDIR .. '/data')\n"
" end\n"
#endif
" do\n"
#ifdef _WIN32
" local home = os.getenv('USERPROFILE')\n"
" HOME = os.getenv('USERPROFILE')"
#else
" local home = os.getenv('HOME')\n"
" HOME = os.getenv('HOME')"
#endif
" USERDIR = home and (home .. '/.config/lite-xl') or (EXEDIR .. '/user')\n"
" end\n"
" USERDIR = HOME and (HOME .. '/.config/lite-xl') or (EXEDIR .. '/user')\n"
" package.path = package.path .. ';' .. USERDIR .. '/?.lua'\n"
" package.path = package.path .. ';' .. USERDIR .. '/?/init.lua'\n"
" package.path = DATADIR .. '/?.lua;' .. package.path\n"