Mirror von
https://github.com/Hilbis/Hilbish
synchronisiert 2025-06-30 16:22:03 +00:00
fix: trim extra whitespace from cd args
this fixed an issue with `cd -` not working
Dieser Commit ist enthalten in:
Ursprung
400dd2944d
Commit
cff7827ace
@ -16,7 +16,7 @@ commander.register('cd', function (args)
|
|||||||
path = path .. tostring(args[i]) .. ' '
|
path = path .. tostring(args[i]) .. ' '
|
||||||
end
|
end
|
||||||
path = path:gsub('$%$','\0'):gsub('${([%w_]+)}', os.getenv)
|
path = path:gsub('$%$','\0'):gsub('${([%w_]+)}', os.getenv)
|
||||||
:gsub('$([%w_]+)', os.getenv):gsub('%z','$')
|
:gsub('$([%w_]+)', os.getenv):gsub('%z','$'):gsub('^%s*(.-)%s*$', '%1')
|
||||||
|
|
||||||
if path == '-' then
|
if path == '-' then
|
||||||
path = oldDir
|
path = oldDir
|
||||||
|
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren