mirror of https://github.com/Hilbis/Hilbish
fix: trim extra whitespace from cd args
this fixed an issue with `cd -` not workingpull/73/head
parent
400dd2944d
commit
cff7827ace
|
@ -16,7 +16,7 @@ commander.register('cd', function (args)
|
|||
path = path .. tostring(args[i]) .. ' '
|
||||
end
|
||||
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
|
||||
path = oldDir
|
||||
|
|
Loading…
Reference in New Issue