Commit Graph

6558 Commits

Author SHA1 Message Date
Zoltán Mizsei
aedee4e1a4 Haiku have no lsocket, but lnetwork 2016-12-26 08:00:53 +08:00
Kurtis Rader
f31f53f61f fix random.1 man page
Trailing whitespace on a `\fish` command was causing this build failure:

/private/var/folders/T/fish_doc_build_3RT8yS/random.doxygen:44:
   warning: found </pre> tag without matching <pre>
2016-12-24 13:52:49 -08:00
Kurtis Rader
7c40abe4a6 switch from \1xb to \e in the code
Using `\e` is clearer and shorter than `\x1b`. It's also consistent with how
we write related control chars; e.g., we don't write `\x0a` we write '\n'.
2016-12-24 12:15:28 -08:00
Kurtis Rader
58347d494a update PROMPT_SP heuristic
Update our implementation of the PROMPT_SP heuristic to match current
zsh behavior. This makes it behave better on terminals like ConEmu and
the native MS Windows console which automatically insert a newline when
writing to the last column of the line.

Fixes #789
2016-12-24 12:14:32 -08:00
Kurtis Rader
01dbfb0a3f replace writestr() with fwprintf() in reader.cpp
There are several places that use writestr() which should instead be
using fwprintf() or equivalent. Also, clarify the documentation for why
writestr() and writechr() exist so they aren't used inappropriately
again.

Fixes #3657
2016-12-23 19:24:44 -08:00
Terje Larsen
2740cc80d2 improve make target completion
- Support completing dynamic make targets.
- Support completing make targets when using -C/--directory.
- Support `-Cdir/path`, `-C dir/path`
- Support `--directory=dir/path`, `--directory dir/path`

This detects if the make command have the `-p` switch otherwise it
assumes it is BSD make and will run a different command to try to figure
out the available targets.
2016-12-21 19:04:15 -08:00
Kurtis Rader
8ba2a4cfd4 fix race opening the uvar pipe
Fixes #3426
2016-12-21 16:32:43 -08:00
Kurtis Rader
1f2432d63a reinstate VBox* completions
Commits 48aa92900 and 77d4d21ca each added two files with the same name
differing only in letter case. That causes problems on systems like
macOS and MS Windows. Remove the lowercase file names. Anyone needing
those completions can do (same for VBoxHeadless):

function vboxsdl --wraps VBoxSDL
    VBoxSDL $argv
end
2016-12-21 16:03:32 -08:00
ridiculousfish
a70ed0282b Revert "Add VBoxSDL completions"
This commit confused git on case-insensitive HFS+

This reverts commit 48aa929008.
2016-12-21 15:53:51 -08:00
ridiculousfish
a7e3678d3e Revert "Add VBoxHeadless completions"
This commit confused git on case-insensitive HFS+

This reverts commit 77d4d21caa.
2016-12-21 15:53:38 -08:00
ridiculousfish
dce9453d25 Add a new completion test for optional arguments 2016-12-21 15:46:46 -08:00
Wilke Schwiedop
fa7682ec3c posixify! 2016-12-21 18:47:04 +01:00
Wilke Schwiedop
28cde83c33 requested changes 2016-12-21 18:44:34 +01:00
Clément Martinez
96157a05f6 Update fish_indent completions 2016-12-21 14:51:48 +01:00
Clément Martinez
b9f0842d7e Add base64 completions 2016-12-21 14:51:48 +01:00
Clément Martinez
77d4d21caa Add VBoxHeadless completions 2016-12-21 14:51:48 +01:00
Clément Martinez
48aa929008 Add VBoxSDL completions 2016-12-21 14:51:48 +01:00
Clément Martinez
291a28e79c Add __fish_print_VBox_vms function
Improve __fish_print_VBox_vms
2016-12-21 14:51:48 +01:00
Clément Martinez
6ab97227de Add objdump completions 2016-12-21 14:51:48 +01:00
Clément Martinez
6dec6ddc26 Fix netctl-auto completions 2016-12-21 14:51:48 +01:00
Clément Martinez
0785260365 Fix pygmentize completion
The previous implementation didn't take into account that a lexer could
have multiple names and gave `cpp, c++` instead of `cpp` and `c++` when
completing `pygmentize -l c`.
2016-12-21 14:51:42 +01:00
Clément Martinez
885de80a0e Add feh completions 2016-12-21 14:45:02 +01:00
Wilke Schwiedop
8204d3103b fix gpg completion 2016-12-21 13:46:43 +01:00
Wilke Schwiedop
0814797444 misc improvements to scripts 2016-12-21 13:46:43 +01:00
Wilke Schwiedop
e8bed9e038 replace "sort | uniq" with "sort -u" in scripts 2016-12-21 13:46:43 +01:00
Wilke Schwiedop
a927efa015 remove "cat file |" from scripts 2016-12-21 13:46:43 +01:00
Fabian Homborg
05ab849b72 Remove more complete "-u" and "-A" switches
Some of these were missed in #3660.
2016-12-21 13:07:27 +01:00
Kurtis Rader
d8a9e11c32 fix status subcommand spelling 2016-12-20 19:47:42 -08:00
Kurtis Rader
fe8fb2dccf clarify --inherit-variable option
Fixes #3626
2016-12-20 19:30:11 -08:00
Radomír Bosák
720c0ddb35 Remove -u and --unautoritative from completions
--authoritative and --unauthoritative 'complete' builtin switches have no effect anymore.
This commit removes usage of --unautoritative/-u in completions.
2016-12-20 17:16:22 -08:00
Radomír Bosák
2900352e04 Remove -A and --autoritative from completions
--authoritative and --unauthoritative 'complete' builtin switches have no effect anymore.
This commit removes usage of --autoritative/-A in completions.
2016-12-20 17:16:22 -08:00
Radomír Bosák
dc96c01c93 Remove --authoritative leftovers from complete
The complete builtin had once -A / --authoritative and -u /
--unauthoritative switches which indicated whether all possibilities for
completion are specified and would cause an error if the completion was
authoritative and an unknown option was encountered.

