Commit graph

3485 commits

Author SHA1 Message Date
ridiculousfish
383b6aabf5 Improve error reporting in new parser. Tests now pass. 2013-12-08 22:29:02 -08:00
ridiculousfish
7a3f5afee7 Initial work towars improved error reporting. Tests currently fail. 2013-12-08 21:54:06 -08:00
ridiculousfish
5769fa6aed Fix for off-by-one error in tokenizer error message reporting 2013-12-08 18:16:55 -08:00
ridiculousfish
925fe65dd8 Remove the indentation part of parser_t::test(). Rename it to
detect_errors().
2013-12-08 16:25:07 -08:00
ridiculousfish
67b1f14a6f Better support for parse errors in indenting 2013-12-08 14:13:23 -08:00
ridiculousfish
dd0cc5ed9f Rewriting indenting functionality to use new parser 2013-12-08 13:41:12 -08:00
ridiculousfish
a23441109d Merge branch 'master' into ast
Conflicts:
	complete.cpp
	fish_tests.cpp
	highlight.cpp
2013-12-07 12:54:43 -08:00
David Adam
2efc0bad1c add correct version number to manpage output 2013-12-01 12:37:29 +08:00
David Adam
3978de2cde autoconf build: clean up Makefile, remove fish.spec
Removes some unused variables and out-of-date references.
Wraps some tests in quotes to avoid expansion errors.
Removes the fish.spec generated file as it is out of date and is
arguably better maintained by downstream packagers.
See http://github.com/zanchey/fish-build/ for a better RPM spec file.
2013-12-01 12:37:29 +08:00
ridiculousfish
263f919beb Replace autosuggestions "completions to load" mechanism with moderately
less hackish and far simpler "perform on main thread" mechanism
2013-11-29 23:44:26 -08:00
ridiculousfish
4aaa9e7d9f Allow autosuggestions to do job expansion. Fixes
https://github.com/fish-shell/fish-shell/issues/1152
2013-11-29 13:34:03 -08:00
Konrad Borowski
e1608362d0 Fix s/$remote// mistake.
$remote could have contained /.
2013-11-29 15:26:33 +01:00
ridiculousfish
9f986d8a86 Implemented iothread_perform_on_main() to support background threads
scheduling work on main thread
2013-11-27 16:04:30 -08:00
Konrad Borowski
e0b78f7f2a Disallow Unicode conversion specifications.
This stops fish from accessing the `bool ok[UCHAR_MAX + 1]` table
beyond allocated space potentially accessing memory that doesn't
belong to fish, and crashing.
2013-11-27 21:16:34 +01:00
Konrad Borowski
1eb09f3eb2 Fix compilation failures under Intel C compiler.
It appears that Intel C compiler doesn't recognize unsigned wchar_t,
however it doesn't appear to be important (the conversion function is
unused, and in other cases it doesn't appear to be needed).
2013-11-27 21:10:28 +01:00
Shane Xu
0e7790df8c add port information 2013-11-27 23:39:52 +08:00
Konrad Borowski
591abd340b Fix bold in informative git prompt.
Currently this fix is useless, as web config cannot apply variables,
but in future, it could be more useful.
2013-11-27 11:41:13 +01:00
Jelte Fennema
44d13869ad Add eselect, rc-update and rc-service completions. (These are utilities used by Gentoo Linux)
Disable php completion for the 4th part of the command, since php-eselect is differently designed and causes errors

Closes #1131.
2013-11-27 18:36:05 +08:00
Konrad Borowski
9862eb930d Use sed instead of sh for Informative Git Prompt.
Informative Git Prompt assumes that sh is bash compatible, but that's
not the case for FreeBSD. Fixes #1140.
2013-11-27 11:35:01 +01:00
David Adam
0c4dab54f1 __fish_complete_man: Use awk to parse output of apropos
Closes #960.

