Commit Graph

5350 Commits

Author SHA1 Message Date
ridiculousfish
1363c7468d "Stop" should be "stomp" in fish.cpp comment 2015-12-29 16:39:28 -08:00
Fabian Homborg
834ebef53c Simplify greeting
We have already confirmed we're interactive, and `echo` is a builtin now.
2015-12-29 15:58:48 +01:00
Botond Erdos
bb932a0a0a adds dnf completions for package installs
Since dnf accepts the same arguments as yum, just inherit.
2015-12-29 14:48:09 +01:00
lordlycastle
f23c2beb61 Fixed kill-signals completion. Added completions for OS X kill command.
Don't generate killall completions when running on Solaris OS - `killall` there literally kills all processes.
2015-12-28 12:54:13 +01:00
ridiculousfish
994aba075d Remove some extra newlines from function error messages 2015-12-27 15:55:49 -08:00
Kurtis Rader
979b94e274 only swith to shell tty mode if interactive
My PR #2578 had the unexpected side-effect of altering the tty modes of
commands run via "fish -c command" or "fish scriptname". This change fixes
that; albeit incompletely. The correct solution is to unconditionally set
shell tty modes if stdin is attached to a tty and restore the appropriate
modes whenever an external command is run -- regardless of the path used to
run the external command. The proper fix should be done as part of addressing
issues #2315 and #1041.

Resolves issue #2619
2015-12-27 12:28:19 -08:00
ffdd
076ebf8cee Remove phone number. 2015-12-26 01:48:09 -05:00
Jannik V
6eea3992b3 Mention correct config file
While the tutorial explains how to set the `PATH` variable, it mentions the file `fish.config` but it should be `config.fish`.
2015-12-24 11:19:23 +01:00
Kurtis Rader
6969cfab3d fix unit tests related to the escape timeout 2015-12-23 21:41:48 -08:00
Bogdan Sinitsyn
1a3bcf63bc Add database completion for pacman 2015-12-23 20:33:57 +01: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
Tobias Mühl
d6d3977f3d Update README.md
I also needed the autoconf package on my system, so adding it to the general template
2015-12-21 20:36:23 -08:00
Satender Singh Rathore
c9ddad94a9 double quote instead of single quote 2015-12-21 20:32:43 -08:00
ridiculousfish
172f1e1b5f getopt long_options to be const 2015-12-21 20:32:05 -08:00
Kurtis Rader
b257e79a07 simplify fish_parse_opt
While investigating issue #2619 my first thought was that the problem
had something to do with the "is_interactive_session" global variable.
That preliminary conclusion appears to be wrong (i.e., the problem
lies elsewhere). However, that hypothesis caused me to look at function
"fish_parse_opt" and other mentions of "is_interactive_session".

I decided to take the opportunity to simplify and improve the style of
"fish_parse_opt" since I just spent an hour reviewing the code that
references "is_interactive_session". For example, the "has_cmd" variable
isn't really needed. And there is inconsistent whitespace not to mention
confusion about bool's versus int's and zero versus NULL.
2015-12-21 20:07:18 -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