Lines Matching refs:exp_dir

926 tw_collect_items(COMMAND command, int looking, struct Strbuf *exp_dir,  in tw_collect_items()  argument
982 tw_next_entry[looking](&item, exp_dir, &flags) != 0)) { in tw_collect_items()
1060 if (!(exec_check && !executable(exp_dir->s, item.s, dir_ok))) { in tw_collect_items()
1070 if (spdir(exp_name, exp_dir->s, item.s, target)) { in tw_collect_items()
1072 !executable(exp_dir->s, exp_name->s, dir_ok)) in tw_collect_items()
1110 if (exec_check && !executable(exp_dir->s, item.s, dir_ok)) in tw_collect_items()
1113 if (dir_check && !isadirectory(exp_dir->s, item.s)) in tw_collect_items()
1116 if (text_check && isadirectory(exp_dir->s, item.s)) in tw_collect_items()
1124 (dir_check || !isadirectory(exp_dir->s, item.s))) in tw_collect_items()
1139 if (filetype(exp_dir->s, item.s) == '/') in tw_collect_items()
1145 Strbuf_append1(&buf, filetype(exp_dir->s, item.s)); in tw_collect_items()
1236 tw_suffix(int looking, struct Strbuf *word, const Char *exp_dir, Char *exp_name) in tw_suffix() argument
1265 return isadirectory(exp_dir, ptr) ? '/' : ' '; in tw_suffix()
1273 return isadirectory(exp_dir, exp_name) ? '/' : ' '; in tw_suffix()
1345 tw_collect(COMMAND command, int looking, struct Strbuf *exp_dir, in tw_collect() argument
1371 ni = tw_collect_items(command, looking, exp_dir, exp_name, target, pat, in tw_collect()
1517 struct Strbuf exp_dir = Strbuf_INIT;/* dir after ~ expansion */ in t_search() local
1563 Strbuf_append(&exp_dir, pat); in t_search()
1564 if (exp_dir.len != 0 && exp_dir.s[exp_dir.len - 1] != '/') in t_search()
1565 Strbuf_append1(&exp_dir, '/'); in t_search()
1566 Strbuf_append(&exp_dir, dir.s); in t_search()
1568 Strbuf_terminate(&exp_dir); in t_search()
1569 cleanup_push(&exp_dir, Strbuf_cleanup); in t_search()
1640 if ((res = expand_dir(dir.s, &exp_dir, &dir_fd, command)) != 0) in t_search()
1662 if ((res = expand_dir(dir.s, &exp_dir, &dir_fd, command)) != 0) in t_search()
1664 if (isadirectory(exp_dir.s, name)) { in t_search()
1665 if (exp_dir.len != 0 || name[0] != '\0') { in t_search()
1670 if ((res = expand_dir(dir.s, &exp_dir, &dir_fd, command)) != 0) in t_search()
1680 if ((res = expand_dir(dir.s, &exp_dir, &dir_fd, command)) != 0) in t_search()
1688 if ((res = expand_dir(dir.s, &exp_dir, &dir_fd, command)) != 0) in t_search()
1696 if ((dir_fd = opendir(short2str(exp_dir.s))) == NULL) { in t_search()
1699 xprintf("%S: %s", exp_dir.s, strerror(errno)); in t_search()
1706 if (exp_dir.len != 0 && exp_dir.s[exp_dir.len - 1] != '/') { in t_search()
1707 Strbuf_append1(&exp_dir, '/'); in t_search()
1708 Strbuf_terminate(&exp_dir); in t_search()
1775 numitems = tw_collect(command, looking, &exp_dir, &exp_name, target, pat, in t_search()
1794 tw_suffix(looking, word, exp_dir.s, exp_name.s)); in t_search()