Commit graph

5140 commits

Author SHA1 Message Date
Kurtis Rader
e88bfbc440 incorporate suggestion by @oranja 2016-02-04 13:39:19 -08:00
Kurtis Rader
4e465ee04c make travis-ci happy again 2016-02-04 13:38:55 -08:00
Kurtis Rader
0dac245b58 document the escape timeout 2016-01-21 20:22:25 -08:00
Kurtis Rader
11785c2bf4 make bind unit tests more robust on travis-ci
My previous commit failed in the travis-ci environment despite passing on my
local computer. This appears to be due to expect timing out looking for the
expected input. See if increasing the expect timeout slightly fixes the
problem.
2016-01-17 19:14:54 -08:00
Kurtis Rader
4b9fece9f4 allow configuring the escape delay timeout
Introduce a "fish_escape_delay_ms" variable to allow the user to configure the
delay used when seeing a bare escape before assuming no other characters will
be received that might match a bound character sequence. This is primarily
useful for vi mode so that a bare escape character (i.e., keystroke) can
switch to vi "insert" to "normal" mode in a timely fashion.
2016-01-17 17:45:30 -08:00
Kurtis Rader
6969cfab3d fix unit tests related to the escape timeout 2015-12-23 21:41:48 -08:00
Kurtis Rader
814cb51eb5 improve handling of the escape character
Increase the delay between seeing an escape character and giving up on
whether additional characters that match a key binding are seen. I'm
setting the value to 500 ms to match the readline library. We don't need
such a large window for sequences transmitted by a terminal (even over ssh
where network delays can be a problem).  However, we can't expect humans to
reliably press the escape key followed by another key with an inter-char
delay of less than ~250 ms based on my testing and research. A value of
500 ms provides a nice experience even for people using "fish_vi_mode"
bindings as a half second to switch from insert to normal mode is still
fast enough that most people won't even notice.

Resolves #1356
2015-12-22 17:58:38 -08:00
ridiculousfish
f029e04047 Update Xcode project settings 2015-12-19 18:10:45 -08:00
ridiculousfish
6aa2cbe807 Shave 4 bytes from parse_node_t
Bitfields ftw
2015-12-19 18:09:41 -08:00
ridiculousfish
ad72421b2c Don't define a function if there's an error in function's args
Fixes #2519
2015-12-19 18:03:46 -08:00
ridiculousfish
594b460ba2 Allow and/or statements to attach to the if/while header
For example:

  if false; or true; echo hello; end

will output 'hello' now.

