Commit Graph

5968 Commits

Author SHA1 Message Date
Aaron Gyes
af0f9e5308 Mispelling - surprised it didn't care. 2016-07-01 04:27:24 -07:00
Aaron Gyes
88cb616c1b xcode: leave out share/doc 2016-07-01 04:22:03 -07:00
Aaron Gyes
63120a9962 Fix fish_config in .app
* Copy docs into Resrouces
* Export $__fish_bin_dir
* Fix incorrect path in fish.cpp - fish is not in MacOS (it should be!)
2016-07-01 03:57:16 -07:00
Aaron Gyes
807dc82a75 Rename things to avoid conflicts in headers
Was breaking builds

 * ncurses.h: can declare `char *const key_name'.
 * netbsd term.h: has `newline', `lines' macros.
2016-07-01 03:57:16 -07:00
Aaron Gyes
1fb4cc0e76 Fix history.cpp merge 2016-07-01 03:26:22 -07:00
Aaron Gyes
6a36144587 Rename things to avoid conflicts with headers
Was breaking builds

 * ncurses.h: can declare `char *const key_name'.
 * netbsd term.h: has `newline', `lines' macros.
2016-07-01 03:11:31 -07:00
Aaron Gyes
0045b46af8 Rename things to avoid conflicts with headers
Was breaking builds

 * ncurses.h: can declare `char *const key_name'.
 * netbsd term.h: has `newline', `lines' macros.
2016-07-01 02:48:50 -07:00
Aaron Gyes
47fbfdca3e Add note about the zombie process 2016-07-01 02:21:13 -07:00
Aaron Gyes
772e35562a suspend output after '\n' not printing before kill 2016-07-01 01:53:43 -07:00
Aaron Gyes
e42f593553 show 'fg' usage for suspend if not forcing 2016-07-01 01:27:03 -07:00
Aaron Gyes
9642fcb589 Update suspend docs. When used, show how to resume
Fixes #3154
2016-07-01 01:18:07 -07:00
Aaron Gyes
7e58a3982a string escape some eval calls 2016-07-01 00:08:46 -07:00
Aaron Gyes
431589a16a Use fish -c string ... as the string fallback.
We can again drop the prompt_pwd check.
2016-07-01 00:00:53 -07:00
Kurtis Rader
cbee315b1b fix the history function and man page
The previous commit to add a `--with-timestamp` flag to the `history` command
caused me to notice the history function didn't recognize the new long option.
Neither did it recognize the short options for the builtin command. This
change fixes both of those issues.
2016-06-30 22:01:59 -07:00
Aaron Gyes
84b08a4fe3 Merge branch 'Integration_2.3.1' of https://github.com/fish-shell/fish-shell into Integration_2.3.1 2016-06-30 21:30:46 -07:00
Kurtis Rader
c429a585e4 backport the latest fish_key_reader from master
This includes the improvements to `fish_key_reader` as of commit
68e167d576 on the master branch. This makes
the program much friendlier to users.
2016-06-30 21:21:10 -07:00
Kurtis Rader
68e167d576 f-k-r should use the user's locale
I did some research and experiments. For good or bad the `bind` command
requires the use of wide char codepoints (e.g., \u1234) for non-ASCII
chars.  So don't force the use of the POSIX locale, but do provide it as
an option for people who want to see the individual bytes rather than a
decoded wide char.

Simplify the format of the information displayed for each character. There
really isn't much point in providing decimal, octal, and hexadecimal. Just
print hex and symbolic representations.

Add an example `bind` command that a user can copy/paste.

Closes #3183
2016-06-30 20:49:56 -07:00
Kurtis Rader
262452d0b1 fix stupid copy/paste comment error from prev commit
When I fixed handling the TZ env var in commit dda890c I introduced a couple
of silly copy/paste comment errors. This corrects those comments.
2016-06-28 21:25:25 -07:00
Benjamin Barenblat
7e08679f1b history: Add option to show timestamps
Closes #677.
2016-06-28 19:46:54 -07:00
Kurtis Rader
dda890cf88 reset timezone state when TZ env var changes
When the TZ env var is modified change fish's internal timezone state.

Fixes #3181.
2016-06-28 18:06:39 -07:00
Aaron Gyes
44cde9e0e9 fish_key_reader #includes need to be updated 2016-06-28 02:57:14 -07:00
Kurtis Rader
d7bc20c933 don't allow f-k-r to run if stdin/stdout not a tty
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.
2016-06-26 21:51:00 -07:00
Aaron Gyes
d69a68e265 Comment fixes. 2016-06-26 21:14:45 -07:00
Aaron Gyes
534c1287ca Add back prompt_pwd to solve empty output problem
..by not manipulating path at all if we do not have
the tools to do so.

