aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/wildcard.cpp
Commit message (Collapse)AuthorAge
* Make IWYU output in lint.cpp less messyGravatar Aaron Gyes2016-06-23
| | | | And re-run IWYU, adjust #includes.
* fix some style bogosities that crept inGravatar Kurtis Rader2016-05-27
|
* add (or restore) config.h to all filesGravatar David Adam2016-05-18
| | | | | | | | The autoconf-generated config.h contains a number of directives which may alter the behaviour of system headers on certain platforms. Always include it in every C++ file as the first include. Closes #2993.
* lint cleanup: eliminate "redundant" errorsGravatar Kurtis Rader2016-05-04
| | | | | This removes some pointless parentheses but the primary focus is removing redundancies like unnecessary "else" clauses.
* restyle switch blocks to match project styleGravatar Kurtis Rader2016-05-03
| | | | | | | | | | | | | | | I missed restyling a few "switch" blocks to make them consistent with the rest of the code base. This fixes that oversight. This should be the final step in restyling the C++ code to have a consistent style. This also includes a few trivial cleanups elsewhere. I also missed restyling the "complete" module when working my way from a to z so this final change includes restyling that module. Total lint errors decreased 36%. Cppcheck errors went from 47 to 24. Oclint P2 errors went from 819 to 778. Oclint P3 errors went from 3252 to 1842. Resolves #2902.
* restyle remaining modules to match project styleGravatar Kurtis Rader2016-05-03
| | | | | | | | | For this change I decided to bundle the remaining modules that need to be resytyled because only two were large enough to warrant doing on their own. Reduces lint errors from 225 to 162 (-28%). Line count from 3073 to 2465 (-20%). Another step in resolving issue #2902.
* add better support for IWYU and fix thingsGravatar Kurtis Rader2016-04-26
| | | | | | | | | Remove the "make iwyu" build target. Move the functionality into the recently introduced lint.fish script. Fix a lot, but not all, of the include-what-you-use errors. Specifically, it fixes all of the IWYU errors on my OS X server but only removes some of them on my Ubuntu 14.04 server. Fixes #2957
* Migrate PATH-completion logic from complete.cpp to expand.cppGravatar ridiculousfish2016-04-07
| | | | | | | | | | | | | | | | Prior to this fix, when completing a command that doesn't have a /, we would prepend each component of PATH and then expand the whole thing. So any special characters in the PATH would be interpreted when performing tab completion. With this fix, we pull the PATH resolution out of complete.cpp and migrate it to expand.cpp. This unifies nicely with the CDPATH resolution already in that file. This requires introducing a new expand flag EXPAND_SPECIAL_FOR_COMMAND, which is analogous to EXPAND_SPECIAL_CD (which is renamed to EXPAND_SPECIAL_FOR_CD). This flag tells expand to resolve paths against PATH instead of the working directory. Fixes #952
* Miscellaneous cleanup and dead code removalGravatar ridiculousfish2016-02-19
| | | | Noticed by cppcheck
* Implement the cd "unique hierarchy" autosuggestion in expand.cppGravatar ridiculousfish2016-02-18
|
* Additional work on unifying cd autosuggestions with completeGravatar ridiculousfish2016-02-18
|
* Pass a struct stat by const reference instead of by valueGravatar ridiculousfish2016-01-03
|
* Don't do intermediate fuzzy directory matching with $PATHGravatar ridiculousfish2015-10-03
| | | | | When expanding an executable with $PATH, don't attempt to interpret the directories in PATH as fuzzy matching. Fixes #2413.
* Fix a typoGravatar ridiculousfish2015-09-27
|
* Fix for recursive wildcard expansion ignoring directoriesGravatar ridiculousfish2015-09-27
| | | | | When ascending out of a directory, we need to clear the directory from the visited set. Fixes #2414.
* Trailing slashes in wildcards need to match directoriesGravatar ridiculousfish2015-09-27
| | | | Fixes the wrong sense in a waccess test.
* Add wreaddir_for_dirs functionGravatar ridiculousfish2015-08-08
| | | | Eliminates some stat calls, speeding up wildcard expansion
* Eliminate wildcard_expand functionGravatar ridiculousfish2015-08-08
|
* Initial implementation of intermediate fuzzy completionGravatar ridiculousfish2015-08-08
| | | | e.g. /u/l/b<tab> may be expanded to /usr/local/bin
* Experiment to rework wildcard matchingGravatar ridiculousfish2015-08-08
| | | | | Preparation for zsh-style intermediate component tab completion
* Tweak try_add_completion_result logicGravatar ridiculousfish2015-08-08
| | | | Preparation for zsh-style intermediate fuzzy matching
* Migrate the prepend_token_prefix logic into the expanderGravatar ridiculousfish2015-08-08
|
* Factor the expander class a bit moreGravatar ridiculousfish2015-08-08
|
* Move the "wildcard_complete" test into wildcard_test_flags_then_completeGravatar ridiculousfish2015-08-08
| | | | Simplifies code yet further
* Eliminate the wildcard_expand_internal functionGravatar ridiculousfish2015-08-08
|
* rename FOR_COMPLETIONS to EXPAND_FOR_COMPLETIONSGravatar ridiculousfish2015-08-08
| | | | This is yet clearer
* Slight refactoring of expander's return code implementationGravatar ridiculousfish2015-08-08
|
* Rewrite wildcard_complete_internal to be easier to followGravatar ridiculousfish2015-08-08
|
* Remove some dead codeGravatar ridiculousfish2015-08-08
|
* Factor the completion prefix behavior into its own functionGravatar ridiculousfish2015-08-08
| | | | | | In a few places, we need to add a prefix to completions that replace the token. This change factors that logic into its own function prepend_token_prefix.
* Eliminate recurse_to_subdirectories functionGravatar ridiculousfish2015-08-08
|
* rename ACCEPT_INCOMPLETE to FOR_COMPLETIONS, which is clearerGravatar ridiculousfish2015-08-08
|
* Turn on the new wildcard expanderGravatar ridiculousfish2015-08-08
|
* Initial implementation of wildcard match refactoringGravatar ridiculousfish2015-08-08
| | | | Not yet turned on.
* Merge branch 'iwyu'Gravatar David Adam2015-07-29
|\ | | | | | | http://include-what-you-use.org/
* | Stop passing mutable references to completions aroundGravatar ridiculousfish2015-07-27
| | | | | | | | | | Replace uses of vector<completion_t>& with vector<completion_t>* This makes it clear at the call site that the object may be mutated.
| * Merge branch 'master' into iwyuGravatar David Adam2015-07-26
|/
* Migrate source files into src/ directoryGravatar ridiculousfish2015-07-25
| | | | | | | | This change moves source files into a src/ directory, and puts object files into an obj/ directory. The Makefile and xcode project are updated accordingly. Fixes #1866
* Migrate source files into src/ directoryGravatar ridiculousfish2015-07-24
This change moves source files into a src/ directory, and puts object files into an obj/ directory. The Makefile and xcode project are updated accordingly. Fixes #1866