aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/fish.cpp
Commit message (Collapse)AuthorAge
* `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