Fabian Homborg
44f2f37bd4
Remove "Array index out of bounds" errors
...
This just removes every invalid index.
That means with `set foo a b c` and the "show" function from tests/expand.in:
- `show $foo[-5..-1]` prints "3 a b c"
- `show $foo[-10..1]` prints "1 a"
- `show $foo[2..5]` prints "2 b c"
- `show $foo[1 3 7 2]` prints "3 a c b"
and similar for command substitutions.
Fixes #826 .
2017-06-20 17:52:23 -07:00
Kurtis Rader
df01547eab
implement the fish_breakpoint_prompt
function
...
This is another step to resolving issue #1310 . It makes
`fish_breakpoint_prompt` a replacement for `fish_prompt` if it is defined
and we're presenting a prompt in the context of a `breakpoint` command.
2017-06-20 17:18:59 -07:00
Kurtis Rader
bd299e96b2
implement status is-breakpoint
...
This implements `status is-breakpoint` that returns true if the current
shell prompt is displayed in the context of a `breakpoint` command.
This also fixes several bugs. Most notably making `breakpoint` a no-op if
the shell isn't interactive. Also, typing `breakpoint` at an interactive
prompt should be an error rather than creating a new nested debugging
context.
Partial fix for #1310
2017-06-20 17:18:59 -07:00
Rabah Meradi
d234a1870b
Aucompletion for jest CLI
2017-06-19 23:27:22 -07:00
Fabian Homborg
1a135aa0b0
git completions: Make checking aliases faster
...
See #4117 .
2017-06-19 11:04:40 +02:00
Kurtis Rader
0ed2af464c
document new as
completion
2017-06-18 23:33:30 -07:00
Clément Martinez
d5e1405cbe
Add as completions
2017-06-18 23:10:23 -07:00
Kurtis Rader
2302db4dc7
add unit test for echo -h
2017-06-18 22:25:00 -07:00
Kurtis Rader
82f5fb507d
fix echo -h
...
In addition to fixing `echo -h` this includes some debugging related
cleanups I made while investigating the issue.
Fixes #4120
2017-06-18 22:10:19 -07:00
Kurtis Rader
59a11188df
fixes for previous commit
...
Turns out the Travis environments are less forgiving than my system. Add
missing include. Change subsystem init order in fkr.
2017-06-18 16:42:26 -07:00
Kurtis Rader
93dad29ec6
set COLUMNS
and LINES
earlier
...
Fixes #4141
2017-06-18 15:38:52 -07:00
Kurtis Rader
385e40540c
fix issues with builtin_function()
...
This does several things. It fixes `builtin_function()` so that errors it
emits are displayed. As part of doing that I've removed the unnecessary
`out_err` parameter to make the interface like every other builtin.
This also fixes a regression introduced by #4000 which was attempting to
fix a bug introduced by #3649 .
Fixes #4139
2017-06-18 12:55:14 -07:00
Alan Somers
0e954e4764
Fix the build on FreeBSD with Clang
...
NULL expands to nullptr which cannot be cast to an int. Replace it with
0 in wcsfilecmp.
Fixes issue #4136
2017-06-17 22:51:25 -07:00
Alan Somers
652faa1a13
Rename __assert to __fish_assert
...
FreeBSD and possibly other platforms define __assert in their C
libraries.
Fixes #4133
2017-06-17 22:41:24 -07:00
Kurtis Rader
e44934cf87
remove leftover debug printf
2017-06-17 18:39:16 -07:00
Kurtis Rader
1e9c9e01e5
refactor wgetopt.cpp to reduce complexity
2017-06-17 17:09:01 -07:00
Kurtis Rader
a312abdeb8
fix wgetopt_long() handling of short opts
...
Fixes #4131
2017-06-17 16:00:33 -07:00
Kurtis Rader
af22bf3501
style cleanups (make style-all)
2017-06-16 21:01:57 -07:00
Kurtis Rader
d22743dad0
change help only cmd opts interface
2017-06-16 21:01:57 -07:00
Kurtis Rader
37b8cfaeba
avoid struct name clashes
...
Running the tests on travis revealed that some compilers (or at least
with some options) call the wrong struct constructor if there is more
than one struct with the same name but differing definitions.
2017-06-16 21:01:57 -07:00
Kurtis Rader
a114492223
more builtin refactoring
2017-06-16 21:01:57 -07:00
Kurtis Rader
69e823d612
customize some oclint thresholds
2017-06-16 21:01:57 -07:00
Kurtis Rader
d910b7af7d
fix some lint warnings
2017-06-16 21:01:57 -07:00
Kurtis Rader
ffdabace5e
more builtin style cleanup
2017-06-16 21:01:57 -07:00
Kurtis Rader
b480b117a9
split builtin realpath into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
a665d532c3
split builtin exit into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
b530d175e7
split builtin return into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
422b1bd066
split builtin bg into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
79e74d0ebb
split builtin fg into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
070d204d9b
split builtin pwd into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
175570b7ed
lint cleanup
2017-06-16 21:01:56 -07:00
Kurtis Rader
a1744b5822
run make depend
2017-06-16 21:01:56 -07:00
Kurtis Rader
a6d6ded9a5
split builtin contains into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
bda6426bf7
split builtin builtin into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
551bd39889
split builtin command into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
fded427c6a
split builtin cd into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
7840d53ecf
split builtin source into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
52709e8051
split builtin disown into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
1d4a0fb091
split builtin echo into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
59e90123ea
change naming convention for parsing opts
2017-06-16 21:01:56 -07:00
Kurtis Rader
044f5512e2
split builtin function into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
1c91ec9dfa
split builtin random into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
e7f87c08e1
split builtin status and read into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
ef8a0c93ea
split builtin history into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
2079b4292e
fix minor bug introduced by previous refactoring
2017-06-16 21:01:56 -07:00
Kurtis Rader
00ed221b5a
split builtin functions into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
1b9824ae46
split builtin emit into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
b20ffca3e2
split builtin block into its own module
2017-06-16 21:01:56 -07:00
Kurtis Rader
7a6a766e0a
remove dead code
...
Remove code for the `__fish_parse` builin that has been commented out
for three years. Add a call to `parse_dump_tree()` to fish_indent.
2017-06-16 21:01:56 -07:00
Kurtis Rader
a6227f6c3a
split builtin bind into its own module
...
As part of putting the `bind` command code into its own module refactor
how it parses its flags.
2017-06-16 21:01:56 -07:00