Fixes #1428
2015-12-19 14:49:07 -08:00
ridiculousfish
0a6f62358b Write tests for new if/and/or behavior (#1428)
They fail for now.
2015-12-19 11:32:57 -08:00
ridiculousfish
8c707a4e2f Simplify parser implementation
Rather than returning a list of productions and an index,
return the relevant production directly from the rule function.

Also introduce a tag value (replacing production_idx) which tracks
information like command decorations, etc. with more clarity.
2015-12-19 11:17:13 -08:00
ridiculousfish
7188d94c1b Update osx/config.h for new ifdefs 2015-12-18 21:29:49 -08:00
Fabian Homborg
836b6bea73 git completions: Add commit hashes for show
That's probably the part where commit hashes are most used, we can add
the other subcommands later.

This generates a _lot_ of options, so hooking it up everywhere would be
unwise, though our pager helps quite nicely with filtering - typing
"Branch" will filter out the commits, and typing other things will
filter the subjects, which is quite cool.
2015-12-18 17:07:43 +01:00
Fabian Homborg
8a6f26ff9b Document prompt_pwd
Fixes #253
2015-12-17 15:25:13 +01:00
David Adam
7143512198 detect and provide fallback for backtrace_symbols_fd
Closes #2615 to fix includes on FreeBSD and provide fallback on Cygwin.
2015-12-17 20:36:33 +08:00
Fabian Homborg
5306fce16e mount completions: Support spaces in mountpoints
This turns '\040' into a space. /etc/mtab also supports other
escapes ("\\" for backslash, "\011" for tab), but I can't find
documentation for those in fstab.
2015-12-17 12:35:16 +01:00
Fabian Homborg
fb1a7d9d73 Port linux __fish_print_mounted to string
This adds a few escape sequences, but two out of the three are
theoretical and will fail a bit later.
2015-12-17 12:14:03 +01:00
Fabian Homborg
482cfca84f Make informative_git prompt use vcs_prompt -> Rename it to "Informative Vcs" 2015-12-16 19:05:28 +01:00
Fabian Homborg
e29d200ba5 Switch classic + git prompt to all vcsen -> Rename it to Classic + Vcs
Keep the variable names for now.
2015-12-16 19:05:28 +01:00
Fabian Homborg
43c7ababf9 Make lonetwin prompt use __fish_vcs_prompt 2015-12-16 19:05:28 +01:00
Fabian Homborg
baa6971a46 Add __fish_vcs_prompt helper function
This is supposed to be used by prompts so they'll get all known vcsen
integrated.

For now, there's no distinction between the different vcsen.
2015-12-16 19:05:28 +01:00
Fabian Homborg
aefe084124 Merge pull request #2607 from jakwings/doc
Improve documentations (see #354)
2015-12-16 16:35:17 +01:00
Kurtis Rader
c68f8f3418 restore the terminal modes before an "exec"
When replacing the existing fish process with a new process it is
important to restore the temrinal modes to what they were when fish
started running. We don't want any tweaks done for the benefit of fish
(e.g., disabling ICRNL mode) to bleed thru to an "exec"ed command.

Resolves #2609
2015-12-15 23:40:53 -08:00
David Adam
aa5291c6bd configure/docs: update sf.net to sourceforge.net
Closes fish-shell/fish-site#29

[ci skip]
2015-12-15 21:49:40 +08:00
Fabian Homborg
f045d9b143 Improve mount completion (now with blockdevices!)
This adds blockdevices (and directories) and fixes the regexes to no
longer include comments but include UUID= and LABEL=, which at least
util-linux mount understands.

It also shouldn't fail on systems without fstab any longer (like default OSX).

Fixes #2606.
2015-12-13 20:38:38 +01:00
Jak Wings
666dcd78ba Doc: Link Cartesian Product in tutorial to main documentaion. 2015-12-14 02:36:00 +08:00
Jak Wings
70ee7650f3 Doc: Introduce Cartesian Products on the main documentaion page. 2015-12-14 02:36:00 +08:00
Jak Wings
aa974b58bc Doc: Introduce another simple way to separate variable names from text.
This can avoid the confusion between brace expansion and the cartesian
product behavior of arrays, even if braces can help to do some hacks.
2015-12-14 02:36:00 +08:00
Fabian Homborg
6c8518dd10 Update vte cwd on launch
Fixes #2418
2015-12-12 12:22:08 +01:00
Fabian Homborg
346d918555 Delete upstreamed docker completions
A better version of these has been in an upstream release, so there's no
need to keep this around.
2015-12-12 12:13:05 +01:00
Fabian Homborg
8104854d5d Update makepkg completion
A few options were missing and --asroot has been removed
2015-12-11 12:19:30 +01:00
Tanner Bruce
b4b5c2188f Check that $XDG_RUNTIME_DIR is valid and accessible
Signed-off-by: David Adam <zanchey@ucc.gu.uwa.edu.au>
2015-12-11 15:02:36 +08:00
David Adam
a0eef2663a git completions: add missing description flags
Fixes syntax error introduced in 4280df3aa2.
2015-12-11 10:42:19 +08:00
Samantha Marshall
f5dfebb6a3 Add __fish_svn_prompt function
This refactors __fish_print_svn_rev to not depend on english locale
2015-12-10 18:17:40 +01:00
Fabian Homborg
2b7ffca414 Merge pull request #2595 from lordlycastle/master
Added OS X completions for open, and seq.
2015-12-10 15:32:18 +01:00
lordlycastle
96b3e1ce1b Added OS X completions for open, and seq. Added missing stdout redirection to /dev/null when checking command's version. 2015-12-10 14:20:46 +00:00
Fabian Homborg
ce719a700c Mention /etc/shells in README.md 2015-12-10 13:10:20 +01:00
mr.Shu
4280df3aa2 git: Add missing options to git clone
* Add missing options to `git clone` in order to make the suggestions as
  similar to the manual (https://git-scm.com/docs/git-clone) as
  possible.

Signed-off-by: mr.Shu <mr@shu.io>
2015-12-10 12:54:45 +01:00
Fabian Homborg
b73bf53bd3 Enable 24-bit mode for selected terminals
Unfortunately, there's no standard way to detect support (importantly,
terminfo doesn't encode it), but there's a variety of terminals that
support it that we can detect.

It's better than letting this functionality go to waste.

Check KONSOLE_PROFILE_NAME instead of DBUS_SESSION because Konsole can be compiled without dbus support.

Check ITERM_SESSION_ID's format for 24bit support

This has changed since the last release, just like 24bit support. So if
we check one, we get the other.
2015-12-10 12:47:45 +01:00
ridiculousfish
d90169e79b Remove a stale comment regarding fishd 2015-12-10 01:02:57 -08:00
Andy Lutomirski
fea798011b Switch show_stackframe to backtrace_symbols_fd
It's simpler and avoids calling into fprintf in contexts in which
it might crash or deadlock.
2015-12-10 01:02:57 -08:00
Andy Lutomirski
f17a71de74 Don't complain if do_builtin_io fails due to EPIPE
If stdio is dead due to EPIPE, there's no great reason to spew a stack dump.

This will still write an error to stderr if stdout dies.  This might be
undesirable, but changing that should be considered separately.
2015-12-10 01:02:57 -08:00
Fabian Homborg
0212314479 Merge pull request #2586 from mrshu/mrshu/add-git-cherry-pick-options
git: Add more options to `git cherry-pick`
2015-12-09 16:41:34 +01:00
Kurtis Rader
16c34b387f Ensure interactive tty modes are set ASAP
It is critical that we ensure our interactive tty modes are in effect at
the earliest possible moment. This achieves that goal and is harmless if
stdin is not tied to a tty. The reason for doing this is to ensure that
\r characters are not converted to \n if we're running on the slave side
of a pty controlled by a program like tmux that is stuffing keystrokes
into the pty before we issue our first prompt.
2015-12-08 21:01:31 -08:00
Kurtis Rader
d65c63322e allow \cJ (\n) to be bound separate from \cM (\r)
This makes it possible (on UNIX systems, don't know about MS Windows)
to bind \cJ (\n) independently of \cM (\r, aka [enter]).

Resolves #217
2015-12-08 21:01:31 -08:00
ridiculousfish
6943536ef3 named_color_names to reserve the right amount 2015-12-08 20:32:59 -08:00
Kurtis Rader
7322c9c591 "normal" should appear in set_color --print-colors 2015-12-08 20:08:08 -08:00
Kurtis Rader
dfaefb97ff remove "normal" from the basic color name table
The special token "normal" should not be in the basic sixteen color table
because a) it is not a color, and b) it is special cased with the result of
resetting the terminal colors (usually via a ANSI X3.64 CSI [0m sequence).
2015-12-08 20:08:08 -08:00