Tag changes with better comments.
2016-06-26 20:54:04 -07:00
Aaron Gyes
81dee16d69 Add back prompt_pwd to solve empty output problem
..by not manipulating path at all if we do not have
the tools to do so.

Tag changes with better comments.
2016-06-26 20:25:11 -07:00
Kurtis Rader
e5011fbcdf fix fish_key_reader.cpp so it builds on linux 2016-06-26 17:38:19 -07:00
Kurtis Rader
0f5bfeead2 add more ways to exit fish_key_reader
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).
2016-06-26 17:12:03 -07:00
David Adam
a47b4b0e95 Rewrite error messages for incorrect TERM
(cherry picked from commit 0f3b4d2bd8)
2016-06-27 07:42:57 +08:00
Aaron Gyes
02f578a82d echo the no-string errors to stderr and return 1.
Fix output on launch

Drop __fish_urlencode.fish

Drop prompt_pwd.fish
2016-06-26 16:25:41 -07:00
Aaron Gyes
dfb4998778 Work around absent `string' in old fishies upgrading.
Improves experience during upgrades, accidentally running
an old fish with a new environment. No errors just from
printing a prompt. Fixes #3057.

Print helpful notice also when launching mismatched fish.

Autoloadable string.fish -- only create function if not builtin.
2016-06-26 16:25:41 -07:00
Fabian Homborg
ea71f0b610 Reword variable expansion docs 2016-06-26 11:36:31 +02:00
Fabian Homborg
a3e9e179eb Document fish_mode_prompt 2016-06-26 11:36:31 +02:00
David Adam
0f3b4d2bd8 Rewrite error messages for incorrect TERM 2016-06-26 16:24:01 +08:00
David Adam
ceee1ebfd9 update osx/config.h to match current configure output 2016-06-26 13:33:22 +08:00
Kurtis Rader
046174397b fix setting the fish_key_reader locale
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
2016-06-25 19:55:49 -07:00
Aaron Gyes
a6ec2dc3ed Remove oopsies while pasting.
(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.)
2016-06-25 01:10:58 -07:00
Aaron Gyes
6ec83568b5 Check for "Windows-3.4.0" as per MS's suggestion.
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.)
2016-06-25 00:31:46 -07:00
Kurtis Rader
b2a2705df4 croak if gettimeofday() fails
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.
2016-06-24 19:32:46 -07:00
Aaron Gyes
0d6bdb38e6 Style fixes. 2016-06-23 22:48:45 -07:00
ridiculousfish
02cef2da23 history --merge to properly interleave items
Fixes #2312
2016-06-23 22:03:07 -07:00
Aaron Gyes
9c53019d95 fish_key_reader: ms were off by factor of ten.
Improve output.
2016-06-23 21:10:31 -07:00
Aaron Gyes
7a4065eb9f std::isnan() 2016-06-23 20:20:49 -07:00
Aaron Gyes
13eb302f3c proc_init() doesn't need to be called.
I don't know why I added that, that's how "bogosities" are born.
2016-06-23 18:28:49 -07:00
Aaron Gyes
6122ae83a6 Remove inadvertent change in fish_tests.cpp 2016-06-23 17:36:20 -07:00
Aaron Gyes
fa78a7101c Make IWYU output in lint.cpp less messy
And re-run IWYU, adjust #includes.
2016-06-23 17:26:08 -07:00
bgeron-g
5d680f6dbc Fix typo 2016-06-23 18:23:10 +02:00
Aaron Gyes
290e936322 Fix up key_reader
* 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.
2016-06-23 07:43:55 -07:00
Aaron Gyes
ecf4517ffe Fix crash with empty $TERM
```
~ $ set -e TERM; fish
Assertion failed: (!is_missing), function c_str, file src/env.cpp, line 690.
fish: 'fish' terminated by signal SIGABRT (Abort)
```
2016-06-21 16:21:15 -07:00
Kurtis Rader
eb834f47ef put curses/terminfo vars into the environment
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.
2016-06-21 16:18:45 -07:00
Aaron Gyes
db2c128b24 Fix crash with empty $TERM
```
~ $ set -e TERM; fish
Assertion failed: (!is_missing), function c_str, file src/env.cpp, line 690.
fish: 'fish' terminated by signal SIGABRT (Abort)
```
2016-06-21 10:30:53 -07:00