Commit Graph

4024 Commits

Author SHA1 Message Date
mehultikekar
741342ba1d Fix Makefile.in for building key_reader 2014-06-01 15:58:08 -04:00
Konrad Borowski
d97e31b4ab git prompt shouldn't export variables. 2014-06-01 09:39:28 +02:00
ridiculousfish
ce4081af93 Fix some warnings in Linux build 2014-05-31 13:46:28 -07:00
ridiculousfish
32f5edc9c5 Do not continue execution if argument expansion fails. Fixes #1488 2014-05-31 12:41:27 -07:00
Konrad Borowski
b481128a93 Fix small misspelling in comment in expand.cpp 2014-05-31 09:08:46 +02:00
ridiculousfish
ab62001b74 Implement correct error message for failed process expansion. 2014-05-30 13:50:13 -07:00
ridiculousfish
2dfd57bb8c Hopeful fix for hangs in iothread tests in travis-ci 2014-05-29 13:44:31 -07:00
ridiculousfish
20d7a142c5 Enable fishd-less mode by default.
Shell instances now synchronize universal variables using the
filesystem. fishd should no longer be launched by default.
2014-05-29 13:05:47 -07:00
ridiculousfish
9ae06c541f Remove inotify-based universal notifier
The inotify notifier is fragile, fails on travis, and fails to compile
on certain Linux kernels. It doesn't appear to work as well as the named
pipe mechanism. Best to just get rid of it.
2014-05-29 09:57:56 -07:00
ridiculousfish
655293ece9 input_readch must return R_EOF instead of WEOF. Fixes #1452 2014-05-25 15:22:44 -07:00
Konrad Borowski
a983318501 Silence other fallbacks
This removes Clang warnings
2014-05-25 12:47:36 +02:00
ridiculousfish
8769c06350 Fix some annoying warnings in fish_tests with gcc 4.8 2014-05-24 16:15:45 -07:00
Konrad Borowski
5066710e60 Use current version documentation links in README 2014-05-24 14:07:18 +02:00
ridiculousfish
451c97f35a Merges changes to support running fish without fishd.
In the new mode (not yet enabled), universal variables are set by reading and writing the fishd file directly, with some file locking for synchronization. This enables forwards and backwards compatibility. However there is no compatibility with simultaneous edits. Changes may be lost if fishd and the new mechanisms both attempt writes.

fishd is still enabled by default for now; it will be disabled in a future commit. You can opt into the new mechanism (disabling fishd) by setting the environment variable fish_use_fishd to 0 before starting fish. This cannot itself be a universal variable, because of bootstrapping: the value is needed to determine how we read universal variables in the first place.

Universal variable change notifications (i.e. reacting immediately to live edits) are tricky. Checking for changes is simple and relatively inexpensive (just a stat()), but relying solely on that would require frequent wakeups, and show up in fs_usage. So how do we get change notifications into an fd that we can monitor via select()? We support a few strategies, expressed as universal_notifier_t::notifier_strategy_t. By default we use notifyd on OS X and a named pipe on Linux / everywhere else. This is also configurable at runtime via the fish_universal_notifier variable.
2014-05-21 11:02:17 -07:00
ridiculousfish
8a577a9d4d Remove an errant system("ls") 2014-05-21 10:55:00 -07:00
ridiculousfish
950150469a Disable inotify tests pending investigation into why it fails on
travis-ci
2014-05-21 10:50:57 -07:00
ridiculousfish
3cbace98a7 'echo -' should output a dash instead of treating it as options
Fixes #1459
2014-05-16 15:19:07 +08:00
ridiculousfish
e214df8980 Try using IN_DELETE_SELF with inotify 2014-05-16 13:37:23 +08:00
ridiculousfish
e3cccdf571 Add check for kernel version to try to determine why travis-ci is
failing with inotify
2014-05-16 13:09:10 +08:00
ridiculousfish
a0bf841be2 Check for non-negative watch object in inotify_add_watch 2014-05-16 12:54:52 +08:00
ridiculousfish
73cbb0c65f Add a check to ensure the file really is deleted in inotify test 2014-05-16 12:35:07 +08:00
ridiculousfish
2f89ddbead Add test for inotify support to try to track down travis-ci is failing 2014-05-16 12:16:10 +08:00
ridiculousfish
a526693915 Refine test for enabling strategy_inotify in fish_tests 2014-05-15 17:25:13 +08:00
ridiculousfish
31f2a3a7d7 Fix a warning about missing enum in fish_tests.cpp 2014-05-15 14:44:17 +08:00
ridiculousfish
147403f958 Use mkostemp in universal variables when available 2014-05-15 14:37:44 +08:00
ridiculousfish
38c52cf9b5 Formatting fixes 2014-05-15 14:31:57 +08:00
ridiculousfish
64c1c75c42 Improve universal variable error messages 2014-05-15 14:27:06 +08:00
ridiculousfish
2b11d1060c Make initialize_synchronizes_via_fishd default to false. Add some
logging support to universal variables.
2014-05-15 10:49:06 +08:00
ridiculousfish
a73b903df9 Null notifier to support fishd synchronization, so we can select the
synchronization mechanism at runtime
2014-05-14 15:03:44 +08:00
ridiculousfish
30cfb3e795 Correct a comment and clean up code that listens for universal notifier
changes
2014-05-14 14:16:53 +08:00
ridiculousfish
a0e6d4375a Merge branch 'master' into death_of_fishd 2014-05-14 14:09:32 +08:00
ridiculousfish
c7aca5cc35 Hopefully better fix for prompt under Windows. Things that may store
NOT_A_WCHAR must be wint_t, not wchar_t
2014-05-14 13:30:41 +08:00
David Adam
3225d7e169 avoid symlink attacks in __fish_print_packages and spawning fishd
* use $XDG_CACHE_HOME for __fish_print_packages completion caches
 * when starting fishd, redirect fishd output to /dev/null, not a
   predictable path

