Commit graph

5981 commits

Author SHA1 Message Date
Aaron Gyes
f966248f16 string.fish: use if/else. Reindent. 2016-07-02 11:40:22 -07:00
Aaron Gyes
e597df70d7 Check if fish -c string will work first. 2016-07-02 11:05:04 -07:00
Aaron Gyes
c79e9c7d4e Lossless recompress of images with pngcrush+zopfli
And tweak RTF.
2016-07-01 14:58:56 -07:00
Aaron Gyes
75e7784f18 Fix env_universal_common.cpp filesize comparisons.
* use off_t instead of size_t for file size where it can mismatch
  st_size's type in stat.h (cherry-pick merge omitted this)
2016-07-01 14:16:42 -07:00
Aaron Gyes
8e7f0e781d Completion for string match --invert
Also adds descriptions for some other options which were absent.
2016-07-01 13:44:14 -07:00
Aaron Gyes
528b9fdcf2 Fix env_universal_common.cpp filesize comparisons.
* 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
2016-07-01 13:43:52 -07:00
Aaron Gyes
edee3e5eb2 Use fonts found on terminals for the web config.
Instead of just using Courier New across the board, have the
browser try several likely available fonts before defaulting
to the system's "monospace".

Thanks @MarkGriffiths
Fixes #2924
2016-07-01 13:41:06 -07:00
Aaron Gyes
c9caee37b4 Fix fish_indent leaving colors set/messing up type
After the colorized syntax output in type -a foo, "foo is /usr/..."
would also be colored. (or 'test' in fish_indent foo.fish; echo test).

Make fish_indent reset the color when it's done.
2016-07-01 06:45:16 -07:00
Aaron Gyes
bc693bd4e0 fish_indent type -a's function output and colorize
Doesn't colorize if output is redirected.
This is "fun" and indenting happens to make most of the included
functions display more narrow and fit better into a terminal window.
2016-07-01 06:45:03 -07:00
Aaron Gyes
dff384e42d Fix fish_indent leaving colors set/messing up type
After the colorized syntax output in type -a foo, "foo is /usr/..."
would also be colored. (or 'test' in fish_indent foo.fish; echo test).

Make fish_indent reset the color when it's done.
2016-07-01 06:22:23 -07:00
Aaron Gyes
cd422e5d78 fish_indent type -a's function output and colorize
Doesn't colorize if output is redirected.
This is "fun" and indenting happens to make most of the included
functions display more narrow and fit better into a terminal window.
2016-07-01 06:01:37 -07:00
Aaron Gyes
ca6cda20a3 Fix fish_config in .app
* Export $__fish_bin_dir
* Fix incorrect bundle path in fish.cpp - fish is not in MacOS/ (it should be!)
2016-07-01 04:43:57 -07:00
Aaron Gyes
3d8e8a8715 Fix when fish isn't already installed
This was still wrong.
2016-07-01 04:34:04 -07:00
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