Commit graph

2832 commits

Author SHA1 Message Date
ridiculousfish
98a17f4046 Remove some functions which were rendered trivial by xiaq's changes. Make io_file_t take its path directly. Make io_buffer_t no longer use a shared_ptr for its data. 2013-01-19 10:59:43 -08:00
ridiculousfish
f850c021b7 Merge branch 'split-io' of git://github.com/xiaq/fish-shell into xiaq-split-io 2013-01-18 16:17:31 -08:00
Cheer Xiao
8600243683 Fix two clang warnings 2013-01-17 22:45:06 +08:00
Jan Kanis
c6e5987480 add a JOIN_THREADS_BEFORE_FORK preprocessor flag to help debug locking problems 2013-01-17 13:14:05 +01:00
Cheer Xiao
e0c858478a Revert "Make io_buffer_t::out_buffer a raw pointer, initialize in io_buffer_t's constructor"
This reverts commit d48ffab9d67da48cf45c2f5560c21a767144545f.

Conflicts:
	io.cpp
	io.h
2013-01-17 15:55:06 +08:00
Cheer Xiao
a3b15b995e Make io_data_t::io_mode const
A protected constructor is needed in io_pipe_t to let io_buffer_t override
its io_mode.
2013-01-17 15:55:06 +08:00
Cheer Xiao
57ef5289fe Make is_input a member of io_pipe_t 2013-01-17 15:55:06 +08:00
Cheer Xiao
a63c0311bb Make io_buffer_t::out_buffer a raw pointer, initialize in io_buffer_t's constructor 2013-01-17 15:55:05 +08:00
Cheer Xiao
9808829ece Make io_data_t pure virtual, its constructor protected 2013-01-17 15:55:05 +08:00
Cheer Xiao
00b6431ad9 Split out io_pipe_t, let io_buffer_t inherit it 2013-01-17 15:55:05 +08:00
Cheer Xiao
e020ad0c06 Convert io_buffer_read to io_buffer_t::read 2013-01-17 15:55:05 +08:00
Cheer Xiao
df0c1eb32c Add missing virtual qualifier to ~io_buffer_t 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
Cheer Xiao
4b6bd7cae5 Split out io_file_t 2013-01-17 15:55:05 +08:00
Cheer Xiao
6f35792c74 Split out io_fd_t 2013-01-17 14:58:53 +08:00
Cheer Xiao
f1b375b042 Split out io_close_t 2013-01-17 14:58:53 +08:00
Cheer Xiao
4e672427bc parser.cpp: Put off initialization of new_io until mode is known 2013-01-17 14:58:53 +08:00
Cheer Xiao
165068c81d Put io_data_t detail printing in virtual io_data_t::print 2013-01-17 14:58:53 +08:00
Cheer Xiao
89993e9cbf Let io_data_t constructor take optional io_mode and fd 2013-01-17 14:58:52 +08:00
Cheer Xiao
78ab7e7ba1 Introduce a macro CAST_INIT to abbreviate common static_cast's a bit
This macro doesn't work with type names containing commas, but that doesn't
seem to be too common in fish.
2013-01-17 14:58:48 +08:00
Cheer Xiao
424bb589a2 Make io_data_t destructor virtual 2013-01-17 14:54:18 +08:00
Cheer Xiao
664fee5c6e Use new IO_INVALID as default value of io_data_t::io_mode 2013-01-17 14:54:18 +08:00
Cheer Xiao
146a353085 rename enum io_mode -> io_mode_t; make io_data_t::io_mode that type 2013-01-17 14:54:18 +08:00
ridiculousfish
214ef3dd0b Formatting 2013-01-16 14:50:08 -08:00
ciembor
406c8a6d1e Ajax fix for Firefox, it isn't XML. 2013-01-16 14:45:59 -08:00
ridiculousfish
6416cb45fb Fix proc and pid completion on OS X, and improve it on Linux.
https://github.com/fish-shell/fish-shell/pull/129
2013-01-16 14:11:43 -08:00
ridiculousfish
1db7c6233b Fix for missing first character in completions 2013-01-13 21:56:23 -08:00
Jan Kanis
640beafa8c fix a memory leak in profiling, add a profiling test 2013-01-14 01:38:05 +01:00
Jan Kanis
44f70d2b52 stop profile switch from crashing (issue #517); also make print_profile use a loop instead of recursion 2013-01-14 00:49:32 +01:00
ridiculousfish
acbb6fb8e2 Make umask work on OS X
https://github.com/fish-shell/fish-shell/issues/515
2013-01-12 15:35:40 -08:00
ridiculousfish
1163961927 Actually add the seq function (oops) 2013-01-12 15:22:09 -08:00
ridiculousfish
e1190eb1f3 Remove seq.in, in favor of the new function. Remove seq detection from configure.ac. Teach the Makefile how to remove old installed seqs. 2013-01-12 15:18:19 -08:00
ridiculousfish
dc37a8079e Added a seq function that defers to the seq command if present
https://github.com/fish-shell/fish-shell/issues/137
2013-01-12 14:18:34 -08:00
ridiculousfish
373cca0bf6 Formatting 2013-01-12 12:55:23 -08:00
ridiculousfish
b32fcc7a8e Don't call expand_home_directory from within parser_t::test - it may hang
https://github.com/fish-shell/fish-shell/issues/512
2013-01-12 12:53:40 -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
Jan Kanis
af9d611847 use debug_safe in postfork do_builtin_io. Closes #495 2013-01-12 19:13:45 +01:00
ridiculousfish
9d6c4fa678 Make do_builtin_io multi-fork safe, moved it to postfork.cpp
Addresses https://github.com/fish-shell/fish-shell/issues/495
2013-01-11 15:09:53 -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
Cheer Xiao
ff49792f44 exec.cpp:exec: Don't remove block_io elements from j->io
When dulicate_prepend prepend copies of block_io elements to j->io, the
removing simply does nothing. Now that the same pointers are prepended to
j->io, don't remove them.
2013-01-11 14:18:10 -08:00
ridiculousfish
b2abd963f0 Fix an exception when parsing a multi-line command that ends in cd
https://github.com/fish-shell/fish-shell/issues/511
2013-01-11 12:58:52 -08:00
Liam Howell
0ab9cf8054 Fixed a minor typo: standrard -> standard 2013-01-10 20:50:52 +05:30
ridiculousfish
c70e92e98d Don't call strerror or perror after fork, it's unsafe. Added safe_strerror and safe_perror replacements.
Fixes https://github.com/fish-shell/fish-shell/issues/495
2013-01-09 17:06:20 -08:00
ridiculousfish
bf10d6c03b Tweak test_fork to exercise strerror 2013-01-09 09:36:52 -08:00
ridiculousfish
de084b4a0d Make create_manpage_completions not generate empty files
https://github.com/fish-shell/fish-shell/issues/506
2013-01-08 14:58:27 -08:00
Christian Rishøj
e46cbea251 completions for mosh (http://mosh.mit.edu) 2013-01-08 12:32:49 -08:00
Cheer Xiao
7f6e63aba5 Make "Checking how to use..." lower case.
The configure script generated by autoconf uses lower case "checking". Let's
keep in line. :)
2013-01-08 23:05:19 +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