| Age | Commit message (Collapse) | Author | Files | Lines |
|
The previous commit would generate duplicate entries when files with the
same name exist in more than one directory.
|
|
|
|
Move the "case $PATTERN" block inside "if $COMPLETE_WORD" to make it
clear that it is specific only to the "else" branch.
Eliminate the $START variable - it was used only once, and using
dirname(1) directly is obvious enough.
Remove the comments inside the "case" block (explaining the "what") and
replaced them with a single comment explaining the "why".
|
|
See also discussion in #402.
|
|
|
|
Instead of trying to filter out path-segments-beginning-with-dot from the
entire path (including the prefix, which would be perfectly legitimate),
tell find to prune hidden directories and ignore hidden file as it walks
the tree.
|
|
Because we're completing text from the document, we can't assume it's
going to be a sensible regex pattern, or glob pattern, let alone both,
so we should quote the pattern before we hand it off to helper tools
like grep and find.
|
|
|
|
Previously, vis-complete built up a command-line by repeated subtitution
into a shell variable, then executing that shell variable in a subshell.
I'm not entirely sure what shell-meta-character mischief would have been
possible, but now we just do all the piping in the same shell which is
much safer.
|
|
|
|
This is to avoid issues when handling file paths
|
|
The shell script should be reviewed for quoting issues, currently
it allows command injections as in:
$ vis-complete "'; rm -f some-file; echo "
However it is intended for interactive usage and from within vis
it is only ever called with a valid completion prefix.
The file name completion logic now supports nested directories.
Close #347
|