Commit Graph

341 Commits

Author SHA1 Message Date
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
ridiculousfish
b119b4f1da Fix to look up fish_pager in __fish_bin_dir instead of by using PATH, in preparation for making fish no longer need to modify PATH 2013-02-13 13:22:29 -08:00
ridiculousfish
2a7fc9c3a5 Clean up env_var_table_t. Switch from storing var_uni_entry_t* to var_uni_entry_t. Various other cleanups. 2013-02-11 23:16:50 -08:00
Cheer Xiao
3f9706a7f3 Make io_data_t::fd const
In exec(), pipe_{write,read} no longer get reused.
2013-02-11 22:05:47 -08:00
Jan Kanis
51a955c75c remove __warn_unused attribute from exec_subshell 2013-02-06 01:11:46 +01:00
Jan Kanis
9a89da3b33 merge branch 'bug-537' and branch 'bug-read-ctrlC'. This should fix both #537 and #516 2013-02-05 23:16:18 +01:00
Jan Kanis
3f5c02bf92 rename reader_cancel_thread to reader_thread_job_is_stale, update comments 2013-02-05 21:28:23 +01:00
ridiculousfish
e918851902 Formatting 2013-02-03 11:38:22 -08:00
ridiculousfish
ded81ec186 Teach fish how to put completion data inside a closing quote
Fixes https://github.com/fish-shell/fish-shell/issues/552
2013-02-02 14:50:22 -08:00
ridiculousfish
ad8d68dd43 Make subcommands modify $status, and make builtin_set not modify status unless it fails
https://github.com/fish-shell/fish-shell/issues/547
https://github.com/fish-shell/fish-shell/issues/214
2013-01-31 15:57:08 -08:00
ridiculousfish
1879dc4b59 Initial set of changes working to make fish robust against running out of file descriptors 2013-01-30 02:22:38 -08:00
ridiculousfish
4683ce2771 Fix unused return value warning a different way 2013-01-27 14:04:44 -08:00
ridiculousfish
798537d47b Fixed an unused variable warning 2013-01-27 13:50:30 -08:00
ridiculousfish
0257b02a8c Fix to output the prompt even if fish_prompt fails 2013-01-27 13:44:32 -08:00
ridiculousfish
92b2376c23 Indent switch + case properly. https://github.com/fish-shell/fish-shell/issues/530 2013-01-24 14:59:52 -08:00
Jan Kanis
29fda9cb6c make the casting magic standards compliant and avoid compiler warnings; add error check 2013-01-24 15:09:45 +01:00
Jan Kanis
e7b3f5745c replace compiler-supported TLS with pthread_get/setspecific; remove GPLv3 code from two commits ago 2013-01-24 14:29:13 +01:00
Jan Kanis
d12b1650aa make threadlocal use conditional on configure check. NB: This revision mixes GPLv2-only and GPLv3+ code so should be considered proof of concept. 2013-01-23 01:03:12 +01:00
Jan Kanis
70a75dc88a implement reader_cancel_thread using __thread thread-local storage 2013-01-23 00:19:29 +01:00
Jan Kanis
b6bd6e399d tweak reader interrupt behavior 2013-01-22 11:57:47 +01:00
Jan Kanis
a3b497b271 rename reader_data_t.interruptible to exit_on_interrupt 2013-01-22 11:28:04 +01:00
Jan Kanis
55b3cf4627 move work out of interrupt handler (which is safer as well) 2013-01-22 11:19:01 +01:00
Jan Kanis
eb1c00c56b fix comments on #516. Split reader_interrupted into a reader_interrupted and a reader_reading_interrupted 2013-01-22 11:00:02 +01:00
Jan Kanis
970d05df39 make the read builtin respect ctrl-C 2013-01-20 23:38:21 +01:00
Jan Kanis
abae08a9fb create reader_data_t.interruptible flag and infrastructure to make it work. 2013-01-20 23:38:21 +01:00
Cheer Xiao
e020ad0c06 Convert io_buffer_read to io_buffer_t::read 2013-01-17 15:55:05 +08:00
Cheer Xiao
9057801c4b Convert io_buffer_create to static io_buffer_t::create, make io_buffer_t constructor private 2013-01-17 15:55:05 +08:00
Cheer Xiao
0f443ef37b Convert io_buffer_destroy to ~io_buffer_t 2013-01-17 15:55:05 +08:00
Cheer Xiao
a20e0b9e2e Split out io_buffer_t, make input_redirect in exec() a raw pointer 2013-01-17 15:55:05 +08:00
ridiculousfish
1db7c6233b Fix for missing first character in completions 2013-01-13 21:56:23 -08:00
ridiculousfish
e9c226b8be Fix for issue where completing in the middle of a command may append extra junk at the end of the completions in the list
https://github.com/fish-shell/fish-shell/issues/301
2013-01-12 11:54:02 -08:00
Cheer Xiao
b66233de78 Revert "Revert shared_ptr<io_data_t> changes until kinks are ironed out"
This reverts commit 77f1b1f0fe.
2013-01-11 14:18:10 -08:00
ridiculousfish
25081f60c4 Make fish_config prompt color changes work more often
Fixes https://github.com/fish-shell/fish-shell/issues/505
2013-01-08 02:56:45 -08:00
ridiculousfish
552d8f394e Make fishd base its variable files on the MAC address instead of hostname
Fixes https://github.com/fish-shell/fish-shell/issues/183
2013-01-08 02:39:22 -08:00
ridiculousfish
85fdf587c0 When the user input contains capital letters, use its case rather than the autosuggestion's case
Fixes https://github.com/fish-shell/fish-shell/issues/335
2013-01-05 15:21:42 -08:00
ridiculousfish
1c83144773 Reset the color before we clear to eol
Fixes https://github.com/fish-shell/fish-shell/issues/493
2013-01-04 22:32:40 -08:00
ridiculousfish
77f1b1f0fe Revert shared_ptr<io_data_t> changes until kinks are ironed out
https://github.com/fish-shell/fish-shell/pull/487

