| 258 | |
| 259 | |
| 260 | static const char * |
| 261 | append_char_function(const char *name) |
| 262 | { |
| 263 | struct stat stbuf; |
| 264 | char *expname = *name == '~' ? fn_tilde_expand(name) : NULL; |
| 265 | const char *rs = " "; |
| 266 | |
| 267 | if (stat(expname ? expname : name, &stbuf) == -1) |
| 268 | goto out; |
| 269 | if (S_ISDIR(stbuf.st_mode)) |
| 270 | rs = "/"; |
| 271 | out: |
| 272 | if (expname) |
| 273 | el_free(expname); |
| 274 | return rs; |
| 275 | } |
| 276 | /* |
| 277 | * returns list of completions for text given |
| 278 | * non-static for readline. |
nothing calls this directly
no test coverage detected