ş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:
ebeveyn
9b3f8e818c
işleme
80029cfff3
@ -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
|
||||||
|
Yükleniyor…
x
Yeni konuda referans
Bir kullanıcı engelle