SHA256
1
0
forked from pool/tcsh
tcsh/tcsh-6.15.00-fullpath.dif
2010-02-15 13:04:06 +00:00

23 lines
562 B
Plaintext

--- tw.parse.c
+++ tw.parse.c 2008-11-26 17:52:07.190195106 +0000
@@ -347,9 +347,19 @@ tenematch(Char *inputline, int num_read,
goto end;
}
}
+
Strbuf_append(&wordbuf, qline.s + wordp);
Strbuf_terminate(&wordbuf);
cleanup_push(&wordbuf, Strbuf_cleanup);
+
+ if ((looking == TW_COMMAND) && (*wordbuf.s == '/')) {
+ if (executable((Char*)0, wordbuf.s, 0)) {
+ cleanup_until(&wordbuf);
+ search_ret = 0;
+ goto end;
+ }
+ }
+
search_ret = spell_me(&wordbuf, looking, pat, suf);
qline.len = wordp;
Strbuf_append(&qline, wordbuf.s);