aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Remove $versionGravatar Fabian Homborg2016-05-26
| | | | | It's too generic a name - which both does not communicate what it is and prevents someone else from using it.
* tty driver ignore lnext (\cV) and werase (\cW)Gravatar Kurtis Rader2016-05-25
| | | | | | | | | | Configure the tty driver to ignore the lnext (\cV) and werase (\cW) characters so they can be bound to fish functions. Correct the `fish_key_bindings` program to initialize the tty in the same manner as the `fish` program. Fixes #3064
* kill: Remove xsel integrationGravatar Fabian Homborg2016-05-25
| | | | | | | Overwriting the user's clipboard by default is annoying and contributors don't use it. This is better served via an explicit binding that calls e.g. `xsel`.
* 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.
* fix building on CygwinGravatar Kurtis Rader2016-05-19
| | | | | | | Cygwin still doesn't support any of the backtrace functions. Also, remove a spurious newline from a debug message. Fixes #2993
* make fish buildable on OS X Snow LeopardGravatar Kurtis Rader2016-05-19
| | | | | | | | | | | | | I noticed that the `test_convert()` function was randomly failing when run on OS X Snow Leopard. I tracked it down to the `mbrtowc()` function on that OS being broken. Explicitly testing for UTF-8 prefixes that identify a sequence longer than four bytes (which the Unicode standard made illegal long ago) keeps us from having encoding errors on those OS's. This also makes the errors reported by the `test_convert()` function actually useful and readable. Lastly, it makes it possible to build fish on OS X Snow Leopard.
* move convert_digit from fallback to commonGravatar David Adam2016-05-18
| | | | It's not required as part of fallback functions any more.
* fallback: drop fallbacks for C99/C++0x wide character functionsGravatar David Adam2016-05-18
| | | | | | | | Drops configure check for wcsdup, wcslen, wcscasecmp, wcsncasecmp, wcwidth, wcswidth, wcstok, fputwc, fgetwc, and wcstol. Drop the fallback implementations of these on non-Snow Leopard platforms. Work on #2999.
* fallback: remove fwprintf and friends fallbacksGravatar David Adam2016-05-18
| | | | | | | All modern operating systems implement fwprintf, including NetBSD (which introduced them in 2005). Work on #2999.
* fallback: remove sysconf fallbackGravatar David Adam2016-05-18
| | | | | | | sysconf was introduced in IEEE Std 1003.1-1988 (POSIX.1) and exists on every system I can find. Work on #2999.
* configure: drop fwprintf testGravatar David Adam2016-05-18
| | | | | | | | | | | fwprintf would segfault on DragonFly BSD 1.4.0, released in January 2006. This was fixed by DragonFly BSD 1.4.4, released in April 2006. It seems unlikely that anyone is still running a ten-year-old, unsupported version, and hoping that fish will continue to build. I've checked this in virtual machines. Work on #2999.
* configure: drop tests for ancient platformsGravatar David Adam2016-05-18
| | | | Work on #2999.
* 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.
* 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.
* trivial fix to fish_tests.cppGravatar Kurtis Rader2016-05-16
| | | | | | | Fix a minor bogosity I noticed while building fish on OS X Snow Leopard. It's technically not a bug because only old compilers complain about the original statement but this change makes the one line this changes consistent with the rest of the fish code.
* add `function --shadow-builtin` flagGravatar Kurtis Rader2016-05-14
| | | | | | | | | | | | | | It's currently too easy for someone to bork their shell by doing something like `function test; return 0; end`. That's obviously a silly, contrived, example but the point is that novice users who learn about functions are prone to do something like that without realizing it will bork the shell. Even expert users who know about the `test` builtin might forget that, say, `pwd` is a builtin. This change adds a `--shadow-builtin` flag that must be specified to indicate you know what you're doing. Fixes #3000
* rename get_is_interactive and remove stupid testGravatar Kurtis Rader2016-05-14
| | | | | | I'm doing this as part of fixing issue #2980. The code for managing tty modes and job control is a horrible mess. This is a very tiny step towards improving the situation.
* enhance the key_reader programGravatar Kurtis Rader2016-05-10
| | | | | | | | | | The original `key_reader` program was useful but didn't do much that `xxd` or `od -tx1z` didn't do. Furthermore, it wasn't built and installed by default. This change adds features that make it superior to those programs for decoding interactive key presses and makes it a first-class citizen like the `fish_indent` program that is always available. Fixes #2991
* restyle the key_reader sourceGravatar Kurtis Rader2016-05-10
|
* 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
* lint: low hanging fruit in history.cppGravatar Kurtis Rader2016-05-05
|
* lint: screen.cpp low hanging fruitGravatar Kurtis Rader2016-05-04
| | | | | The remaining lint work to be done on screen.cpp will require refactoring several functions that are way too large and complex.
* 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.
* eliminate "useless parentheses" lint errorsGravatar Kurtis Rader2016-05-03
| | | | | | | Some `oclint` errors regarding "useless parentheses" are meaningfull. But the vast majority are bogus in as much as removing the parentheses reduces readability. So fix a few of the egregious uses and otherwise suppress that error.
* add missing fallback declarationsGravatar Kurtis Rader2016-05-03
| | | | Fixes #2993
* 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.
* restyle utf8 module to match project styleGravatar Kurtis Rader2016-05-03
| | | | | | Reduces lint errors from 63 to 57 (-10%). Line count from 518 to 418 (-19%). Another step in resolving issue #2902.
* restyle tokenizer module to match project styleGravatar Kurtis Rader2016-05-03
| | | | | | Reduces lint errors from 70 to 46 (-34%). Line count from 1158 to 936 (-19%). Another step in resolving issue #2902.
* restyle signal module to match project styleGravatar Kurtis Rader2016-05-03
| | | | | | Reduces lint errors from 15 to 15 (-0%). Line count from 754 to 438 (-42%). Another step in resolving issue #2902.
* restyle sanity & screen module to match project styleGravatar Kurtis Rader2016-05-03
| | | | | | Reduces lint errors from 163 to 112 (-31%). Line count from 1866 to 1493 (-20%). Another step in resolving issue #2902.
* restyle reader module to match project styleGravatar Kurtis Rader2016-05-03
| | | | | | Reduces lint errors from 338 to 205 (-39%). Line count from 4650 to 3654 (-21%). Another step in resolving issue #2902.
* Suppress another pointless IWYU warningGravatar Kurtis Rader2016-05-02
|
* restyle proc module to match project styleGravatar Kurtis Rader2016-05-02
| | | | | | Reduces lint errors from 134 to 101 (-25%). Line count from 1994 to 1466 (-26%). Another step in resolving issue #2902.
* restyle postfork module to match project styleGravatar Kurtis Rader2016-05-02
| | | | | | Reduces lint errors from 37 to 20 (-46%). Line count from 670 to 566 (-15%). Another step in resolving issue #2902.
* restyle path module to match project styleGravatar Kurtis Rader2016-05-02
| | | | | | Reduces lint errors from 30 to 21 (-30%). Line count from 597 to 481 (-19%). Another step in resolving issue #2902.
* restyle parser module to match project styleGravatar Kurtis Rader2016-05-02
| | | | | | Reduces lint errors from 72 to 44 (-43%). Line count from 1698 to 1313 (-23%). Another step in resolving issue #2902.
* restyle parse_util module to match project styleGravatar Kurtis Rader2016-05-02
| | | | | | Reduces lint errors from 187 to 91 (-51%). Line count from 1754 to 1477 (-16%). Another step in resolving issue #2902.
* restyle parse_tree module to match project styleGravatar Kurtis Rader2016-05-02
| | | | | | Reduces lint errors from 163 to 52 (-68%). Line count from 2012 to 1904 (-5%). Another step in resolving issue #2902.
* restyle parse_productions module to match project styleGravatar Kurtis Rader2016-05-02
| | | | | | Reduces lint errors from 33 to 9 (-73%). Line count from 551 to 534 (-3%). Another step in resolving issue #2902.
* restyle parse_execution module to match project styleGravatar Kurtis Rader2016-05-02
| | | | | | Reduces lint errors from 184 to 84 (-54%). Line count from 2139 to 1943 (-9%). Another step in resolving issue #2902.
* restyle pager & lru module to match project styleGravatar Kurtis Rader2016-05-02
| | | | | | Reduces lint errors from 65 to 25 (-63%). Line count from 1439 to 1218 (-15%). Another step in resolving issue #2902.
* restyle output module to match project styleGravatar Kurtis Rader2016-05-01
| | | | | | Reduces lint errors from 34 to 31 (-9%). Line count from 712 to 535 (-25%). Another step in resolving issue #2902.
* restyle kill module to match project styleGravatar Kurtis Rader2016-05-01
| | | | | | Reduces lint errors from 10 to 9 (-10%). Line count from 242 to 175 (-28%). Another step in resolving issue #2902.
* restyle iothread module to match project styleGravatar Kurtis Rader2016-05-01
| | | | | | Reduces lint errors from 41 to 26 (-37%). Line count from 444 to 423 (-5%). Another step in resolving issue #2902.
* restyle io module to match project styleGravatar Kurtis Rader2016-05-01
| | | | | | Reduces lint errors from 15 to 10 (-33%). Line count from 637 to 489 (-23%). Another step in resolving issue #2902.
* restyle intern module to match project styleGravatar Kurtis Rader2016-05-01
| | | | | | Reduces lint errors from 8 to 6 (-25%). Line count from 112 to 83 (-26%). Another step in resolving issue #2902.
* restyle input_common module to match project styleGravatar Kurtis Rader2016-05-01
| | | | | | Reduces lint errors from 27 to 24 (-11%). Line count from 466 to 378 (-19%). Another step in resolving issue #2902.
* restyle input module to match project styleGravatar Kurtis Rader2016-04-30
| | | | | | Reduces lint errors from 69 to 48 (-30%). Line count from 1270 to 1044 (-18%). Another step in resolving issue #2902.
* restyle highlight module to match project styleGravatar Kurtis Rader2016-04-30
| | | | | | Reduces lint errors from 176 to 69 (-61%). Line count from 1627 to 1426 (-12%). Another step in resolving issue #2902.