aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/fish.cpp
Commit message (Collapse)AuthorAge
* Remove oopsies while pasting.Gravatar Aaron Gyes2016-06-25
| | | | | (also, last commit log had a typo. "3.4.0-Microsoft" is the string we should check for. Actual string in my code was correct.)
* Check for "Windows-3.4.0" as per MS's suggestion.Gravatar Aaron Gyes2016-06-25
| | | | | | | https://github.com/Microsoft/BashOnWindows/issues/545 Just looking for "Mirosoft" is rather general - we don't want to enforce this strange behavior for Windows 12 (or the next beta.)
* Make IWYU output in lint.cpp less messyGravatar Aaron Gyes2016-06-23
| | | | And re-run IWYU, adjust #includes.
* deal with broken ttys on MS WindowsGravatar Kurtis Rader2016-06-18
| | | | | | | | The tty device timestamps on MS Windows aren't usable because they're always the current time. So fish can't use them to decide if the entire prompt needs to be repainted. Fixes #2859
* Lint CleanupGravatar Aaron Gyes2016-06-14
| | | | | | | This remove some stores that clang assures me are very dead. And an assert() for an unlikely NULL pointer dereference I can't quite figure out.
* 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
* make debug() output more usefulGravatar Kurtis Rader2016-05-17
| | | | | | | | | | This change does several things. First, and most important, it allows dumping the "n" most recent stack frames on each debug() call. Second, it demangles the C++ symbols. Third, it prepends each debug() message with the debug level. Unrelated to the above I've replaced all `assert(!is_forked_child());` statements with `ASSERT_IS_NOT_FORKED_CHILD()` for consistency.
* fix fork debug printf() callsGravatar Kurtis Rader2016-05-05
| | | | | | | | The fork (create new process) related debugging messages rely on an undocumented env var and use `printf()` rather than `debug()`. There are also errors in how the fork count is tracked that this fixes. Fixes #2995
* 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
* fix off by one errorGravatar Kurtis Rader2016-04-13
|
* fish handling of readlink()Gravatar Kurtis Rader2016-04-12
| | | | | | | | | | | | The readlink() function does not null terminate the path it returns. Remove the OS X code that deals with a path buffer that is too short. For one thing a loop isn't needed since we're told how big of a buffer is required if the first _NSGetExecutablePath() call fails. But more important it is so unlikely that the path will be longer than PATH_MAX that if it is we should just give up. Fixes 2931.
* revert inadvertent file inclusion in prior commitGravatar Kurtis Rader2016-04-12
| | | | | Commit 6431c0de16937622a2664c417f517d002220e017 was not meant to include changes to fish.cpp.
* fix bug in lint.fish helper scriptGravatar Kurtis Rader2016-04-12
| | | | | | | I just noticed that depending on the state of your working tree there can be one or more spaces after the modification token and the file name. If there is more than one space that causes the `string split` to produce unexpected output.
* `fish --version` should write to stdoutGravatar Kurtis Rader2016-03-23
| | | | | | | | | When explicitly asking for the fish version string the information should go to stdout rather than stderr. Also, there is no reason to use exit_without_destructors() rather than exit() in that code path. We actually want the side-effects of exit() such as flushing stdout and there aren't any threads or other things that could cause a normal exit to fail when that function is run.
* Fix memory leak, error message when failing to open input fileGravatar Andreas Nordal2016-03-22
| | | | | | | | | | | | | The early return skipped all cleanup. This problem is a case for the classic "goto fail" paradigm, but this change instead makes a few adjustments to take advantage of a previously unused level of indentation to conditionally execute the success path. The error message now prints the filename instead of "open", which should be more idiomatic. Tip: This patch makes sense if viewed with `git show --ignore-space-change`.
* 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.
* reduce number of Unicode private-use charactersGravatar Kurtis Rader2016-02-28
| | | | | | | | | This narrows the range of Unicode codepoints fish reserves for its own use from U+E000 thru U+F8FE (6399 codepoints) to U+F600 thru U+F73F (320 codepoints). This is still not ideal since fish shouldn't be using any Unicode private-use codepoints but it's a step in the right direction. This partially addresses issue #2684.
* when sourcing config.fish do not redirect stderrGravatar Kurtis Rader2016-02-04
| | | | | | | | | | All versions of fish prior to this change silently discarded anything written to stderr while source a config.fish file. Apparently just to avoid having the source command display an error if the file did not exist. This can mask real problems. So instead this change explicitly checks whether the file is readable and silently skips sourcing it if it isn't. Resolves issue #2702.
* Don't resolve paths for files run from argvGravatar ridiculousfish2016-01-03
| | | | | | | | | Before this change, `fish ./test.fish` would fully resolve the relative paths and symlinks of test.fish, as reported by `status -f`. However `source` would not. With this change, both cases return relative paths. `realpath` may be used by scripts to resolve them. Fixes #2643
* "Stop" should be "stomp" in fish.cpp commentGravatar ridiculousfish2015-12-29
|
* getopt long_options to be constGravatar ridiculousfish2015-12-21
|
* simplify fish_parse_optGravatar Kurtis Rader2015-12-21
| | | | | | | | | | | | | | While investigating issue #2619 my first thought was that the problem had something to do with the "is_interactive_session" global variable. That preliminary conclusion appears to be wrong (i.e., the problem lies elsewhere). However, that hypothesis caused me to look at function "fish_parse_opt" and other mentions of "is_interactive_session". I decided to take the opportunity to simplify and improve the style of "fish_parse_opt" since I just spent an hour reviewing the code that references "is_interactive_session". For example, the "has_cmd" variable isn't really needed. And there is inconsistent whitespace not to mention confusion about bool's versus int's and zero versus NULL.
* Initial implementation of wildcard match refactoringGravatar ridiculousfish2015-08-08
| | | | Not yet turned on.
* 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