Commit Graph

831 Commits

Author SHA1 Message Date
Fabian Homborg
f20b6a1e8f [math] Document scientific notation 2018-03-01 13:09:35 +01:00
Fabian Homborg
234ebb5d7b [math] Fix docs
We no longer use muparser, but tinyexpr.

tinyexpr does not have:

- "Statistical functions" like min, max, avg

- Multiple expressions separated with ","

[ci skip]
2018-03-01 13:09:35 +01:00
ridiculousfish
5282d3e711 Add fish_emoji_width variable to control computed emoji width
This is part of an effort to improve fish's Unicode handling. This commit
attempts to grapple with the fact that, certain characters (principally
emoji) were considered to have a wcwidth of 1 in Unicode 8, but a width of
2 in Unicode 9.

The system wcwidth() here cannot be trusted; terminal emulators do not
respect it. iTerm2 even allows this to be set in preferences.

This commit introduces a new function is_width_2_in_Uni9_but_1_in_Uni8() to
detect characters of version-ambiguous width. For these characters, it
returns a width guessed based on the value of TERM_PROGRAM and
TERM_VERSION, defaulting to 1. This value can be overridden by setting the
value of a new variable fish_emoji_width (presumably either to 1 or 2).

Fixes #4539, #2652.
2018-02-25 23:38:10 -08:00
Steely Wing
e9a4875a6b Remove the duplicate "(" (#4748) 2018-02-23 18:19:19 +01:00
Fabian Homborg
304d9da6a0 Document fish_exit event 2018-02-19 20:21:02 +01:00
Fabian Homborg
a04a6d116e [docs] PLURALIZE
My last commit for the day.
2018-02-07 01:12:30 +01:00
Fabian Homborg
59a90fc543 [docs] Reword test example
That was a bit too stuffy.

[ci skip]
2018-02-07 01:12:01 +01:00
Fabian Homborg
50bec2c32e [docs] Add test example to tutorial
As stated in
https://stackoverflow.com/questions/48653771/fishshell-checking-equvalancy-like-does-in-most-languages,
we didn't have one of those, and `test` is a relatively important part
of plenty of `if`s.
2018-02-07 01:09:33 +01:00
Fabian Homborg
634feac600 [docs] Remove mention of cached variables from math
The variable cache was removed in
95162ef19d, so this is now wrong.
2018-02-04 23:26:21 +01:00
ogaclejapan
64c8d4c265 Fix typo that invalid options in argparse 2018-01-31 16:45:19 +11:00
ridiculousfish
d0d7bb75cd Add new pager-toggle-search input function
This adds a new input binding pager-toggle-search which toggles the
search field on and off when the pager is showing.
2018-01-30 09:58:08 -08:00
Thom Chiovoloni
7b88187310 Add ability to autosave functions at the end of funced 2018-01-18 18:03:52 +01:00
Thom Chiovoloni
7dae40a240 Revert "Work around OS X issue with dropped #fragment in launched URLs"
This reverts commit 80b658e247.
2018-01-16 18:38:20 +01:00
Fabian Homborg
aa58cae601 Don't count successive "," as literal in brace expansion
This was highly surprising.

Fixes #3002.
2018-01-07 15:00:44 +01:00
Fabian Homborg
55ebf4430f Make literal "{}" expand to itself
This caused major annoyances with e.g. `find -exec`, and it's utterly
useless - "{}" expands to nothing, so why have it at all?

Fixes #1109.
2018-01-07 15:00:44 +01:00
ridiculousfish
69f066dc1b Correct end tag
A code block was not properly closed, causing bad graphical artifacts
in the tutorial. Correct it.
2017-12-29 12:44:09 -08:00
ridiculousfish
7db5d573c2 Document fish_color_selection
Fixes #4544
2017-12-22 12:41:35 -08:00
Mahmoud Al-Qudsi
ae700c8707
Merge pull request #4581 from mqudsi/help_section_workaround
Work around OS X issue with dropped #fragment in launched URLs
2017-12-07 18:59:16 -06:00
h4rvey r0ss
109cc1c4d8 deleted -l parameter 2017-11-30 15:58:20 +01:00
David Adam
f5209deacc cmake: update CheckIncludeFiles to enable C++ checks 2017-11-17 16:21:56 +08:00
ridiculousfish
1014995159 Add documentation for wait command 2017-11-16 11:28:32 -08:00
Jannis
45fc499a91 Make h1 distinguishable from h2 (#4522) 2017-11-07 00:55:20 -08:00
Michihito Shigemura
d769b2ac40 Fix typo in tutorial 2017-11-06 18:48:57 +01:00
Michihito Shigemura
2ba6dc8893 Fix typo in string 2017-11-06 18:48:31 +01:00
Michihito Shigemura
c5241360af Fix typo in history 2017-11-06 18:48:16 +01:00
Michihito Shigemura
f0503c84dc Improve document in FORMATTING
Update links
Fix typo
2017-11-06 18:46:57 +01:00
Michihito Shigemura
f0ce62c873 Fix typo in abbr 2017-11-03 14:09:22 +01:00
Michihito Shigemura
4a4fd7e75b Fix typo in faq 2017-11-03 14:08:48 +01:00
Michihito Shigemura
efdc62fa80 Fix typo in argparse 2017-11-03 14:08:24 +01:00
David Adam
9adb3492f9 docs: fish_history can be set to the empty string 2017-10-31 18:26:31 +08:00
David Adam
b34b0cf1e3 Restore previous output of status current-{filename,function}
Closes #4499.

Partial reversion of 30368d5526.
2017-10-31 18:10:46 +08:00
David Adam
7fe7582329 docs: move fish_history entry to correct section and reword 2017-10-31 17:53:16 +08:00
Mahmoud Al-Qudsi
80b658e247 Work around OS X issue with dropped #fragment in launched URLs
The previous hack used to work around an OS X issue/bug where launching
a URL with a #fragment appended would drop the fragment by using
`osascript` does not seem to work any more. Append the section name as a
query string (in addition to, not instead of #section) and then use some
basic javascript appended to the user doc HTML template to parse that
and jump to the correct section (if the section was dropped).

Closes #4480
2017-10-18 12:11:20 -05:00
Aaron Gyes
a9283803d4 Revert "Non-exported vars: rename SHLVL to shlvl"
Duh, of course it is exported.

This reverts commit 5fc17dcc82.
2017-10-15 04:37:34 -07:00
Aaron Gyes
5fc17dcc82 Non-exported vars: rename SHLVL to shlvl
Fixes #4414
2017-10-15 04:33:27 -07:00
Aaron Gyes
0c1984eb6c Fix a grammer mistake in docs 2017-10-14 13:17:59 -07:00
Aaron Gyes
fb8ae04f80 Rename $FISH_VERSION back to the original $version.
Order is restored in the universe. Fixes #4414
2017-10-14 08:33:02 -07:00
Aaron Gyes
7be8a1707c Rename FISH_READ_BYTE_LIMIT to fish_read_limit
Fixes #4414
2017-10-14 08:33:02 -07:00
Aaron Gyes
18b06f3768 Rename CMD_DURATION to cmd_duration
Fixes #4414
2017-10-14 08:33:02 -07:00
Mahmoud Al-Qudsi
4780b28a93 Updated read docs to include new stdout behavior 2017-10-10 08:23:24 +02:00
Amitava Bhattacharyya
48797974d3 Remove extraneous reference in FAQ (#4459)
"Use the fish_update_completions command.", the answer to "How do I update man page completions?", was also found at the end of the answer to "How do I get the exit status of a command?"
2017-10-09 22:06:56 -07:00
Mahmoud Al-Qudsi
ff66d2f3c1 Add more test examples, including expression negation
Closes #4383
2017-10-08 02:06:48 +02:00
Mahmoud Al-Qudsi
f18b6868b7 Include --quiet in command builtin summary 2017-10-04 12:02:52 +02:00
Mahmoud Al-Qudsi
811beb9dcc Document new -s/--silent bind switch 2017-10-03 11:20:17 +02:00
David Adam
472e186c2b Rename FISH_HISTORY to fish_history
Work on #4414.
2017-09-24 14:07:45 +08:00
Ed Brannin
9ac7da28bd Fix smurf_color variable name 2017-09-16 07:02:34 +08:00
Kurtis Rader
ee1d310651 Implement history search --reverse (#4375)
* Implement `history search --reverse`

It should be possible to have `history search` output ordered oldest to
newest like nearly every other shell including bash, ksh, zsh, and csh.
We can't make this the default because too many people expect the
current behavior. This simply makes it possible for people to define
their own abbreviations or functions that provide behavior they are
likely used to if they are transitioning to fish from another shell.

This also fixes a bug in the `history` function with respect to how it
handles the `-n` / `--max` flag.

Fixes #4354

* Fix comment for format_history_record()
2017-09-14 15:44:17 -07:00
Kurtis Rader
905766fca2 Hoist for loop control var to enclosing scope (#4376)
* Hoist `for` loop control var to enclosing scope

It should be possible to reference the last value assigned to a `for`
loop control var when the loop terminates. This makes it easier to detect
if we broke out of the loop among other things.  This change makes fish
`for` loops behave like most other shells.

Fixes #1935

* Remove redundant line
2017-09-08 21:14:26 -07:00
Fabian Homborg
9347951158 Clarify string match without -r partial match
Fixes #4388.
2017-09-08 16:33:34 +02:00
David Adam
91a0ba9be5 Revert part of "Revert "Cache math expressions""
56d9134534 contained an LRU cache plus
changes to the documentation; 95162ef19d
reverted both.

This commit re-adds the documentation changes, which are still correct.
2017-09-01 21:55:50 +08:00