Revert "Merge branch 'oo-io' of git://github.com/xiaq/fish-shell into xiaq-oo-io"

This reverts commit f3c8f535a4, reversing
changes made to b02f6cf3bc.

Also reverts ac023f7588 and a79d3c680c
2013-01-04 02:05:30 -08:00
Cheer Xiao
a9ada13a23 Use shared_ptr to manage io_data_t*. 2012-12-31 23:54:17 +08:00
ridiculousfish
2ba92f92b7 Fix for an exception in a non-interactive shell with empty input 2012-12-20 17:45:35 -08:00
ridiculousfish
0b1e371880 Changes to work recognition per https://github.com/fish-shell/fish-shell/issues/384
Word movement should be very similar to fish 1.x
backward-kill-word remains more liberal, but now stops at any of {,'"=}
2012-12-20 17:37:09 -08:00
ridiculousfish
644607c29f Eliminate str2wcs 2012-12-19 13:31:06 -08:00
Cheer Xiao
09b1eee5d0 Random fixes to comments. 2012-12-16 12:23:24 +08:00
ridiculousfish
eec6db0a23 forward-word should accept a word of an autosuggestion
https://github.com/fish-shell/fish-shell/issues/435
2012-12-10 16:23:08 -08:00
ridiculousfish
40ec2303ff Make fish try to detect when it's an orphaned process and then exit politely
Fixes https://github.com/fish-shell/fish-shell/issues/422
2012-12-05 13:33:07 -08:00
ridiculousfish
b9283d48b5 Added a history speed test
Profile driven caching of config directory
Style fixes
2012-12-03 02:25:08 -08:00
ridiculousfish
224de547b3 Ensure we repaint the prompt after resetting it, when colors change.
Fixes https://github.com/fish-shell/fish-shell/issues/418
2012-12-02 11:53:34 -08:00
ridiculousfish
cf11d1e4e6 Additional changes to try to improve line wrapping 2012-11-25 01:26:58 -08:00
ridiculousfish
e557327860 Coalesce redundant repaints, prepare to address some resizing issues (again!) 2012-11-24 21:06:42 -08:00
ridiculousfish
464f1f44aa Improvements to avoid clearing the screen as often, which addresses a problem where the screen may be blank
Fixes https://github.com/fish-shell/fish-shell/issues/402
2012-11-24 16:42:25 -08:00
ridiculousfish
4837a2d0df Replaced some usage of wchar_t * with wcstring in complete(). Some style fixes. 2012-11-23 11:12:22 -08:00
ridiculousfish
6fc9e6f21e Make tok_first return a wcstring instead of a wchar_t* 2012-11-21 22:23:48 -08:00
ridiculousfish
7117c4a5ee Remove tok_destroy 2012-11-21 22:14:28 -08:00
ridiculousfish
f545fb2491 Work towards refactoring tokenizer to be a real object 2012-11-21 17:48:35 -08:00
ridiculousfish
44ce3e6731 Changes to make word movement less aggressive
https://github.com/fish-shell/fish-shell/issues/384
2012-11-19 02:41:57 -08:00
ridiculousfish
26678682ca Fix indentation of switch statements 2012-11-19 00:31:03 -08:00
ridiculousfish
9992b8eb0e Apply new indentation, brace, and whitespace style 2012-11-18 16:30:30 -08:00
ridiculousfish
dc8cc39bc8 Don't autosuggest in builtin_read
https://github.com/fish-shell/fish-shell/issues/29
2012-11-18 02:43:35 -08:00
ridiculousfish
c9c2fc5ee3 Restore terminal foreground process group on exit
Fixes https://github.com/fish-shell/fish-shell/issues/197
2012-11-18 02:16:14 -08:00
ridiculousfish
0302162d8e Make tab-completion truncation less dumb
Fixes https://github.com/fish-shell/fish-shell/issues/259
2012-11-09 16:02:19 -08:00
ridiculousfish
d76f880faf Support for fish_right_prompt
Fixes https://github.com/fish-shell/fish-shell/issues/80
2012-11-07 19:59:20 -08:00
ridiculousfish
21e83a881e Bring back ellipsis 2012-11-05 00:05:42 -08:00
ridiculousfish
5ba1261285 Initial right_prompt work 2012-11-04 23:21:37 -08:00
ridiculousfish
5e371e8fe7 Don't use posix_spawn for commands that need to be put into foreground to avoid a race
Fix for race where a command's output may not be fully drained
2012-11-04 15:45:52 -08:00
ridiculousfish
3d5a3f03fa Fix to prevent buff_pos from underflowing in reader_kill 2012-10-08 23:47:32 -07:00
ridiculousfish
8eb53ea7ca Rewrite kill behavior (aka control-W) to do something better
Fixes https://github.com/fish-shell/fish-shell/issues/327
2012-10-04 14:35:03 -07:00
ridiculousfish
9b60af4d52 Fix to propagate the last color before highlighting completes, and to avoid repainting when highlighting completes if the color does not change 2012-10-03 12:19:27 -07:00
ridiculousfish
a661c03743 Work on soft wrapping to address https://github.com/fish-shell/fish-shell/issues/300
Resizing is still wonky
2012-10-01 03:29:18 -07:00
Siteshwar Vashisht
4fc80b5057 Fix for displaying multiline prompts 2012-09-20 00:47:31 +05:30
Siteshwar Vashisht
16f2ffc29d Remove ellipsis and newlines from long lines
Fix for issue https://github.com/fish-shell/fish-shell/issues/300
2012-09-18 00:42:11 +05:30
ridiculousfish
d788c84440 Made type property of block_t constant and private
Further work towards cleaning up block_t hierarchy
2012-08-26 23:16:20 -07:00
ridiculousfish
04ea680e9a Support for tab cyling through completions
https://github.com/fish-shell/fish-shell/issues/84
2012-08-21 17:18:52 -07:00
ridiculousfish
670e33ab27 Properly handle empty completions (e.g. tab-complete 'foo' with extant files 'foo' and 'foobar' should offer both)
Fixes issue described in https://github.com/fish-shell/fish-shell/issues/290
2012-08-20 13:09:21 -07:00
ridiculousfish
61686aff34 Adopt posix_spawn (!)
Rewrite IO chains to be a vector of pointers, instead of a linked list
Removed io_transmogrify
2012-08-15 00:57:56 -07:00
ridiculousfish
84729c4dfa Additional warnings cleanup, effective C++ violations, dead code removal 2012-08-05 13:24:33 -07:00
ridiculousfish
8de8877c7c Fix OS X compilation 2012-08-05 12:05:05 -07:00
Siteshwar Vashisht
deca475972 Fixed compilation on Linux
Addresses issue https://github.com/fish-shell/fish-shell/issues/264
2012-08-05 18:37:51 +05:30
ridiculousfish
c67702a498 Cleaned up lots of typecasts, simplified some string handling 2012-08-04 15:11:43 -07:00
ridiculousfish
54ceb4211e Additional warning fixes and migration from int to size_t or long where appropriate 2012-08-04 13:47:56 -07:00
ridiculousfish
7a46227141 More warning fixes and switching from int to long or size_t 2012-08-04 13:02:44 -07:00
ridiculousfish
8185bee4b8 Lots of work towards making fish build without warnings on Mountain Lion, mostly in terms of using size_t instead of int 2012-08-04 11:34:45 -07:00
ridiculousfish
2e1b3325c6 Warning cleanup 2012-08-04 11:34:45 -07:00
ridiculousfish
62c49f13ce Switch from std::list to std::vector in a few places to reduce compiled code size 2012-07-24 22:32:11 -07:00
ridiculousfish
261bf12c91 Lots of miscellaneous cleanup. Unified the path_get_cd_path, path_allocate_cd_path, etc. functions 2012-07-20 22:11:05 -07:00
ridiculousfish
b08fb86637 Renamed env_vars to env_vars_snapshot_t
Cleanup of non-wcstring version of path_get_path
2012-07-20 20:39:31 -07:00
ridiculousfish
d06d6c6964 Various changes to reduce fish's compiled code size
OS X release build executable size dropped from 672k to 511k
2012-07-17 12:47:01 -07:00
ridiculousfish
548ea1e54a Added binding for accepting an autosuggestion
Fixes https://github.com/fish-shell/fish-shell/issues/226
2012-07-15 14:02:34 -07:00
ridiculousfish
4755c5f8c8 Deliver SIGHUP when we're exiting, even if stdin is not closed.
Fixes https://github.com/fish-shell/fish-shell/issues/138
2012-07-15 12:46:40 -07:00
ridiculousfish
ea1bfd715e Set of changes to improve Unicode support with respect to combining characters.
Should address https://github.com/fish-shell/fish-shell/issues/155
2012-07-15 10:45:18 -07:00
ridiculousfish
f8b4c1b389 First pass at making autosuggestions not trigger wrapping
Addresses https://github.com/fish-shell/fish-shell/issues/167
2012-07-12 12:51:47 -07:00
ridiculousfish
6f0b00f983 Fix for https://github.com/fish-shell/fish-shell/issues/66
Make fish import .bash_history if regular history is not found
2012-07-09 22:54:08 -07:00
maxfl
76e1cda495 Set single-line default prompt
Fish now doesn't join the fish_prompt output. This breaks the default
fish_prompt. Make default fish_prompt single-line. Fixes #203.

Add -l flag to 'read' documentation. Remove ambiguous '-x' description.
Fixes #157.
2012-07-07 23:34:16 -07:00
maxfl
7fccad156e Fix fish_prompt event
I've found that this modification fixes fish_prompt event
Fixes #164
2012-07-06 15:31:45 -07:00
ridiculousfish
345a528625 Untangle unescaping responsibilities in highlight.cpp. Fix cd autosuggestions to properly handle quotes. Factor out some of the quote unescaping behavior from reader.cpp to parse_util.cpp.
Add some autosuggestion tests
2012-07-06 14:34:53 -07:00
Siteshwar Vashisht
a1319cb8aa Fixed crash caused by pressing pageup button when no match (for typed command) in history is found 2012-07-05 16:06:39 +05:30
ridiculousfish
0576a11a6f Added missing break in case R_SUPPRESS_AUTOSUGGESTION 2012-07-01 15:40:06 -07:00
Ian Munsie
c8f86d94c9 Add command to temporarily suppress the autosuggestion feature
Autosuggestion will be automatically re-enabled next time a character is
inserted. An alternative implementation would require another command to
explicitly re-enable it.

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
2012-07-01 15:37:10 -07:00
Ian Munsie
2b24eab26a Fix off by two in move_word left
This can be demonstrated with something like:

echo howdy hi<control-w>
echo howdy I<alt-b>

Previousely this would delete/move all the way to the start of 'howdy',
rather than just the word 'hi'/'I'.

It seems that the code to ignore the character under the cursor was
redundant, as all the cases I've tried with it removed seem to do the
right thing.

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
2012-07-01 15:37:10 -07:00
Siteshwar Vashisht
05c721bebb Some improvements to validate commands suggested from history 2012-06-29 00:24:37 +05:30
Siteshwar Vashisht
ccfc909eb2 Fixed crash caused by pressing pageup button 2012-06-25 03:02:37 +05:30
Emil Eriksson
eea62125a1 Fixes title update in tmux and screen
* Seems that writestr( L"\x1b];" ); doesn't work in tmux and
	  screen. As discussed in fish-shell/fish-shell#47 the 2 was
	  removed. This commit adds the zero (L"\x1b]0;").
	* Tested in screen,tmux,iTerm and xterm.
2012-06-21 10:30:12 -07:00
Emil Eriksson
96f36a63dc Enable window title update when TERM is screen-X
* Uses the same logic as when TERM is
	  xterm-X to enable window-title updates when
	  running in screen.
2012-06-21 10:30:12 -07:00
ridiculousfish
6dd0013a5d Fix for extra space in some completions
Addresses https://github.com/fish-shell/fish-shell/issues/60
2012-06-16 10:30:05 -07:00
ridiculousfish
1ed65b6bd7 Fixed token search (note: this didn't work properly even in the original fish!)
Fixes https://github.com/fish-shell/fish-shell/issues/61
2012-06-15 16:24:05 -07:00