Implemented unmap command.
h3rald h3rald@h3rald.com
Sat, 19 Nov 2016 11:19:25 +0100
2 files changed,
14 insertions(+),
0 deletions(-)
M
lib/project.nim
→
lib/project.nim
@@ -60,3 +60,12 @@ prj.packages[alias][key] = val
notice " $1 = $2" % [key, $val] prj.save notice "Package definition '$1' saved." % alias + +proc unmap*(prj: var NiftyProject, alias: string) = + prj.load + if not prj.packages.hasKey alias: + warn "Package definition '$1' not found. Nothing to do." % alias + return + prj.packages.delete(alias) + prj.save + notice "Package definition '$1' removed." % alias