2 -- ion/query/mod_query_chdir.lua
4 -- Copyright (c) Tuomo Valkonen 2004-2006.
6 -- Ion is free software; you can redistribute it and/or modify it under
7 -- the terms of the GNU Lesser General Public License as published by
8 -- the Free Software Foundation; either version 2.1 of the License, or
9 -- (at your option) any later version.
12 local function ws_chdir(mplex, params)
13 ws=assert(ioncore.find_manager(mplex, "WGroupWS"))
14 local ok, err=ioncore.chdir_for(ws, params[1] or "")
16 mod_query.warn(mplex, err)
20 local function ws_showdir(mplex, params)
21 local dir=assert(ioncore.get_dir_for(mplex) or os.getenv("PWD"))
22 mod_query.message(mplex, dir)
25 mod_query.defcmd("cd", ws_chdir)
26 mod_query.defcmd("pwd", ws_showdir)