diff options
author | Marius <mariausol@gmail.com> | 2013-12-14 14:40:29 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-12-14 14:40:29 +0200 |
commit | 0206a143cbba88e11f40e4aabb9350b24a93a8ac (patch) | |
tree | b6155e5c7b82b42c6f7fda387491c283cf19eb7f /scripts/context/lua/mtx-fcd.lua | |
parent | a580b214e706b8a24a181514b04b9130120e8763 (diff) | |
download | context-0206a143cbba88e11f40e4aabb9350b24a93a8ac.tar.gz |
beta 2013.12.14 13:34
Diffstat (limited to 'scripts/context/lua/mtx-fcd.lua')
-rw-r--r-- | scripts/context/lua/mtx-fcd.lua | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/scripts/context/lua/mtx-fcd.lua b/scripts/context/lua/mtx-fcd.lua index 8655294d2..2fcb9a2c7 100644 --- a/scripts/context/lua/mtx-fcd.lua +++ b/scripts/context/lua/mtx-fcd.lua @@ -122,13 +122,25 @@ local stubdata local stubdummy local stubchdir + if os.type == 'windows' then - gotofile = 'mtx-fcd-goto.cmd' - datafile = 'mtx-fcd-data.lua' - stubfile = 'fcd.cmd' - stubdata = mswinstub - stubdummy = 'rem no dir to change to' - stubchdir = 'cd /d "%s"' + local shell = "cmd" +-- local shell = "powershell" + if shell == "powershell" then + gotofile = 'mtx-fcd-goto.ps1' + datafile = 'mtx-fcd-data.lua' + stubfile = 'fcd.cmd' + stubdata = mswinstub + stubdummy = '# no dir to change to' + stubchdir = '. Set-Location %s' -- powershell + else + gotofile = 'mtx-fcd-goto.cmd' + datafile = 'mtx-fcd-data.lua' + stubfile = 'fcd.cmd' + stubdata = mswinstub + stubdummy = 'rem no dir to change to' + stubchdir = 'cd /d "%s"' -- cmd + end else gotofile = 'mtx-fcd-goto.sh' datafile = 'mtx-fcd-data.lua' @@ -183,7 +195,7 @@ end local function fcd_changeto(dir) if dir and dir ~= "" then - io.savedata(gotofile,format(stubchdir,dir)) + io.savedata(gotofile,format(stubchdir,dir,dir)) end end |