diff options
author | 2010-01-04 16:45:46 -0500 | |
---|---|---|
committer | 2010-01-04 16:45:46 -0500 | |
commit | 5248783475981cd9eb9d0ba0109e353ca7c5b1f6 (patch) | |
tree | 3fe53459910c38f9f7110e857c942773426e3cbe /init.lua | |
parent | 0896150b65e97f101b109e92feb7197d1c99848d (diff) | |
download | textadept-5248783475981cd9eb9d0ba0109e353ca7c5b1f6.tar.gz textadept-5248783475981cd9eb9d0ba0109e353ca7c5b1f6.zip |
Added command line switch for not loading/saving sessions.
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -56,11 +56,21 @@ if not RESETTING then if #arg == 0 then _m.textadept.session.load() else + -- process command line switches + for i, switch in ipairs(arg) do + if switch == '-ns' or switch == '--no-session' then + _m.textadept.session.SAVE_ON_QUIT = false + table.remove(arg, i) + end + end + + -- open files local base_dir = arg[0]:match('^.+/') or '' for _, filename in ipairs(arg) do if not filename:find('^~?/') then filename = base_dir..filename end textadept.io.open(filename) end + -- read only the Project Manager session settings if not _m.textadept.session.load(nil, true) then textadept.pm.entry_text = 'buffers' |