Commit Graph

4441 Commits

Author SHA1 Message Date
Konrad Borowski
bbce0909fe Remove dead code in history builtin. 2014-09-24 16:18:29 +02:00
lledey
73158d6255 Fix emacs completion on OS X
Avoid calling seq with 0 as argument since its behaviour is wrong on OS X.
2014-09-24 13:05:22 +01:00
ridiculousfish
0986b6d991 Ignore SIGPIPE in fishd. Fixes #1084 2014-09-24 17:51:07 +08:00
Kevin Ballard
c4a453fb22 Try to fix the Travis test failures
It seems expect prioritizes the first pattern in the list, instead of
the pattern that matches earliest in the buffer. That seems pretty
stupid, but let's try moving the prompt pattern to the end and see if
that fixes the Travis failures.
2014-09-23 23:20:02 -07:00
Kevin Ballard
1563501868 Fix missing "1 test failed" line
Also tweak colored output to reset before the newline instead of after,
so travis behaves better (for some reason reset causes travis to display
the line in black).
2014-09-23 22:50:28 -07:00
Kevin Ballard
5f82f721d2 Rejigger test suite
Split test_interactive off from test_fishscript and add a new target
test_high_level that tests both.

Add some Makefile magic so the tests can be run serially without using
sub-make, which gets rid of a little noise from the make output.

Rewrite interactive tests to look better.
2014-09-23 22:39:23 -07:00
Konrad Borowski
8d03baa4e0 Make fish config work if one of colors is undefined.
This moves the sorting to be done before sorting remaining colors.
2014-09-23 13:48:00 +02:00
Mark Griffiths
a9b7e4582f Clean up font declarations
re: fish-shell/fish-shell@2726712e01

As this is rendering ok in Firefox, this version should pickup the best
fonts for most browser/os variants based on 'font-stretch' support.

`.fish_left_bar` should be condensed, the main body font shouldn't.
2014-09-23 12:14:20 +01:00
Konrad Borowski
2726712e01 Restore DejaVu Sans Condensed font.
With font-strentch: condensed, the rendering is acceptable.
2014-09-23 12:28:08 +02:00
Mark Griffiths
8d3d51a020 lexicon_filter fix for escaped options
Fixes #1703. Also fixes short and long options markup in synopsis when
directly following a '(' or '[' character.
2014-09-23 00:24:05 -07:00
Kevin Ballard
5afd42c097 Suppress italics in keyboard shortcuts 2014-09-23 00:21:18 -07:00
Kevin Ballard
5b33e60752 Support bind SEQ to print a binding for SEQ 2014-09-22 21:30:44 -07:00
Kevin Ballard
80078491bd Fix build failure
std::vector::erase() didn't take const_iterator until C++11 >_<
2014-09-22 21:25:51 -07:00
Kevin Ballard
0a3f220572 Rework mode handling of bind
Binds with the same sequence in multiple modes was not working right.
Fix up the implementation to propagate modes everywhere as necessary.
This means that `bind` will properly list distinct binds with the same
sequence, and `bind -e` will take mode into account properly as well.
Note that `bind -e seq` now assumes the bind is in the default bind
mode, whereas before it would erase the first binding with that sequence
regardless of mode.

`bind -e -a` still erases all binds in all modes, though `bind -M mode
-e -a` still only erases all binds in the selected mode.
2014-09-22 21:04:06 -07:00
Kevin Ballard
5eee7d17f6 Fix bind -e without -k
In adding `-k` support to `bind -e` I broke the ability to use `bind -e`
without specifyign `-k`. Oops.
2014-09-22 20:56:45 -07:00
Kevin Ballard
4718636ae2 Update bind documentation
Document all the `bind` flags, including modes.

Fixes #1663.
2014-09-22 20:08:38 -07:00
Kevin Ballard
2cd7f1443c Support -k with bind -e
Also return an exit code of 1 if `bind -k` can't match the key name.
2014-09-22 19:21:08 -07:00
Kevin Ballard
7a9e2d733a Stop overriding <em> in user documentation
<em> used to represent something else, but as far as I can tell, all
uses of <em> in the documentation today actually represent text that's
supposed to be visibly different. Notably, the documentation on
supported escapes uses <em> to indicate the letters that are a
placeholder for e.g. a hex digit, as opposed to being a literal
character.
2014-09-22 14:47:01 -07:00
Kevin Ballard
4ed4b265a5 Show -M and -m flags in bind list 2014-09-22 12:37:11 -07:00
ridiculousfish
e689a38663 Remove a redundant ivar set 2014-09-22 10:24:10 -07:00
ridiculousfish
e5aa06991e Remove INTERNAL_BUFFER, which was only used by fish_pager 2014-09-22 10:16:16 -07:00
Kevin Ballard
cb40507b7b Don't suppress output for printf --help
Fixes #746.
2014-09-21 23:49:14 -07:00
ridiculousfish
7d7a636f24 Allow running executables with $ in their name.
Fixes #1686
2014-09-21 23:35:19 -07:00
ridiculousfish
2450d00693 Add wcstringutil to the OS X build for tests target 2014-09-21 23:35:19 -07:00
Kevin Ballard
a4059d3e60 Support wide characters in printf %c 2014-09-21 23:22:43 -07:00
Kevin Ballard
fe9cf673a2 Add --right-prompt flag to read
Add a flag to read to allow for setting the right prompt command in
addition to the existing support for setting the prompt command.

