fix: dont add recent dir if its same as last previous (fixes #92)

windows-fixes
TorchedSammy 2022-02-23 21:16:16 -04:00
parent 11f193b394
commit 5e9ea9fead
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 3 additions and 1 deletions

View File

@ -30,8 +30,10 @@ commander.register('cd', function (args)
bait.throw('cd', path)
-- add to table of recent dirs
table.insert(recentDirs, 1, path)
recentDirs[11] = nil
if recentDirs[#recentDirs - 1] ~= path then
table.insert(recentDirs, 1, path)
end
return
end