2
3
şunun yansıması https://github.com/sammy-ette/Hilbish eşitlendi 2025-08-10 02:52:03 +00:00

feat: make cd builtin work with env variables (resolves #43)

Bu işleme şunda yer alıyor:
sammy 2021-05-01 13:31:51 -04:00
ebeveyn 9b3f8e818c
işleme 80029cfff3
Veri tabanında bu imza için bilinen anahtar bulunamadı
GPG Anahtar Kimliği: 50EE40A2809851F5

Dosyayı Görüntüle

@ -12,6 +12,8 @@ commander.register('cd', function (args)
for i = 1, #args do for i = 1, #args do
path = path .. tostring(args[i]) .. ' ' path = path .. tostring(args[i]) .. ' '
end end
path = path:gsub('$%$','\0'):gsub('${([%w_]+)}', os.getenv)
:gsub('$([%w_]+)', os.getenv):gsub('%z','$')
local ok, err = pcall(function() fs.cd(path) end) local ok, err = pcall(function() fs.cd(path) end)
if not ok then if not ok then