2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-02 19:53:23 +00:00

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

This commit is contained in:
TorchedSammy 2022-02-23 21:16:16 -04:00
parent 11f193b394
commit 5e9ea9fead
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD

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