This feature was functionally removed during one of the past parser
rewritings, but -A and -u still remained in parts of the code and
command completions, although having no effect.

This commit removes the leftovers and prints an warning whenever user
tries to run the complete command with -A / -u / --authoritative /
--unauthoritative switches.

Fixes #3640.
2016-12-20 17:16:08 -08:00
Olivier Perret
1ace742b6c implement an improved random command
Fixes #2642
2016-12-20 16:46:33 -08:00
Olivier Perret
7996e15ad1 add unsigned long long variant to fish_wcsto* 2016-12-20 16:40:12 -08:00
ridiculousfish
3b50fe8b68 Correct a comment
We now kill all jobs, not just background jobs
2016-12-20 15:49:55 -08:00
Kurtis Rader
9870cf838a fix exiting breakpoint interactive context
Commit 8d27f81a to change how background jobs are handled (killed rather
than left running) when the shell is exited did not correctly handle
the nested interactive context created by the `breakpoint` command. This
fixes that mistake. Now any background jobs that already existed, or were
created within the `breakpoint` context, are left running when exiting
that context.
2016-12-19 20:35:57 -08:00
Kurtis Rader
8d27f81a7b kill all jobs when exiting an interactive shell
Fish is not consistent with other shells like bash and zsh when exiting
an interactive shell with background jobs. While it is true that fish
explicitly claims no compatibility with POSIX 1003.1 this is an area
where deviation from the established practice adds negative value.

The reason for the current behavior seems to be due to two users who did
not understand why interactive shells managed background jobs as they
did and were not aware of tools like `nohup` or `disown`. See issue

There is also a fairly significant bug present due to a misunderstanding of
what a true value from `reader_exit_forced()` means. This change corrects
that misunderstanding.

Fixes #3497
2016-12-19 18:55:52 -08:00
Kurtis Rader
9f8d854c2a fix race condition in fkr test 2016-12-19 17:44:54 -08:00
Kurtis Rader
40fa0d5c83 stop assuming the interrupt key is [ctrl-C]
The recent discussion around allowing the user to change various termios
(i.e., stty) settings reminded me that there are places in our code
where we assume the interrupt key is [ctrl-C]. That's a bad assumption.
Instead use the actual value reported to us by the kernel.

This also makes the fkr program friendlier by always reporting when a
signal was received, not just when run with -d2, and prompting the user
to press the INTR or EOF key a second time to exit.
2016-12-19 16:23:30 -08:00
Fabian Homborg
e8c18386c8 Bind \x7f to backward-{delete,}-char in vi-mode again
Partially reverts 745bceb9d8.

This is now again in line with the default bindings.
2016-12-18 21:25:56 +01:00
Kurtis Rader
745bceb9d8 fix backspace/del vi mode bindings
The recent refactoring to separate default (emacs) from vi key bindings
overlooked adding `\cH` bindings to vi mode. This also fixes the
behavior of the [del] key bindings (\x7F).

Fixes #3653
2016-12-16 21:52:58 -08:00
Kurtis Rader
483e9fdea2 check if locking takes too long
If acquiring a lock on the history or uvar file takes more than 250 ms
disable locking of the file. On systems with broken remote file system
locking it can cause tens of seconds delay after running each command
which can make the shell borderline unusable.

This also changes history file locking to use flock() rather than
fcntl() to be consistent with uvar file locking. It also implements the
250 ms time limit before giving up on locking.

Fixes #685
2016-12-16 21:20:08 -08:00
ridiculousfish
c6e3dd7965 Bump Xcode project version to latest 2016-12-16 13:43:01 -08:00
ridiculousfish
c2c3813555 Merge pull request #3652 from tas50/master
Prevent error in acidhub prompt by quoting the regex
2016-12-16 13:24:44 -08:00
Tim Smith
1a1a9b9927 Prevent error in acidhub prompt by quoting the regex
string errors if this regex isn't quoted. This results in this error:

http://stackoverflow.com/questions/40942185/fish-shell-init-git-repo-yields-constant-terminal-output-after-every-command

Signed-off-by: Tim Smith <tsmith@chef.io>
2016-12-16 10:43:40 -08:00
David Adam
47b78b9eeb fish.spec: on OBS/RHEL 5, build with -march=i686
RHEL 5 defaults to the i386 architecture, which does not provide the
atomic instructions required by C++11.
2016-12-16 09:33:26 +08:00
Kurtis Rader
396bf1235d workaround glibc bug that can corrupt malloc arena
If an interactive shell has its tty invalidated attempts to write to
stdout or stderr can trigger this bug:

https://sourceware.org/bugzilla/show_bug.cgi?id=20632

Avoid that by reopening the stdio streams on /dev/null if we're getting
an ENOTTY error when trying to do things like give or take ownership of
the tty.

This includes some unrelated style cleanups but including them seems
reasonable.

Fixes #3644
2016-12-14 20:12:37 -08:00
Piotr Matląg
d885f00941 Update nmcli completions 2016-12-14 17:06:10 +01:00
David Adam
0ba02ee3d1 fish.spec: on OBS, print config.log if configure unsuccessful 2016-12-14 16:43:22 +08:00
Pierre Neidhardt
5a5b51c909 Fix fusermount completion 2016-12-13 12:54:13 +01:00