Mahmoud Al-Qudsi
5b59ab3d9c
Add workaround to env_get_pwd_slash() for cases where PWD is not set
...
There's been no reproducible case entered for #5080 , but the stack trace
indicates the problem is with env_get_pwd_slash() returning an empty
string, which isn't a string that terminates in `/`.
In addition to making the failure case to return the path `./` (which
has the benefit of having the same meaning as $PWD), trying a little bit
harder to retrieve the real PWD by using getcwd(3). While
get_current_dir(3) is documented as relying on PWD, getcwd(3) does not
mention any such caveats, so it's possible that it will work even if
something is breaking PWD.
Just a thought, but it's possible if due to some recursion PWD surpassed
some predetermined value (maybe PATH_MAX) that PWD (on certain platforms
or under certain enivronments) won't be set (hence the code that deals
with ERANGE errors from the getcwd(3) call).
Closes #5080 .
2018-09-19 18:16:54 -05:00
David Adam
fde74d489c
Fix build on Linux
...
Broken in dc250e0c29
2018-09-19 10:55:36 +08:00
Mahmoud Al-Qudsi
dc250e0c29
Fix fish startup behavior in presence of unset $USER
...
As reported in fish-shell/fish-shell#5180, when the USER environment
variable is not set and fish is started, `get_runtime_path()` returns a
blank string. At some point in the past, this was called after
`setup_user()` in env.cpp, but this is no longer the case.
This commit removes the reliance on the $USER environment variable
entirely, and instead uses `getpwuid(geteuid()).pw_name` to retrieve the
current username.
Closes #5180 .
2018-09-18 21:03:04 -05:00
Fabian Homborg
0e82fcd999
Always notify about crashes
...
And by crash I mean anything that exits with SIGABRT, SIGBUS, SIGFPE, SIGILL, SIGSEGV, SIGSYS.
Fixes #4962 .
2018-09-18 21:22:15 +02:00
Sam Yu
17643ef12c
Fix zypper completion
...
* complete installed packages only for `zypper rm`
* remove incorrect local file completion
2018-09-16 21:15:32 -07:00
ridiculousfish
e6863a90c8
Don't reset the screen after emitting a BEL
...
Fixes #3693
2018-09-16 16:25:49 -07:00
ridiculousfish
f3da54d99c
Convert some iterators to C++-11 range-based loops
2018-09-16 15:49:18 -07:00
ridiculousfish
62870abe34
Remove newlines from Doxyfile.user aliases
...
For some reason I started getting literal \n appearing in Doxygen-generated
help files. These are coming from newlines in aliases defined in
Doxyfile.user. These should be safe to remove because they are HTML-specific
and there is still whitespace before them. Remove these newlines.
This didn't reproduce on Linux; Doxygen is full of mysteries.
2018-09-16 15:42:46 -07:00
Fabian Homborg
3ba74b3195
[string] Match everything with an empty pattern and -e
...
I.e. `string match --entire "" -- banana` used to match nothing, now
it matches everything.
Fixes #4971 .
2018-09-16 13:03:15 +02:00
Fabian Homborg
d44c21b580
Document/complete feature flags more
2018-09-16 10:39:15 +02:00
Fabian Homborg
bda147c7d3
Correct math docs
...
This was an oversight when math was changed to default to float output.
Also some more jokey stuff. Jokey stuff is nice.
2018-09-15 15:31:59 +02:00
Fabian Homborg
9be7288fab
expansion: Only clamp ranges when not forcing direction
...
This caused `$var[2..-1]` to still expand to $var[1] if only one
element was given.
Fixup for #4965 .
Fixes #5187 .
2018-09-15 11:07:29 +02:00
Fabian Homborg
9c2dff76cb
Remove some of the wait tests
...
This cuts the time down to about half. It's still the longest part of
the test suite, but that's probably unavoidable.
2018-09-15 11:07:29 +02:00
maxried
45a2ff4191
Update status.fish
...
Even though breakpoing sounds funnier, the completion should correctly be breakpoint.
2018-09-14 07:48:22 +08:00
ridiculousfish
ce174afabf
Rename my_env_set to more useful env_set_reporting_errors
2018-09-11 09:32:44 -07:00
Muttley
0f141b6ccf
pacaur: recognize *.pkg.tar as valid package extension
2018-09-11 13:26:27 +02:00
Jason
5d59c6a1cd
Correct argument order for signal handler example
2018-09-10 19:05:06 +02:00
ridiculousfish
56002abc61
Paginate history in fish_config
2018-09-09 01:01:03 -07:00
ridiculousfish
daf520db0a
Reformat all files
2018-09-08 22:19:05 -07:00
ridiculousfish
6e6fcda8e2
Get history working in web_config again
2018-09-08 22:13:54 -07:00
ridiculousfish
b9c50e400f
Fix abbreviations in web_config
2018-09-08 21:34:54 -07:00
Tang King Fai
0e6cc13d0d
Update cargo completion ( #5172 )
...
* Update cargo completion
* Show sub-command's description for completion
2018-09-07 15:29:48 +02:00
Fabian Homborg
d00c196613
Merge pull request #5173 from cdluminate/master
...
completions: ninja: "ninja -f" should be followed by a *.ninja file.
2018-09-07 14:48:50 +02:00
Mo Zhou
add24f96a9
completions: ninja: "ninja -f" should be followed by a *.ninja file.
2018-09-07 08:00:37 +00:00
ridiculousfish
ca61fc1bf8
Stop retrying close() on EINTR
...
https://lwn.net/Articles/576478/
http://austingroupbugs.net/view.php?id=529
https://sourceware.org/bugzilla/show_bug.cgi?id=14627
2018-09-05 21:49:31 -07:00
Curtis Jiang
06e5194092
add OpenWrt and opkg support
...
Signed-off-by: Curtis Jiang <jqqqqqqqqqq@qq.com>
2018-09-04 01:47:30 -07:00
ridiculousfish
8b277e711e
Large refactor of exec.cpp
...
Break up that monster function.
2018-09-03 15:57:11 -07:00
ridiculousfish
eca4d113c6
Factor do_fork into a real function
2018-09-03 14:33:53 -07:00
ridiculousfish
8e2d207869
Report duration of each test
2018-09-03 14:13:31 -07:00
ridiculousfish
2a62e18635
Remove child_forked and child_spawned
...
These variables weren't used for anything.
2018-09-03 13:31:03 -07:00
ridiculousfish
f7a020ad33
Rename launch process to exec_process_in_job
...
This avoids a name collision with another launch_process
2018-09-03 11:18:39 -07:00
ridiculousfish
48c510572b
Factor out launch_process from exec.cpp
...
Makes the monster function slightly more tractable.
2018-09-01 14:54:23 -07:00
ridiculousfish
753639aa9c
Reduce the scope of pid in exec_job
2018-09-01 14:39:32 -07:00
ridiculousfish
ec9c592edc
Adopt autoclose_fd_t in exec_job
2018-09-01 14:27:58 -07:00
ridiculousfish
274c77cf0c
Add autoclose_fd_t for helping to manage file descriptors
2018-09-01 14:27:36 -07:00
ridiculousfish
9269a5e0a8
Clean up abbreviation implementation a bit
2018-09-01 13:18:34 -07:00
ridiculousfish
051605b593
Cleap up owning_lock interface
...
Use some operator overloading to avoid the weird interface of acquired_lock.
2018-09-01 13:11:42 -07:00
ridiculousfish
1a9e3761ae
Add highlighting tests for empty variables
2018-09-01 12:05:52 -07:00
ridiculousfish
9bce3f4741
Merge branch 'variables_in_commands'
...
This merges support for allowing variables in commands.
2018-09-01 12:02:34 -07:00
ridiculousfish
7bd26f9ff0
Teach syntax highlighting about variables in commands
2018-09-01 12:00:56 -07:00
ridiculousfish
865a4647ae
Allow variables in commands
...
Syntax highlighting for these coming in next commit.
Fixes #154
2018-09-01 12:00:56 -07:00
ridiculousfish
59d78e8afa
Clean up syntax highlighting test
2018-09-01 10:17:57 -07:00
David Adam
1e0fab4fa4
git_version_gen: add support for out-of-tree tarballs
...
Closes #4122 .
2018-08-28 23:10:24 +08:00
Vicente Reyes
3e9453840f
complete stack built binaries
2018-08-26 17:00:04 -07:00
ridiculousfish
de2b0d1ae8
Remove some #if 0 code
2018-08-26 02:36:28 -07:00
ridiculousfish
2a680ebd12
Fix some miscellaneous warnings
2018-08-26 00:43:40 -07:00
ridiculousfish
67c4da9dbf
Correct formatting in argparse
2018-08-25 16:18:49 -07:00
ridiculousfish
4abdf8c301
Some refactoring of argparse implicit ints
2018-08-25 16:14:16 -07:00
ridiculousfish
d046452cdf
Increased const correctness in argparse
2018-08-25 16:09:04 -07:00
ridiculousfish
9f436c3750
Clean up bits of wgetopter_t interface
2018-08-25 16:09:04 -07:00