Commit Graph

53 Commits

Author SHA1 Message Date
ridiculousfish
3513ce3ac0 Universal variable callbacks should only be announced for changed
values, not every value. Also support erase notifications.
2014-06-16 12:27:28 -07:00
ridiculousfish
6277a2e4a4 Migrate global functions out of env_universal. Have env operate directly
on an env_universal_t.
2014-06-15 17:30:50 -07:00
ridiculousfish
735195e8ea Teach env_universal_remove to directly report whether the variable was
successfully removed.
2014-06-13 15:15:11 -07:00
ridiculousfish
17c2d76c5e Removed connection_t and associated functions 2014-06-09 16:41:10 -07:00
ridiculousfish
11c1562512 Remove connection_t usage from write_to_fd 2014-06-09 12:57:44 -07:00
ridiculousfish
ef646f0f78 Removal of more fishd artifacts and headers 2014-06-09 12:07:40 -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
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
e97bec10ea Remove needs_polling from universal_notifier_t. Add some expository
comments.
2014-05-07 14:22:05 -07: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
ridiculousfish
186b0f62eb Early implementation of inotify-based universal variable notifier for
Linux
2014-05-01 16:44:37 -07:00
ridiculousfish
60c8012e9e Implement notifyd-based notification strategy for universal variables
(OS X specific)
2014-04-30 15:50:03 -07:00
ridiculousfish
7a5a277c29 Implement universal variable deletion. Adopt shared memory uvar notification. 2014-04-29 17:03:00 -07:00
ridiculousfish
38da76804e Implement shared memory strategy for universal variable notifications 2014-04-29 14:14:50 -07:00
ridiculousfish
a949f0b0c3 Move universal variable callbacks out from under the lock, to avoid a
possible deadlock on reentrancy
2014-04-29 11:28:00 -07:00
ridiculousfish
d7f22a0c27 Correctly invoke callbacks with fishd-less universal variables. All
tests now pass.
2014-04-27 16:53:07 -07:00
ridiculousfish
3b4794ae94 Implement atomic loading/saving of fishd file within fish, eventually
permitting removal of fishd. Universal variables test passes, others
fail.
2014-04-27 13:35:32 -07:00
ridiculousfish
6a94b51cba Beginning steps towards teaching the universal variable system to read
the fishd file directly, instead of fetching it through fishd
2014-04-26 11:41:34 -07:00
ridiculousfish
bf14668b2a Migrate machine and hostname identification from fishd.cpp to
env_universal_common.cpp, so that fish can use it
2014-04-25 17:45:22 -07:00
ridiculousfish
a475dd15e6 Migrate universal variables to env_var_t structure. Encapsulate
universal variable storage into a class for better testability.
2014-04-25 16:09:26 -07: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
dc54ec5b2b Migrate connection_t from storing a huge buffer to a std::vector 2013-02-16 01:28:46 -08:00
ridiculousfish
b682c4102e Eliminate next pointer from connection_t, turn connections into a std::list 2013-02-16 00:32:15 -08:00
ridiculousfish
6d522e6ed6 First round of fixes based on cppcheck
https://github.com/fish-shell/fish-shell/issues/575
2013-02-16 00:02:40 -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
ridiculousfish
e07de09460 Big cleanup of env_set. Changed var_table_t to use direct var_entry_t instead of pointers. Changed some ints to bools. 2013-01-19 13:32:06 -08:00
ridiculousfish
9992b8eb0e Apply new indentation, brace, and whitespace style 2012-11-18 16:30:30 -08:00
Łukasz Niemier
47df1ae40a Remove trailing whitespaces and change tabs to spaces 2012-11-18 11:23:22 +01:00
ridiculousfish
51de26960c Make escaping consistent for fish <-> fishd protocol
Fix fork guards to work in fishd
https://github.com/fish-shell/fish-shell/issues/339
2012-10-08 14:47:25 -07:00
ridiculousfish
fdc6c3722a Fixed a bunch of clang analyzer warnings
Simplified some memory allocations by migrating to std::string
2012-08-05 12:01:53 -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
175249b455 Adopt wcstring in env_set 2012-05-09 03:06:10 -07:00
ridiculousfish
79a22b1f8d Replace some string_buffer_t 2012-03-03 23:01:42 -08:00
Siteshwar Vashisht
8232857d07 Modified env_get_string() to accept wcstring instead of wchar_t*. 2012-02-24 00:58:01 +05:30
ridiculousfish
2206e221bd Removed array_list_t (!) 2012-02-21 10:47:21 -08:00
Siteshwar Vashisht
6e58c9f7c8 Switched to std::map instead of hash_table_t in env.cpp and env_universal_common.cpp. 2012-02-18 00:25:29 +05:30
ridiculousfish
46fa2dd2f0 Migration of screen away from ad-hoc lists 2011-12-27 18:41:38 -08:00
ridiculousfish
22a8e57a57 More migration away from al_list 2011-12-26 23:29:57 -08:00
ridiculousfish
7c7aba1202 Fix to migrate the universal variable server off of dyn_queue_t 2011-12-26 21:39:08 -08:00
ridiculousfish
8d2f107d61 Some changes to migrate towards C++ and a multithreaded model 2011-12-26 19:18:46 -08:00
Grissiom
c6372a1b3f remove trailing spaces
This is done by `sed -i -e 's/[ \t]*$//' *.[c,h]`, which should not
introduce any functionality change.
2010-09-18 09:51:16 +08:00
Claes Nästén
c2c4b24174 Fix issue in error handling, reported to and fixed by Axel Liljencrantz. Change val[0] and body[0] in env universal to val[1] and body[1] to support compilation with Sun Studio. Change default prompt to use pekdon instead of whoami as it does not exist under Solaris.
darcs-hash:20070822080052-cac88-326332f0df7d17ddca4a4496c93728a47f19bba5.gz
2007-08-22 18:00:52 +10:00
axel
3b2670532a Make fish store universal variables locally if fishd can't be started - local changes are lost of the fishd connection is restored
darcs-hash:20061115123447-ac50b-bf17c55079e1196205cc3a4fd0ca22d9f539836c.gz
2006-11-15 22:34:47 +10:00
axel
bab168f1d1 Fix yet another universal variable issue with initialization of the read buffer. This may fix fishd bugs reported by Philip Ganchev and Martin Bähr
darcs-hash:20061018164438-ac50b-c586b1ad36249853d613d0137b505377fe890d37.gz
2006-10-19 02:44:38 +10:00
axel
f86f80fcd6 Properly handle character sets in universal variables
darcs-hash:20061017211129-ac50b-6aecd04b74a9122ff0e1b320a2cf48db36dd2194.gz
2006-10-18 07:11:29 +10:00
axel
184d58cd36 Buffer calls to read() in the universal variable code
darcs-hash:20061006184539-ac50b-d8ecc4c45d0caae12cd60e32515a1218b37831d3.gz
2006-10-07 04:45:39 +10:00
axel
277f9b7e60 Huge API documentation cleanup
darcs-hash:20051024152625-ac50b-41503feb4ea8d428c5b30c159aaae0c8f7ae46a2.gz
2005-10-25 01:26:25 +10:00
axel
0a4b983afa Multiple portability fixes
darcs-hash:20051010161255-ac50b-e732f18c1dfa610e34b56bb4ff1a3d4d2ef078a1.gz
2005-10-11 02:12:55 +10:00