Fix for CVE-2014-3219.

Closes #1440.
2014-05-12 09:30:05 +08:00
Konrad Borowski
6596d91c82 Fix prompt under Windows.
The fix is obviously a hack caused by that NOT_A_WCHAR
doesn't fit in wchar_t. Better fix would be nice.
2014-05-10 17:13:08 +02:00
ridiculousfish
d554b7da08 Merge branch 'master' into death_of_fishd 2014-05-09 16:07:11 -07:00
Philipp Schroer
cd7f1a15f8 Automatically add include paths for ncurses on Cygwin 2014-05-09 14:43:23 -07:00
ridiculousfish
fa68c2619f Use parm_left_cursor and parm_right_cursor for bulk cursor motions.
Fixes #1448
2014-05-09 14:37:23 -07:00
ridiculousfish
e97bec10ea Remove needs_polling from universal_notifier_t. Add some expository
comments.
2014-05-07 14:22:05 -07:00
ridiculousfish
7763718b60 Further cleanup and rationalization of named pipe universal notifier. 2014-05-06 14:10:55 -07:00
Konrad Borowski
7f2c4cbf8a Move the empty function test to tests. 2014-05-06 12:31:44 +02:00
Konrad Borowski
91ebe12fc2 Add test for empty function name. 2014-05-06 12:18:09 +02:00
Konrad Borowski
13e1e7e1e9 Fix NULL dereference when function name is not specified
It was possible to type `function ""; end`, and this caused fish to
crash because of NULL pointer.
2014-05-06 12:07:16 +02:00
ridiculousfish
8a263952ad Fix named pipe universal notifier. No more threads. Tests now pass. 2014-05-05 23:33:05 -07:00
ridiculousfish
f27232bd0a Initial work on strategy_named_pipe universal notifier. 2014-05-04 15:06:40 -07:00
Konrad Borowski
16534ec644 Improve test_wchar2utf8().
Currently it contains strange code like using `do` loop in order to
avoid `goto`s (they aren't evil, honestly), the pointless `if (mem)`
conditional which doesn't even work (had semicolon for some reason).

You may think this code had a bug where the code didn't check for
the pointer to be null before calling `free`, but this is not the case,
as according to C and C++ standard, `free` should allow `NULL` pointers,
and ignore them.
2014-05-04 15:48:50 +02:00
ridiculousfish
7e44bcfd8a Make inotify-based universal variable notifier tests pass 2014-05-03 19:57:20 -07:00
ridiculousfish
8cbd66b0f9 Merge branch 'death_of_fishd' of https://github.com/fish-shell/fish-shell into death_of_fishd 2014-05-03 19:36:22 -07:00
ridiculousfish
47a81c2b39 Re-establish inotify watch when file is deleted 2014-05-03 16:31:11 -07:00
ridiculousfish
56bf209f84 Merge branch 'master' into death_of_fishd
Conflicts:
	configure.ac
2014-05-03 15:33:48 -07:00
ridiculousfish
333fb1bf97 Use mkostemp instead of mktemp where available 2014-05-03 15:27:58 -07:00