Uses pattern matching rather than OS detection. Works with BSD awk, GNU
awk and Solaris' nawk.
2013-11-27 17:58:43 +08:00
ridiculousfish
84483b4aac Fix for process expansion off the main thread in syntax highlighting
(#1143)
2013-11-26 23:56:47 -08:00
ridiculousfish
9f5547327e Fix for compile error identified in
https://github.com/fish-shell/fish-shell/issues/1142
2013-11-26 23:18:12 -08:00
ridiculousfish
b04fc5a39e Add missing const cast for setup_term
https://github.com/fish-shell/fish-shell/issues/1142
2013-11-26 10:56:43 -08:00
ridiculousfish
5121417725 Fix for annoying error message when converting out of range escape
https://github.com/fish-shell/fish-shell/issues/1107
2013-11-26 10:52:32 -08:00
David Adam
2c39d5b6c0 fall back to ANSI terminal type if setupterm fails
Closes: https://github.com/fish-shell/fish-shell/issues/1060

'ansi' should always be present (tested on Solaris, Linux, FreeBSD,
Darwin).

Also overrides TERM so that other programs behave consistently e.g.
fish_pager.

The error message makes no specific mention of terminfo or termcap as
these vary across operating systems.

(r+ @ridiculousfish with thanks)
2013-11-26 21:56:49 +08:00
David Adam
8d1667e9e8 more detailed debugging when terminal type cannot be found
Ref: #1060
2013-11-26 21:56:49 +08:00
ridiculousfish
5b3397359f Fix support for backslash-newline in double quotes in unescape functions. Makes tests pass
again.
2013-11-26 01:39:16 -08:00
d10n
ded64758d5 Fix wide character wrapping.
The intention of the block removed appears to be to indent wrapped lines to the column the line started at. What actually happens is that all wrapped lines wrap to column 0.
After adding the sticky short prompt feature, the block removed caused a bug with wrapping wide characters in addition to not appearing to change anything else.
Wide characters would change between wrapping to column 0 and the column the command started at, depending on what column the wide character was at before wrapping.

I am keeping the existing behavior rather than restoring the block's original intention. If the original intention should be restored, it should be on a different branch.
2013-11-26 00:51:02 -08:00
d10n
2813dcc6cc On short prompts, commands wider than the terminal do not reposition to start on their own lines. 2013-11-26 00:51:02 -08:00
Misty De Meo
0a54558ee2 Update brew completion with new options 2013-11-26 00:45:13 -08:00
d10n
168d25e780 Do not open CLI browsers when using fish_config.
From the Python webbrowser documentation:
"If text-mode browsers are used, the calling process will block until the user exits the browser."

Running fish_config on an ssh server with no GUI browser will open a CLI browser which blocks and stops the server from handling requests.
Using multiprocess to run the server in the background lets CLI browsers access the page, but the page is unusable.

For now, disable CLI browsers and recommend opening the page in a graphical browser.
In the future, maybe write a CLI utility to change prompts and delete history items.
2013-11-26 00:41:09 -08:00
ridiculousfish
63a15e232b Fix indentation in __fish_complete_cd 2013-11-26 00:07:18 -08:00
Jörg Thalheim
cb86b8f8fc cd completion: handle not accessible directories 2013-11-26 00:04:31 -08:00
ridiculousfish
f2211ff3ad Update some tests 2013-11-26 00:01:23 -08:00
Konrad Borowski
312977d5a6 Fix %lu for size_t in fish_tests.cpp 2013-11-25 16:15:36 +01:00
Konrad Borowski
3eac5f9ab7 Fix io_buffer_t::print to take unsigned long argument. 2013-11-25 16:10:14 +01:00
Konrad Borowski
fcb3f36065 Ensure the loop in offset_of_next_item_fish_2_0 is executed.
This ensures that timestamp will be initialized.
2013-11-25 16:07:17 +01:00
Konrad Borowski
ac7a461070 Cast size_t to unsigned long.
printf expects unsigned long (%lu) argument, however, size_t doesn't
have to be declared as such. As %zu is C99 (but not C++), it shouldn't
be used directly. Instead, I have to cast value to the correct type.
2013-11-25 15:56:08 +01:00
ridiculousfish
2a1fd421bd Correctly detect unbalanced 'end' in syntax highlighting 2013-11-25 00:48:01 -08:00
ridiculousfish
920adb8296 Merge branch 'master' into ast 2013-11-24 23:45:59 -08:00
ridiculousfish
8ceb4b83a4 Remove old unescape() function 2013-11-24 23:29:25 -08:00
ridiculousfish
34540babdb Merge branch 'master' into ast
Conflicts:
	complete.cpp
	fish_tests.cpp
2013-11-24 23:21:00 -08:00
ridiculousfish
9f6223311e Large cleanup and refactoring of unescape() function. 2013-11-24 22:58:39 -08:00
Konrad Borowski
90b78326d3 Cast timestamp before using it for formatted string.
time_t doesn't necessarily have to be a long number. In fact, manpage
for types.h mentions it can be a double value.
2013-11-19 18:36:20 +01:00
Siteshwar Vashisht
8fc26c1e58 Use fish from $__fish_bin_dir while calling fish_update_completions at startup 2013-11-17 16:24:00 +05:30
Siteshwar Vashisht
6eb7530f75 Do not show files in modprobe completions 2013-11-17 01:21:28 +05:30
Thierry Goettelmann
76ab22f74c Fix modprobe completion for newer modprobe versions 2013-11-16 20:13:41 +01:00
bot47
cfbb511d26 Fixes misleading "connect: Connection failed" message on start up
When launching the first instance of fish and fishd is not launched already, this should not be considered an error as long as it can be launched. So ignore the first failure of connect(), as the calling function get_socket() will try again. May need a bit of cleanup.
2013-11-14 09:46:55 +01:00
David Adam
14b6d32fe6 add bindings for PuTTY's I-can't-believe-it's-xterm keyboard
(see #170)
2013-11-13 11:20:59 +08:00
Siteshwar Vashisht
0de26732bf Don't show warning while generating man page completions on startup 2013-11-12 22:14:14 +05:30