aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/fish_indent.cpp
Commit message (Collapse)AuthorAge
* Make IWYU output in lint.cpp less messyGravatar Aaron Gyes2016-06-23
| | | | And re-run IWYU, adjust #includes.
* Improve fish_indent -w error outputGravatar Aaron Gyes2016-06-12
| | | | Show small usage blurb, add newline to end.
* Error on -w without a path before reading stdinGravatar Aaron Gyes2016-06-12
| | | | | Oops, `fish_indent -w` just sits there waiting for input if nothing is pointing at it, only to give user the error afterwards.
* Fix crash when fish_indent is using stdin with -wGravatar Aaron Gyes2016-06-10
| | | | | | | | | | | When given no path, the logic was happy to try to use an unitialized output_location. $ fish_indent -w < test.fish Opening "(null)" failed: Bad address Initialize the string, and repair the logic to catch this case and report the problem correctly.
* simplify, and fix, setting the current localeGravatar Kurtis Rader2016-06-05
| | | | | | | | | | Fix test setup bogosities. Specifically, they weren't hermetic with respect to locale env vars. Rewrite the handling of locale vars to simplify the code and make it more like the pattern most programs employ. Fixes #3110
* add option to modify script being restyledGravatar Camille Scholtz2016-05-22
| | | | | | This change allows the user to specify the script name on the CLI in addition to being redirected from stdin. It also adds a `-w` flag to write the modified script to the original file.
* 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.
* restyle fish modules to match project styleGravatar Kurtis Rader2016-04-30
| | | | | | Reduces lint errors from 60 to 60 (-0%). Line count from 5599 to 4925 (-12%). 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
* another wcstring to wchar_t * changeGravatar Kurtis Rader2016-04-10
| | | | | | | | | | | In keeping with the change made by @ridiculousfish earlier today modify the `keyword_description()` function to return a const wchar_t pointer. Also, simplify the `token_type_description()` function to use the recently introduced mapping array. This changes the wording of many of the token type descriptions. However, I can't see this as being a problem since the original descriptions (e.g., "token_redirection") are no clearer to someone not acquainted with the implementation.
* enhance fish_indent to normalize keywordsGravatar Kurtis Rader2016-04-10
| | | | | | | | | | | Fish keywords can be quoted and split across lines. Prior to this change `fish_indent` would retain such odd, obfuscated, formatting. This change results in all keywords being converted to their canonical form. This required fixing a bug: the keyword member of parse_node_t wasn't being populated. This hadn't been noticed prior to now because it wasn't used. Fixes #2921
* Change parser_token_types from wcstring to const wchar_t *Gravatar ridiculousfish2016-04-10
| | | | Reduces allocations and startup time
* change how redirections are formattedGravatar Kurtis Rader2016-04-05
| | | | | | | | Modify `fish_indent` to emit redirections without a space before the target of the redirection; e.g., "2>&1" rather than "2>& 1" as the former is clearer to humans. Fixes #2899
* assume getopt/getopt_long is availableGravatar Kurtis Rader2016-03-08
| | | | | | | | | | | There is no longer a good reason to detect whether or not getopt_long() is available. All UNIX implementations we're likely to run on have it. And if we ever find one that doesn't the right thing to do is not fallback to getopt() but to include the getopt_long() source in our package like we do with the pcre2 library. Since it's licensed under LGPL we can legally do so if it becomes necessary. This partially addresses issue #2790.
* Allow and/or statements to attach to the if/while headerGravatar ridiculousfish2015-12-19
| | | | | | | | | | For example: if false; or true; echo hello; end will output 'hello' now. Fixes #1428
* Merge branch 'master' into iwyuGravatar David Adam2015-07-26
|
* 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