Commit Graph

4941 Commits

Author SHA1 Message Date
ridiculousfish
3a3a9f5cc1 Add wreaddir_for_dirs function
Eliminates some stat calls, speeding up wildcard expansion
2015-08-08 14:52:04 -07:00
ridiculousfish
f87268e2ac Remove a bogus function declaration 2015-08-08 14:32:10 -07:00
ridiculousfish
6347988e0a Eliminate wildcard_expand function 2015-08-08 13:55:51 -07:00
ridiculousfish
b92acd3cf2 Initial implementation of intermediate fuzzy completion
e.g. /u/l/b<tab> may be expanded to /usr/local/bin
2015-08-08 13:55:51 -07:00
ridiculousfish
fd96bafbc8 Experiment to rework wildcard matching
Preparation for zsh-style intermediate component
tab completion
2015-08-08 13:55:51 -07:00
ridiculousfish
b7e16cb0dd Tweak try_add_completion_result logic
Preparation for zsh-style intermediate fuzzy matching
2015-08-08 13:55:51 -07:00
ridiculousfish
459df23931 Migrate the prepend_token_prefix logic into the expander 2015-08-08 13:55:50 -07:00
ridiculousfish
e7b22a7ed2 Factor the expander class a bit more 2015-08-08 13:55:50 -07:00
ridiculousfish
bcbe91461e Move the "wildcard_complete" test into wildcard_test_flags_then_complete
Simplifies code yet further
2015-08-08 13:55:50 -07:00
ridiculousfish
b68410d619 Eliminate the wildcard_expand_internal function 2015-08-08 13:55:50 -07:00
ridiculousfish
602e9cebd9 rename FOR_COMPLETIONS to EXPAND_FOR_COMPLETIONS
This is yet clearer
2015-08-08 13:55:50 -07:00
ridiculousfish
d2049edcab Slight refactoring of expander's return code implementation 2015-08-08 13:55:49 -07:00
ridiculousfish
83322f63c6 Rewrite wildcard_complete_internal to be easier to follow 2015-08-08 13:55:49 -07:00
ridiculousfish
f0a2f24701 Remove some dead code 2015-08-08 13:55:49 -07:00
ridiculousfish
97f1a8fe91 Factor the completion prefix behavior into its own function
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.
2015-08-08 13:55:49 -07:00
ridiculousfish
0ac9f159d6 Eliminate recurse_to_subdirectories function 2015-08-08 13:55:49 -07:00
ridiculousfish
a3f8e27bf8 rename ACCEPT_INCOMPLETE to FOR_COMPLETIONS, which is clearer 2015-08-08 13:55:49 -07:00
ridiculousfish
b55c13f275 Turn on the new wildcard expander 2015-08-08 13:55:48 -07:00
ridiculousfish
761651d410 Add some expansion tests 2015-08-08 13:55:48 -07:00
ridiculousfish
70548f7cc7 Initial implementation of wildcard match refactoring
Not yet turned on.
2015-08-08 13:55:43 -07:00
ridiculousfish
bc8a34f8df Add a missing typecast 2015-08-08 10:35:17 -07:00
Tom Smeding
8f0cd5508d Fix wrong max argument list size reporting 2015-08-08 10:09:33 -07:00
David Adam
e56f0628d5 common.cpp: check wcwidth for supported characters
Rather than trying to detect Unicode support from the environment, check
the printable width of characters in the current locale before deciding
on whether to use them.

Closes #1927.
2015-08-03 14:18:06 +08:00
David Adam
a6a16808e3 Merge branch 'iwyu'
http://include-what-you-use.org/
2015-07-29 09:30:19 +08:00
ridiculousfish
aee71b594b Remove unused unload_all function 2015-07-27 23:36:54 -07:00
ridiculousfish
6e3231a9d7 Stop passing mutable references to completions around
Replace uses of vector<completion_t>& with vector<completion_t>*
This makes it clear at the call site that the object may be mutated.
2015-07-27 18:45:47 -07:00
ridiculousfish
85dad6913e Support file tab completion after = and : separators
For example, env VAR=/usr<tab> will now work as expected

Fixes #2178
2015-07-27 13:43:20 -07:00
ridiculousfish
deacec07bf Fix a warning with g++ about an unused function result 2015-07-26 10:55:19 -07:00
David Adam
958880d972 src/wutil: drop <features.h> header, _BSD_SOURCE is defined by the compiler 2015-07-26 19:58:02 +08:00
ridiculousfish
78af59f40c Handle getcwd failures to satisfy the linter 2015-07-26 02:15:59 -07:00
ridiculousfish
c59f5e9f01 Cast getcwd() to void to defeat a warning 2015-07-26 02:14:06 -07:00
ridiculousfish
c9349f2ef6 Continue to refine tokenizer interface
Migrate some functions into tokenizer instance methods
2015-07-26 00:58:32 -07:00
ridiculousfish
4ebaa7b6bd Continue migration to the new tokenizer interface 2015-07-26 00:12:36 -07:00
ridiculousfish
618896c043 Early reworking of tokenizer interface 2015-07-25 23:05:47 -07:00
ridiculousfish
0dbd83ffaf Remove some dead code 2015-07-25 22:47:44 -07:00
David Adam
3929e9de0e Merge branch 'master' into iwyu 2015-07-26 10:20:13 +08:00
ridiculousfish
f4d1657c22 Eliminate wgetopt global variables
Replace them with a new struct wgetopter_t that uses
instance variables instead.
2015-07-25 18:16:34 -07:00
ridiculousfish
ac72db8ef0 Make our wgettext() implementation a little less terrifying
Use wchar_t* directly instead of wcstring.c_str()
2015-07-25 16:01:59 -07:00
ridiculousfish
1786a7cdc4 Use the address-of operator when checking for weak symbols
This fixes a warning with gcc on OS X
2015-07-25 13:02:58 -07:00
ridiculousfish
a91e8887cd Migrate source files into src/ directory
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
2015-07-25 12:31:57 -07:00
ridiculousfish
b4f53143b0 Migrate source files into src/ directory
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
2015-07-24 00:59:27 -07:00