Created
February 12, 2015 10:58
-
-
Save pine/705b053045f93020d060 to your computer and use it in GitHub Desktop.
touch command for NYAGOS. License: Public Domain.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nyagos.alias('touch', function(args) | |
if #args <= 0 then | |
print 'Usage: touch FILENAME' | |
return | |
end | |
local fd = io.open(args[1]) | |
if fd then | |
fd:close() | |
else | |
io.open(args[1], 'w'):close() | |
end | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment