Merge pull request #39 from kdheepak/fix-shell-not-reverting
Fix shell not reverting to oldshell
This commit is contained in:
@@ -26,6 +26,7 @@ local function project_root_dir()
|
|||||||
-- try submodule first
|
-- try submodule first
|
||||||
local gitdir = fn.system('cd "' .. fn.expand('%:p:h') .. '" && git rev-parse --show-superproject-working-tree')
|
local gitdir = fn.system('cd "' .. fn.expand('%:p:h') .. '" && git rev-parse --show-superproject-working-tree')
|
||||||
if gitdir ~= '' then
|
if gitdir ~= '' then
|
||||||
|
vim.o.shell = oldshell
|
||||||
return trim(gitdir)
|
return trim(gitdir)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -33,6 +34,7 @@ local function project_root_dir()
|
|||||||
local gitdir = fn.system('cd "' .. fn.expand('%:p:h') .. '" && git rev-parse --show-toplevel')
|
local gitdir = fn.system('cd "' .. fn.expand('%:p:h') .. '" && git rev-parse --show-toplevel')
|
||||||
local isgitdir = fn.matchstr(gitdir, '^fatal:.*') == ''
|
local isgitdir = fn.matchstr(gitdir, '^fatal:.*') == ''
|
||||||
if isgitdir then
|
if isgitdir then
|
||||||
|
vim.o.shell = oldshell
|
||||||
return trim(gitdir)
|
return trim(gitdir)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -41,6 +43,7 @@ local function project_root_dir()
|
|||||||
'cd "' .. fn.fnamemodify(fn.resolve(fn.expand('%:p')), ':h') .. '" && git rev-parse --show-toplevel')
|
'cd "' .. fn.fnamemodify(fn.resolve(fn.expand('%:p')), ':h') .. '" && git rev-parse --show-toplevel')
|
||||||
isgitdir = fn.matchstr(gitdir, '^fatal:.*') == ''
|
isgitdir = fn.matchstr(gitdir, '^fatal:.*') == ''
|
||||||
if isgitdir then
|
if isgitdir then
|
||||||
|
vim.o.shell = oldshell
|
||||||
return trim(gitdir)
|
return trim(gitdir)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user