aboutsummaryrefslogtreecommitdiff
path: root/func.go
diff options
context:
space:
mode:
authorFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-06-15 14:50:07 +0900
committerFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-06-15 16:52:50 +0900
commit8341013b6fbefc2b7269701eac4c5dabe24d42bf (patch)
tree8c67f7d339076015e1af0028badfbfb74b3e8300 /func.go
parentf543f4db924daf39eb0e604636c7839175a35abd (diff)
downloadkati-8341013b6fbefc2b7269701eac4c5dabe24d42bf.tar.gz
add findleaves support
Diffstat (limited to 'func.go')
-rw-r--r--func.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/func.go b/func.go
index 5572236..1ce5f38 100644
--- a/func.go
+++ b/func.go
@@ -447,7 +447,7 @@ func (f *funcWildcard) Eval(w io.Writer, ev *Evaluator) {
assertArity("wildcard", 1, len(f.args))
abuf := newBuf()
f.args[1].Eval(abuf, ev)
- te := traceEvent.begin("wildcard", string(abuf.Bytes()), traceEventMain)
+ te := traceEvent.begin("wildcard", tmpval(abuf.Bytes()), traceEventMain)
if ev.avoidIO && !useWildcardCache {
ev.hasIO = true
w.Write([]byte("$(/bin/ls -d "))
@@ -721,7 +721,7 @@ func (f *funcShell) Eval(w io.Writer, ev *Evaluator) {
abuf := newBuf()
f.args[1].Eval(abuf, ev)
if ev.avoidIO && !hasNoIoInShellScript(abuf.Bytes()) {
- te := traceEvent.begin("shell", string(abuf.Bytes()), traceEventMain)
+ te := traceEvent.begin("shell", tmpval(abuf.Bytes()), traceEventMain)
ev.hasIO = true
w.Write([]byte("$("))
w.Write(abuf.Bytes())
@@ -740,7 +740,7 @@ func (f *funcShell) Eval(w io.Writer, ev *Evaluator) {
Args: cmdline,
Stderr: os.Stderr,
}
- te := traceEvent.begin("shell", arg, traceEventMain)
+ te := traceEvent.begin("shell", literal(arg), traceEventMain)
out, err := cmd.Output()
shellFuncTime += time.Since(te.t)
shellFuncCount++
@@ -786,7 +786,7 @@ func (f *funcCall) Eval(w io.Writer, ev *Evaluator) {
fargs := ev.args(abuf, f.args[1:]...)
varname := fargs[0]
variable := string(varname)
- te := traceEvent.begin("call", variable, traceEventMain)
+ te := traceEvent.begin("call", literal(variable), traceEventMain)
Logf("call %q variable %q", f.args[1], variable)
v := ev.LookupVar(variable)
// Evalualte all arguments first before we modify the table.