Fixes #1698.
2014-09-21 21:10:07 -07:00
Kevin Ballard
b480c8ce79 Allow U+F8FF to be typed
U+F8FF is the last character in the private use area, but it's also the
codepoint used for the Apple symbol (), which is typeable on US
keyboards in OS X, and so should actually work.
2014-09-21 21:03:44 -07:00
Kevin Ballard
94e535507c R_MAX should be R_CANCEL now 2014-09-21 20:54:44 -07:00
Kevin Ballard
a027566295 No need for mbstate_t to be static 2014-09-21 20:47:03 -07:00
Kevin Ballard
e1f623f548 Only print fish_greeting for interactive shells
Shell scripts that use `read` should not trigger fish_greeting.

Fixes #1401.
2014-09-21 20:35:33 -07:00
ridiculousfish
4573a4d69c Add wcstringutil to the OS X build 2014-09-21 20:24:56 -07:00
Kevin Ballard
a012aedb31 Fix incorrect error on read with 1-character input
When `read` is given a single character of input (including the
newline), it was bailing as if it had been given no input. This is
incorrect.
2014-09-21 20:00:26 -07:00
Kevin Ballard
a9c8b75599 Tweak git completion for aliases/stashes
Use the new `read -z` flag to complete git aliases better. This approach
won't break if an alias contains a newline.

Also fix stash completion, which was broken on BSD sed.
2014-09-21 19:54:42 -07:00
Kevin Ballard
c64f38f0bf Add extra logging for interactive test failures 2014-09-21 19:42:39 -07:00
Kevin Ballard
8f8c4cdd17 Implement new read --null flag
The `--null` flag to `read` makes it split incoming lines on NUL instead
of newlines. This is intended for processing the output of a command
that uses NUL separators (such as `find -print0`).

Fixes #1694.
2014-09-21 19:27:26 -07:00
Konrad Borowski
f889ad0fda Don't use DejaVu Sans Condensed for documentation rendering.
This font, at least under Kubuntu 14.04 and Firefox I use is rather
ugly. Anti-aliasing is wrong, and the spaces between letters are
rather random. It makes reading the documentation headings and table
of contents harder than it needs to be.

Those issues don't happen with DejaVu Sans.
2014-09-21 14:35:32 +02:00
Konrad Borowski
166a2f91bd Use double dashes for contains in fossil completions.
This fixes the issue with strange behaviour of fish shell when first
option of a command is an option.
2014-09-21 14:32:37 +02:00
Kevin Ballard
a069aec11d Squelch spurious set PATH errors in test 2014-09-20 00:35:51 -07:00
Kevin Ballard
8a3cf144f2 Don't include child directories of $PATH in completions
Directories are completed like commands, because of implicit cd.
However, directories found inside $PATH entries should not be completed,
as implicit cd doesn't work there. Similarly, directories should not be
completed after the `command` builtin.

Fixes #1695.
2014-09-20 00:31:33 -07:00
Kevin Ballard
a381ac2691 Complete custom git commands in $PATH
Git treats executables in $PATH that start with "git-" as custom
subcommands. Add completion support for them.

Fixes #1680.
2014-09-19 19:19:59 -07:00
Kevin Ballard
e2be71cbe4 Better git alias completion
Config entries that contained the word "alias" but were not in fact
aliases no longer are treated as aliases.
2014-09-19 19:19:59 -07:00
ridiculousfish
b8181f9eb8 Further support for term24bit. Teach output.cpp what to do with it. 2014-09-19 18:45:04 -07:00
ridiculousfish
555ff00a30 Initial work to support for term-24bit ("true color") 2014-09-19 18:45:04 -07:00
ridiculousfish
6083c6fc72 Incorporate attribute links for color themes in web_config 2014-09-19 18:44:50 -07:00
Kevin Ballard
940f264ee6 Decrement SHLVL when running exec
`exec` removes fish from the shell "stack", so SHLVL needs to be
decremented to match. This means `exec fish` will result in the same
SHLVL in the new fish instance.

Also tweak the SHLVL logic to interpret an environment SHLVL of "3foo"
as garbage instead of as the value "3".

Fixes #1693.
2014-09-19 17:38:54 -07:00
Kevin Ballard
761be8ab7f Fix intermittent crash in iothread.cpp
The wrong lock was being taken around the result queue, leading to the
occasional crash when processing interactive input. This didn't seem to
really affect normal day-to-day usage, but it did sometimes cause the
interactive tests to crash.

Fixes #1692.
2014-09-19 17:01:47 -07:00
Kevin Ballard
51c2005ea2 Tweak interactive debug output 2014-09-19 16:22:37 -07:00
Kevin Ballard
510ff6a689 Dump interactive logs on travis test failure
As far as I know we can't access the build artifacts from Travis, so we
can't check the interactive logs after a test failure. Add an
environment variable that causes the test runner to dump the logs
itself, and set that variable for Travis.
2014-09-19 14:52:02 -07:00
ridiculousfish
7229d7a326 Make redirections and pipes expand abbreviations too 2014-09-19 14:05:33 -07:00
ridiculousfish
1a7b33e8fb Expand abbreviations on semicolon per #731 2014-09-19 13:59:53 -07:00