aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* history: Add option to show timestampsHEADmasterGravatar Benjamin Barenblat2016-06-27
| | | | Closes #677.
* don't allow f-k-r to run if stdin/stdout not a ttyGravatar Kurtis Rader2016-06-26
| | | | | | | | Another developer noticed that redirecting stdin of `fish_key_reader` results in weird behavior. Which is not at all surprising. So add checks to ensure stdin and stdout are attached to a tty. Add some rudimentary unit tests for this program.
* fix fish_key_reader.cpp so it builds on linuxGravatar Kurtis Rader2016-06-26
|
* add more ways to exit fish_key_readerGravatar Kurtis Rader2016-06-26
| | | | | | | | | | A discussion on Gitter proposed allowing the user to signal their desire to exit fish_key_reader by pressing \cC or \cD twice in a row. This implements that. I also decided to refactor how signals are handled. Most notably receiving a signal will no longer print a diagnostic message unless you've enabled debugging with `-d2` (or higher level).
* Rewrite error messages for incorrect TERMGravatar David Adam2016-06-26
|
* fix setting the fish_key_reader localeGravatar Kurtis Rader2016-06-25
| | | | | | | | | | In addition to fixing the setting of the locale to C/POSIX this also corrects several problems introduced by the commits made in the past couple of days. As a consequence of dealing with all of this I decided to refactor the code to simplify one of the overly long functions I introduced in my previous change. Fixes #3168
* 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.)
* croak if gettimeofday() failsGravatar Kurtis Rader2016-06-24
| | | | | | | | | | There is no conceivable way in which timef()'s invocation of gettimeofday() can fail where it makes sense to continue running. Yes, one such, legitimate, failure mode is a 32-bit kernel and the date is greater than 2038-01-19 03:14:07. If you're running a fish binary on such a system it's time to upgrade. Otherwise, either the hardware or OS is broken. Fixes #3167.
* Style fixes.Gravatar Aaron Gyes2016-06-23
|
* history --merge to properly interleave itemsGravatar ridiculousfish2016-06-23
| | | | Fixes #2312
* fish_key_reader: ms were off by factor of ten.Gravatar Aaron Gyes2016-06-23
| | | | Improve output.
* std::isnan()Gravatar Aaron Gyes2016-06-23
|
* proc_init() doesn't need to be called.Gravatar Aaron Gyes2016-06-23
| | | | I don't know why I added that, that's how "bogosities" are born.
* Remove inadvertent change in fish_tests.cppGravatar Aaron Gyes2016-06-23
|
* Make IWYU output in lint.cpp less messyGravatar Aaron Gyes2016-06-23
| | | | And re-run IWYU, adjust #includes.
* Fix up key_readerGravatar Aaron Gyes2016-06-23
| | | | | | | | | | * Correct notice about ^C * Move time deltas to end of the line away from the important info on left. * Use timef() instead of gettimteofday() ourselves * Show time in ms (is this even useful in any unit? Maybe testing escape delays...) * Make init more similar to other apps.
* Fix crash with empty $TERMGravatar Aaron Gyes2016-06-21
| | | | | | | | ``` ~ $ set -e TERM; fish Assertion failed: (!is_missing), function c_str, file src/env.cpp, line 690. fish: 'fish' terminated by signal SIGABRT (Abort) ```
* 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
* bg had also had wrong exit code for some errorsGravatar Aaron Gyes2016-06-18
| | | | | Stop printing usage information when error isn't a usage problem. Add simple test for bg and fg
* fg: fix exit code (was 1 if success else 0)Gravatar Aaron Gyes2016-06-18
| | | | returning a C boolean for builtin_fg success was backwards
* remove unset vars from the environmentGravatar Kurtis Rader2016-06-15
| | | | | | | Remove vars from the environment that are no longer set. Simplify the code by removing an unnecessary loop. Add some tests. Fixes #3124
* trivial locale cleanupsGravatar Kurtis Rader2016-06-14
| | | | | Clarify the purpose of the `N_()` macro. Remove inconsistent capitalization of two strings in the parser module.
* 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.
* use fish_wcwidth rather than wcwidthGravatar Kurtis Rader2016-06-14
| | | | Minor cleanup related to issue #2199.
* Restyle touched .cpp filesGravatar Aaron Gyes2016-06-12
|
* Improve fish_indent -w error outputGravatar Aaron Gyes2016-06-12
| | | | Show small usage blurb, add newline to end.
* Hand-build 256, 24-bit color esc strings same wayGravatar Aaron Gyes2016-06-12
| | | | | ... using snprintf() for the 256-color function in same manner as the 24-bit function.
* Improve comments, update DoxyfileGravatar Aaron Gyes2016-06-12
| | | | Some changes were cribbed from #1317
* Fix env_universal_common.cpp filesize comparisons.Gravatar Aaron Gyes2016-06-12
| | | | | | | | * if (result == ULLONG_MAX) is always false, likely a typo as result is unsigned long, and the comment says ULONG_MAX. * use off_t instead of size_t for file size where it can mismatch st_size's type in stat.h
* Don't allow specifying an fd with a caret redirectionGravatar ridiculousfish2016-06-12
| | | | | | | | For example, an argument 12345^ is a real argument, not a redirection There's no reason to use ^ here instead of >, and it's annoying to git users. Fixes #1873
* 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.
* don't print header for each jobGravatar Corey Ford2016-06-08
|
* Merge pull request #3118 from floam/headerdoc-fixesGravatar Aaron Gyes2016-06-05
|\ | | | | | | | | | | | | Update Xcode project, HeaderDoc comments. Fix various invalid HeaderDoc comments. Normalize autoload.cpp/autoload.h as an example of something closer to "proper" HeaderDoc formatting. Have clang/Xcode validate HeaderDoc comments. Remove key_reader.cpp from Xcode project.
| * Be a bit more consistent and proper.Gravatar Aaron Gyes2016-06-05
| |
| * These autoload comment should be HeaderDoc comments.Gravatar Aaron Gyes2016-06-05
| |
| * Repair various invalid HeaderDoc comments.Gravatar Aaron Gyes2016-06-05
| | | | | | | | | | Enable build setting to allow Xcode to complain about invalid comments.
* | remove dependency on dcgettext()Gravatar Kurtis Rader2016-06-05
| | | | | | | | | | While fixing issue #3110 I noticed there is exactly one place we use dcgettext() and that use is completely unnecessary. So remove it.
* | 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
* put curses/terminfo vars into the environmentGravatar Kurtis Rader2016-06-03
| | | | | | | | | | | | | We need to actually export the curses/terminfo env vars in order for `setupterm()` to be able to use them. While fixing this I reworked the fallback logic implemented by @zanchey in response to issue #1060 in order to simplify the logic and clarify the error messages. This does not allow someone to change the curses/terminfo env vars after the first prompt is displayed (you can but it won't affect the current fish process). It only makes it possible to set `TERM`, `TERMINFO`, and `TERMINFO_DIRS` in *config.fish* or similar config file and have them be honored by fish.
* Don't insert prefix for non-prefix matchesGravatar Fabian Homborg2016-06-02
| | | | | | | | | | | | | | | | | | The issue here is that when inserting a common prefix for e.g. a substring match, we increase the amount of available candidates again to things the user didn't want. An example is in share/functions - a completion for "inter" would previously expand to "__fish_" because it matched: - __fish_config_interactive.fish - __fish_print_interfaces.fish - __fish_print_lpr_printers.fish The completion afterwards would then show 189 possible matches, only three of which (the above) actually matched the original "inter". Fixes #3089.
* mention nullglob exceptions in failglob error msgGravatar Beni Cherniavsky-Paskin2016-06-02
|
* fix lint error in wgettext()Gravatar Kurtis Rader2016-06-01
| | | | | | | | | | | | | | | | Cppcheck was complaining about the `return val.c_str()` at the end of the `wgettext()` function. That would normally a bug since the lifetime of `val` ends when the function returns. In this particular case that's not true because the string is interned in a cache. Nonetheless, rather than suppress the lint warning I decided to modify the API to be more idiomatic. In the process of fixing the aforementioned lint warning I fixed several other lint errors in that module. This required making our copy of `wgetopt()` compatible with the rest of the fish code. Specifically, by removing its local definitions of the "_" macro so it uses the same macro used everywhere else in the fish code. The sooner we kill the use of wide chars the better.
* Make string match -rnv workGravatar Fabian Homborg2016-05-31
| | | | Fixes #3098.
* simplify some fish_tests codeGravatar Kurtis Rader2016-05-30
| | | | | This came to my attention because cppcheck was warning about possibly dereferncing a NULL pointer.
* fix random lint issuesGravatar Kurtis Rader2016-05-29
| | | | | | | | This only eliminates errors reported by `make lint`. It shouldn't cause any functional changes. This change does remove several functions that are unused. It also removes the `desc_arr` variable which is both unused and out of date with reality.
* Allow suggestion when selecting in pagerGravatar Fabian Homborg2016-05-27
| | | | Also mentioned in #3016.
* Allow autosuggestion after completionGravatar Fabian Homborg2016-05-27
| | | | | | | | | It seems kinda silly to not directly do it, but it was explicitly stopped in the code. I'm quite good at deleting that, aren't I? Fixes #3016.
* fix some style bogosities that crept inGravatar Kurtis Rader2016-05-27
|