ridiculousfish
f58dff62c7
Beginnings of work for search field feature of new pager
2014-01-26 00:41:30 -08:00
ridiculousfish
0fbddb0df1
Add fish_new_pager variable to enable new pager on request, disabled by default.
2014-01-24 18:10:42 -08:00
ridiculousfish
0a1960865e
Support for "merged completions" (multiple completions on the same line)
...
in new pager. Support for using up-arrow to end pager navigation.
2014-01-24 18:10:41 -08:00
Julian Aron Prenner
844b01cb6b
Add 'and' input function; fixes a bug with t,T
...
'and' will prevent later input functions from being executed if the
previous one did not succeed (e.g. a jump to a char not on the command
line)
2014-01-23 10:23:04 +01:00
ridiculousfish
7d3f808e4c
Various tweaks and improvements to new pager, including disclosure
...
feature
2014-01-22 17:45:27 -08:00
Julian Aron Prenner
4a9be7bf11
Experimental support for f,F,t,T vi commands.
...
Input functions can now have arguments
2014-01-22 10:00:44 +01:00
ridiculousfish
ee9a4082b6
Allow down arrow to enter pager. Clean up repainting within
...
reader_readline
2014-01-21 16:25:55 -08:00
ridiculousfish
f714d80c93
Support for scrolling through the pager
2014-01-21 14:35:18 -08:00
ridiculousfish
605c306bef
Correctly clear pager contents on ctrl-C
2014-01-20 13:05:18 -08:00
ridiculousfish
998ce1fe89
Support for correctly resizing pager contents.
2014-01-19 23:52:35 -08:00
ridiculousfish
d9d65577f4
Improved navigation of pager list. Added tests for it too.
2014-01-19 16:41:40 -08:00
ridiculousfish
808bc42f2a
Further work on keyboard navigating the completion list
2014-01-18 12:42:53 -08:00
Julian Aron Prenner
3728fc7dba
Add kill-selection function and visual binds for 'y' and 'd'
2014-01-18 10:18:29 +01:00
ridiculousfish
32054b6f32
Implement and document new -P / --paging-mode flags to commandline, to support new
...
pager
2014-01-17 12:53:01 -08:00
ridiculousfish
c6e5201e15
Initial support for navigating completions that appear under the
...
commandline using arrow keys
2014-01-17 12:04:03 -08:00
ridiculousfish
0627ae82fb
Clean up pager on exit from interactive read
2014-01-15 18:21:38 -08:00
Julian Aron Prenner
21e9615243
Remove unused #defines
2014-01-15 15:59:13 +01:00
Julian Aron Prenner
9e27ba5109
Pull from upstream
2014-01-15 15:44:27 +01:00
Julian Aron Prenner
213e907044
Merge remote-tracking branch 'upstream/master' into bind_mode
...
Conflicts:
builtin.cpp
reader.cpp
share/functions/fish_default_key_bindings.fish
2014-01-15 15:27:06 +01:00
Julian Aron Prenner
c8d5131a42
Add experimental support for selection and visual mode
2014-01-15 15:07:22 +01:00
Julian Aron Prenner
dede320630
Rename 'new-mode' to 'sets-mode', prepare for selection support.
2014-01-15 11:39:19 +01:00
ridiculousfish
54689f6087
Merge branch 'master' into pager
...
Conflicts:
highlight.h
2014-01-15 02:05:46 -08:00
ridiculousfish
53814983ff
Update style and formatting to conform to fish style guide.
2014-01-15 01:40:40 -08:00
ridiculousfish
40897cd7da
Merge branch 'master' into pager
...
Conflicts:
screen.h
2014-01-15 01:23:30 -08:00
ridiculousfish
e2fe873049
Change highlight colors from a bitmask into a combination enum / bitmask
...
so that we can support more than 16 color specifications.
2014-01-15 01:01:25 -08:00
ridiculousfish
295c8f48a6
Teach screen how to render completion page. Correct spacing in
...
completion page contents.
2014-01-14 15:39:53 -08:00
ridiculousfish
096f850433
Eliminate class parse_t
2014-01-12 22:39:12 -08:00
ridiculousfish
40e223c12d
Additional miscellaneous fixes based on cppcheck static analysis
2014-01-12 13:53:59 -08:00
ridiculousfish
0e9d159bc2
Improvements to error reporting. In particular, we now append a newline
...
in reader_shell_test, so that there's always a statement terminator.
Otherwise commands like 'echo |' would not be considered an error (just
incomplete).
2014-01-08 18:20:55 -08:00
ridiculousfish
993148552e
Support for Ctrl-C cancellation in new parser. Added tests for it too.
2014-01-02 16:19:33 -08:00
Julian Aron Prenner
2587649ca2
Allow restricting earsing and listing of bindings to specific mode;
...
implement force repaint and multi-char bindings;
2013-12-31 14:53:29 +01:00
ridiculousfish
a9787b769f
Support for implicit cd, no-exec, and the exit builtin. All tests now
...
pass (!). Error reporting still unsteady.
2013-12-29 16:23:26 -08:00
ridiculousfish
715823a666
Bringup of function definitions, switch statements with new parser
2013-12-27 03:58:42 -08:00
ridiculousfish
6536ffe178
Facilities for turning on new AST-based parser.
2013-12-26 13:24:10 -08:00
ridiculousfish
ed70195c7e
Merge branch 'master' into ast
...
Conflicts:
function.cpp
parser.cpp
parser.h
2013-12-20 17:44:37 -08:00
ridiculousfish
e38217683c
Refactor block_t storage in parser_t from a linked list to a vector
2013-12-20 17:41:21 -08:00
ridiculousfish
3e9153d955
Clean up some error messages. Don't show the line in the error message
...
if it's the first line and we're interactive, since then it's obvious
2013-12-16 16:52:23 -08:00
ridiculousfish
5b24aac266
Initial work on backtrace support with new parser
2013-12-15 16:05:37 -08:00
ridiculousfish
5cf59de676
Finish rewriting detect_errors to use new parser. All tests now pass (!)
2013-12-12 18:18:07 -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
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
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
964c7e6f3b
Merge branch 'master' into ast
...
Conflicts:
complete.cpp
2013-10-27 13:37:14 -07:00
ridiculousfish
cf766b55cc
Fix formatting
2013-10-26 15:27:39 -07:00
ridiculousfish
e05743d0ba
Fix for errant SIGHUPs due to child fish shells messing with the term.
...
Fixes https://github.com/fish-shell/fish-shell/issues/1002
2013-10-26 15:22:20 -07:00
ridiculousfish
ddf98661e4
Adopt new parser in tab completions
2013-10-12 18:17:03 -07:00
ridiculousfish
5490f54d00
Make parse_t::parse a static method so we don't have to create lots of
...
useless parse_t objects
2013-10-12 01:17:55 -07:00
ridiculousfish
7b86b2e05a
Adoption of new parser in abbreviations
2013-10-09 02:03:50 -07:00
ridiculousfish
cbe615224d
Make tok_last_type return an enum token_type instead of int
2013-09-30 13:57:36 -07:00
ridiculousfish
7ce5f34d6f
Disable flow control per #814
2013-09-22 18:14:18 -07:00
ridiculousfish
97ea61a407
Fix for parse_util_token_extent doing the wrong thing inside a command
...
substitution. Fixes https://github.com/fish-shell/fish-shell/issues/833
2013-09-21 16:38:57 -07:00
ridiculousfish
44bd405ed3
reader_replace_current_token can be made static
2013-09-21 16:27:37 -07:00
ridiculousfish
61c5b631f3
Fix for infinite loop in cycle_competions, and potential issue in
...
fish_pager when given an empty completion list
2013-09-10 21:13:47 -07:00
ridiculousfish
b993dce12f
Rework some of the new case-modifying commands to share more code, and
...
also to update the autosuggestion and syntax highlighting
2013-09-10 20:46:46 -07:00
Christian Rishøj
cd1c2f74d3
add support for downcase-word, upcase-word and capitalise-word
2013-09-09 18:46:16 +02:00
Leonardo Boiko
1b1aa07414
When exiting, only warn about _stopped_ background jobs ( fix #111 )
2013-09-08 22:51:34 +08:00
ridiculousfish
c38a40d193
Adjust prefix completions to sort alphabetically instead of by length.
...
Other completions are still sorted by length.
https://github.com/fish-shell/fish-shell/issues/923
2013-08-31 15:01:02 -07:00
Konrad Borowski
da89591a53
Initialize cycle_cursor_pos.
...
This removes the warning from compiler.
2013-08-29 13:06:04 +02:00
ridiculousfish
06b4964dd8
Clean up some comments and make a function static
2013-08-26 00:05:23 -07:00
Tony Wang
d2ffdc8986
improve comments and extract a common function
2013-08-25 19:33:39 -07:00
Tony Wang
7e1a3148fb
fixed fish-shell/fish-shell#944
...
When the completion list includes the exact typed string with other
candidates, i.e. completion_t.match.type == fuzzy_match_exact,
the other candidates will be removed from the list, as they are not
the "best type". This is inconvenient for the user who wants to
type and complete commands in the other candidates.
The commit is to make the best_type to fuzzy_match_prefix as highest
priority, also, when comparing to best_type, the same or higher
priority completions can both match.
2013-08-25 19:33:39 -07:00
ridiculousfish
b6f495d107
Expand abbreviations at the beginning of commands as discussed in https://github.com/fish-shell/fish-shell/issues/731
2013-08-24 11:47:37 -07:00
ridiculousfish
d6791a836b
Include the autosuggestion in history if it was truncated
...
https://github.com/fish-shell/fish-shell/issues/650
2013-08-20 20:08:56 -07:00
ridiculousfish
4899086b3c
Big fat refactoring of how redirections work. In fish 1.x and 2.0.0, the redirections for a process were flattened into a big list associated with the job, so there was no way to tell which redirections applied to each process. Each process therefore got all the redirections associated with the job. See https://github.com/fish-shell/fish-shell/issues/877 for how this could manifest.
...
With this change, jobs only track their block-level redirections. Process level redirections are correctly associated with the process, and at exec time we stitch them together (block, pipe, and process redirects).
This fixes the weird issues where redirects bleed across pipelines (like #877 ), and also allows us to play with the order in which redirections are applied, since the final list is constructed right before it's needed. This lets us put pipes after block level redirections but before process level redirections, so that a 2>&1-type redirection gets picked up after the pipe, i.e. it should fix https://github.com/fish-shell/fish-shell/issues/110
This is a significant change. The tests all pass. Cross your fingers.
2013-08-19 18:06:24 -07:00
Konrad Borowski
d407d680ea
Show path containing current disk drive in Windows in title
2013-08-14 12:21:17 +03:00
waterhouse
e3ea953ff4
Ctrl+E should insert suggested completion and then go to end of line
...
(Closes #91 , #932 )
Currently, control-E is bound to `end-of-line`.
This patch modifes the `end-of-line` procedure so that, if it is invoked when
the cursor is at the end of a command and there is pending completion text,
it will accept the completion text and move to the end. The behavior of
`end-of-line` will not otherwise be altered.
2013-07-27 18:00:02 +08:00
ridiculousfish
f9c2a77c67
Next stab at abbreviations. Highlighting should work.
2013-07-19 12:41:35 -07:00
ridiculousfish
92099c7af2
Initial abbreviation work. Tests currently fail.
2013-07-19 12:41:34 -07:00
ridiculousfish
464187491f
Formatting
2013-06-02 01:14:26 -07:00
ridiculousfish
fd15d30987
Add some const, fix spaces
2013-06-02 01:14:05 -07:00
Christian Rishøj
03e36bda72
make cursor placement consistent with transpose-words
from readline
2013-06-02 00:59:22 -07:00
Christian Rishøj
a259c37415
transpose-words
2013-06-02 00:59:22 -07:00
ridiculousfish
908b07527e
Support for fuzzy completions
...
https://github.com/fish-shell/fish-shell/issues/568
https://github.com/fish-shell/fish-shell/issues/528
2013-05-25 15:41:18 -07:00
ridiculousfish
ee95a7309a
Fix issue where transpose fails if there is a trailing autosuggestion
2013-05-24 23:56:12 -07:00
Christian Rishøj
f32dfe2da6
command and binding for transpose-chars
2013-05-24 23:56:12 -07:00
ridiculousfish
924b646b79
Fix for crashing and assertion failures when tab completing a token that consists of only backslash
...
Fixes https://github.com/fish-shell/fish-shell/issues/762
2013-05-20 01:40:24 -07:00
ridiculousfish
f8786c25be
Fix for failing to update command line while cycling through tab completions
...
https://github.com/fish-shell/fish-shell/issues/765
2013-05-20 00:31:47 -07:00
ridiculousfish
2da81b0ae7
Formatting and style updates
2013-05-05 02:33:17 -07:00
ridiculousfish
fe6699f0bf
Rely on $PWD instead of getcwd() more often
...
Fixes https://github.com/fish-shell/fish-shell/issues/696
2013-04-27 00:45:38 -07:00
ridiculousfish
b8f34cdd35
Teach case-insensitive completions about tildes. Fixes https://github.com/fish-shell/fish-shell/issues/647
2013-04-07 23:54:43 -07:00
ridiculousfish
c6302e3b3f
Add some more cancellability to autosuggestions
2013-04-07 16:40:14 -07:00
ridiculousfish
42497d9932
Fix for issue where a file may be incompletely read on receipt of a signal.
2013-04-07 14:52:16 -07:00
ridiculousfish
437b4397b9
Mark stdin as nonblocking if we get EWOULDBLOCK, and before handing it off to child processes when either starting them or moving them to the foreground.
...
https://github.com/fish-shell/fish-shell/issues/176
2013-04-07 12:40:08 -07:00
ridiculousfish
516e18900c
Repaint after completions
...
Fixes #643 , #644
2013-04-04 11:51:23 -07:00
ridiculousfish
1543d02f96
Add callbacks that get invoked before the next call to select(), which will allow for a nice fix to https://github.com/fish-shell/fish-shell/issues/608 . Eliminate the poll handler, and replace it with this mechanism.
2013-04-03 13:49:58 -07:00
ridiculousfish
e0e0bcdc1e
Update code formatting
2013-03-21 17:44:51 -07:00
ridiculousfish
3b00d06a62
Return key should only insert a newline if backslashed character is whitespace, or backslash terminates the line
...
https://github.com/fish-shell/fish-shell/issues/613
2013-03-12 13:00:37 -07:00
ridiculousfish
b48e504522
Spelling mistake in comment
2013-03-11 10:55:47 -07:00
ridiculousfish
4cce303c89
Add support for making a leading space not save to history
...
https://github.com/fish-shell/fish-shell/pull/615
2013-03-10 14:25:43 -07:00
ridiculousfish
4d19bb17a9
Break out COMPLETE_NO_CASE and COMPLETE_REPLACES_TOKEN into separate flags, in preparation for upcoming fuzzy completion work
2013-03-05 20:54:16 -08:00
David Adam (zanchey)
daf5ef1bbd
Kill termio.h and sys/termios.h
...
On FreeBSD, compilation complains that "this file includes
<sys/termios.h> which is deprecated, use <termios.h> instead". On Linux
and FreeBSD, <sys/termios.h> literally just pulls in <termios.h>. On OS
X and Solaris, <termios.h> pulls in <sys/termios.h>.
<termio.h> doesn't exist on FreeBSD or Mac OS X, and on Linux is marked
as deprecated and just includes <termios.h>. It does exist on Solaris,
but no `struct termio` is ever actually used in the codebase.
2013-03-05 12:25:00 -08:00
ridiculousfish
94b1d58cc2
Additional changes related to https://github.com/fish-shell/fish-shell/pull/592
2013-02-28 10:25:32 -08:00
ridiculousfish
7b873179ad
Use swap instead of copying in reader_repaint_without_autosuggestion
2013-02-20 18:18:08 -08:00
Yannis Chatzimichos
f1d923714a
Clear the autosuggestion from the old commandline when showing the completion list. Fixes #561
2013-02-20 18:07:38 -08:00
Yannis Chatzimichos
b9ba227733
Clean up comments and fix spelling errors
2013-02-20 18:07:38 -08:00
ridiculousfish
aaa0c25ff7
Large set of changes to how PATH is handled. Changed fish to no longer modify PATH in share/config.fish. Introduced variable fish_user_paths, and a glue function __fish_reconstruct_path that splices together PATH with fish_user_paths. Changed fish to no longer validate changes to PATH unless the paths are new (i.e. don't recheck what's already there). Modified certain sets to store const wchar_t instead of wcstring to save a few allocations.
...
https://github.com/fish-shell/fish-shell/issues/527
2013-02-19 18:05:20 -08:00
ridiculousfish
911c37e63e
Fix for issue where backward kill line crashes if performed while the cursor is on a newline
...
https://github.com/fish-shell/fish-shell/pull/580
2013-02-17 14:22:27 -08:00
ridiculousfish
4416753df0
More cleanup based on static analysis
...
https://github.com/fish-shell/fish-shell/issues/575
2013-02-16 02:38:13 -08:00
ridiculousfish
8d95d0834d
First stab at builtin set_color. Moved set_color.cpp to builtin_set_color.cpp and taught fish about it.
2013-02-14 15:52:24 -08:00