summaryrefslogtreecommitdiff
path: root/vis-complete
AgeCommit message (Collapse)Author
2025-01-06scripts: make option listing more consistentRandy Palamar
2025-01-06scripts: fix shellcheck warnings and make scripts more uniformMatěj Cepl
2023-09-27vis-complete: also split on `\`Randy Palamar
suggested in [0] since it will be help for latex [0]: https://github.com/martanne/vis/commit/dac6a7e#comments
2023-09-22vis-complete: use hand picked set of characters for word splittingRandy Palamar
{w,}ctype(3) character classes are essentially broken for non-ascii text. 711447a tried to fix this for words surrounded by blanks but forgot the use case of completing function and variable names in source code. Instead of relying on the terrible ctype interface we can hand pick a set that is good enough for both source code completion and writing prose. This set is consistent with the old [:alnum:] behaviour for ascii text but also supports words with single width non-ascii characters. fixes 711447a: vis-complete: handle non-ascii text closes #1132: Source code completion are broken
2023-08-14vis-complete: handle non-ascii textSilvan Jegen
The '[:alnum:]' set does not include non-ascii text which results in the non-ascii text being replaced with newlines. Using the '[:blank:]' set with no complement flag fixes this issue.
2023-05-23vis-complete: Fix commandline options handlingQuentin Rameau
2022-11-29make vis-open and vis-complete more POSIX compliantTom Schwindl
This commit combines 3 commits: - vis-open: `local' is not part of POSIX (Author: Tom Schwindl <schwindl@posteo.de>) - More POSIXisation. (Author: Matěj Cepl <mcepl@cepl.eu>) - Clean up of vis-complete as well. (Author: Matěj Cepl <mcepl@cepl.eu>)
2018-01-27vis-complete: Strip the common partTwoFinger
The previous commit would generate duplicate entries when files with the same name exist in more than one directory.
2018-01-27vis-complete: Show just basenames in vis-menuTwoFinger
2018-01-27vis-complete: Slight refactoringTwoFinger
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".
2016-10-28vis-complete: allow custom input not matching any completion candidateMarc André Tanner
See also discussion in #402.
2016-10-11File completion updatesRichard Burke
2016-10-08Teach vis-complete that ".." path segments in the prefix are acceptable.Tim Allen
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.
2016-10-08Quote meta-characters in the completion pattern.Tim Allen
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.
2016-10-08Handle completing absolute paths, not just relative ones.Tim Allen
2016-10-07Don't use repeated shell evaluation in vis-complete.Tim Allen
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.
2016-10-05Harden vis-completeRichard Burke
2016-10-05vis-complete - Use different delimiter in sed commandRichard Burke
This is to avoid issues when handling file paths
2016-09-25vis: move file name and word completion logic to a shell scriptMarc André Tanner
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