aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-x_.lua2
-rwxr-xr-xtest_.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/_.lua b/_.lua
index 33b4183..9e39c36 100755
--- a/_.lua
+++ b/_.lua
@@ -156,7 +156,7 @@ __ = function(c)
156 function exe:log() self.logging = true return self end 156 function exe:log() self.logging = true return self end
157 function exe:show() self.showing = true return self end 157 function exe:show() self.showing = true return self end
158 -- Should be called "then" but that's a reserved word. 158 -- Should be called "then" but that's a reserved word.
159 function exe:also(c) if nil == c then c = '' else c = ' ' .. c end self.cmd = self.cmd .. '; ' .. c .. ' ' return self end 159 function exe:Then(c) if nil == c then c = '' else c = ' ' .. c end self.cmd = self.cmd .. '; ' .. c .. ' ' return self end
160 function exe:And(c) if nil == c then c = '' else c = ' ' .. c end self.cmd = self.cmd .. ' && ' .. c .. ' ' return self end 160 function exe:And(c) if nil == c then c = '' else c = ' ' .. c end self.cmd = self.cmd .. ' && ' .. c .. ' ' return self end
161 function exe:Or(c) if nil == c then c = '' else c = ' ' .. c end self.cmd = self.cmd .. ' || ' .. c .. ' ' return self end 161 function exe:Or(c) if nil == c then c = '' else c = ' ' .. c end self.cmd = self.cmd .. ' || ' .. c .. ' ' return self end
162 function exe:noErr() self.cmd = self.cmd .. ' 2>/dev/null ' return self end 162 function exe:noErr() self.cmd = self.cmd .. ' 2>/dev/null ' return self end
diff --git a/test_.lua b/test_.lua
index e559238..e4448d2 100755
--- a/test_.lua
+++ b/test_.lua
@@ -85,7 +85,7 @@ for i,l in ipairs(__'uname -a\nfree -h':log():Do().lines) do
85end 85end
86print('') 86print('')
87 87
88__'uname -a':log():also'free -h':show():Do() 88__'uname -a':log():Then'free -h':show():Do()
89print('') 89print('')
90 90
91__{'uname -a', 'free -h'}:log():show():Do() 91__{'uname -a', 'free -h'}:log():show():Do()