Commit graph

166 commits

Author SHA1 Message Date
Martin Hamrle
94e9d6a5ef Add paging into navigating pager 2015-03-20 14:41:38 +08:00
ridiculousfish
fa588db148 Fix to swallow BOMs in sourced files
Fixes #1518
2014-11-01 16:25:28 -07:00
ridiculousfish
fa854d7a01 Eliminate wcsv2strv 2014-10-30 18:52:37 -07:00
Kevin Ballard
35595dbffd Make escape() return a wcstring
This avoids the potential for leaking the resulting string.
2014-09-25 18:20:03 -07:00
Kevin Ballard
cd4fa518b8 Remove my_wcswidth() in favor of fish_wcswidth()
my_wcswidth() was just a wrapper around fish_wcswidth() already.
Instead, add two convenience overrides of fish_wcswidth() to common.h
that make it a drop-in replacement for my_wcswidth().
2014-09-25 18:04:11 -07:00
Kevin Ballard
4ed4b265a5 Show -M and -m flags in bind list 2014-09-22 12:37:11 -07:00
Kevin Ballard
cc52a59e1a Rework how screen size is tracked
The screen size is fetched after a SIGWINCH is delivered. The current
implementation has two issues:

* It calls ioctl() from the SIGWINCH signal handler, despite ioctl() not
  being a function that is known to be safe to call.
* It's not thread-safe.

Signals can be delivered on arbitrary threads, so we don't know if it's
actually safe to be modifying the cached winsize in response to a
signal. It's also plausible that the winsize may be requested from a
background thread.

To solve the first issue, we twiddle a volatile boolean flag in the
signal handler and defer the ioctl() call until we actually request the
screen size.

To solve the second issue, we introduce a pthread rwlock around the
cached winsize. A rwlock is used because it can be expected that there
are likely to be far more window size reads than window size writes. If
we were using C++11 we could probably get away with atomics, but since
we don't have that (or boost), a rwlock should suffice.

Fixes #1613.
2014-08-29 12:46:03 -07:00
ridiculousfish
3ff104ba30 Rename lock_t to mutex_lock_t to fix Solaris compilation
Fixes #1510
2014-07-07 00:38:37 -07:00
ridiculousfish
11c1562512 Remove connection_t usage from write_to_fd 2014-06-09 12:57:44 -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
4948508277 Squelch some more warnings on Linux 2014-04-27 18:27:34 -07:00
ridiculousfish
fb89c762fc Silence unused return value warning in FATAL_EXIT 2014-04-27 17:28:57 -07:00
ridiculousfish
0d3169ef70 Run restyle.sh to enforce style rules. 2014-03-31 10:01:39 -07:00
ridiculousfish
3cfdc6d126 Fix line number reporting in new parser 2014-03-20 21:32:02 -07:00
ridiculousfish
e47ad09130 Make contains take the string by const reference again, for performance reasons 2014-03-11 12:43:52 +08:00
Daniel J. Hofmann
7dc0b6f40b Fixed various Undefined Behavior occurrences.
Conditionally uninitialized:
 - builtin_commandline.cpp:577
 - expand.cpp:869
 - parse_util.cpp:1036

Initialization of POD structs:
 - event.cpp:61
 - autoload.cpp:22

References used with va_start:
 - common.cpp:608:18

Found with clang-3.4's awesome -Wconditional-uninitialized,
-Wmissing-field-initializers and -Wvarargs.
2014-03-07 18:28:16 +01:00
ridiculousfish
414530c9c2 Partially rework profiling. Fix profiling crash with new parser. Fixes
1295
2014-02-09 14:04:43 -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
ridiculousfish
808bc42f2a Further work on keyboard navigating the completion list 2014-01-18 12:42:53 -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
40e223c12d Additional miscellaneous fixes based on cppcheck static analysis 2014-01-12 13:53:59 -08:00
ridiculousfish
34540babdb Merge branch 'master' into ast
Conflicts:
	complete.cpp
	fish_tests.cpp
2013-11-24 23:21:00 -08:00
ridiculousfish
9f6223311e Large cleanup and refactoring of unescape() function. 2013-11-24 22:58:39 -08:00
ridiculousfish
8e07e55c1f More work on new parser 2013-08-08 15:06:46 -07:00
ridiculousfish
464187491f Formatting 2013-06-02 01:14:26 -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
3a475a99fc Fix gettext macro to stop casting everything to wchar_t * (oops) 2013-03-24 15:58:24 -07:00
ridiculousfish
9394583f96 Implement actual error handling for builtin_printf. Fix the tests. 2013-03-24 15:58:24 -07:00
ridiculousfish
94b1d58cc2 Additional changes related to https://github.com/fish-shell/fish-shell/pull/592 2013-02-28 10:25:32 -08:00
Cheer Xiao
76f715c486 add class scoped_push to automatically restore variable on function exit 2013-02-26 12:17:28 -08:00
ridiculousfish
a8e92639af Cleanup and simplify null_terminated_array_t and its clients 2013-02-22 16:22:56 -08:00
Yannis Chatzimichos
b9ba227733 Clean up comments and fix spelling errors 2013-02-20 18:07:38 -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
Cheer Xiao
274f018494 Remove trailing whitespaces 2013-01-21 10:34:18 +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
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
644607c29f Eliminate str2wcs 2012-12-19 13:31:06 -08:00
ridiculousfish
c5031c2b39 Output embedded null characters more often
https://github.com/fish-shell/fish-shell/issues/444
2012-12-12 15:44:01 -08:00
ridiculousfish
a122d2eb50 First attempt at appending a "missing new line" character
https://github.com/fish-shell/fish-shell/issues/397
2012-12-01 15:44:09 -08:00
ridiculousfish
9992b8eb0e Apply new indentation, brace, and whitespace style 2012-11-18 16:30:30 -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
21e83a881e Bring back ellipsis 2012-11-05 00:05:42 -08:00
ridiculousfish
833abc27cc Make wildcards beginning with dots not match . and ..
https://github.com/fish-shell/fish-shell/issues/270
2012-10-15 18:16:47 -07:00
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
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
c67702a498 Cleaned up lots of typecasts, simplified some string handling 2012-08-04 15:11:43 -07:00
ridiculousfish
2e1b3325c6 Warning cleanup 2012-08-04 11:34:45 -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