Compare commits

..

360 Commits
2.4b1 ... 2.5b1

Author SHA1 Message Date
David Adam
1f77c2d09d Bump version for 2.5b1 2017-01-14 08:19:35 +11:00
David Adam
6c906b365b osx/config.h: update to match current configure output on 10.11 2017-01-13 22:52:31 +08:00
David Adam
509ce38375 CHANGELOG: updates for 2.5b1 2017-01-13 22:47:32 +08:00
Fabian Homborg
6580ba8d8e de.po: Add missing quote 2017-01-13 11:15:14 +01:00
Fabian Homborg
1baaeee17e Update german translations
This had a bunch of complete nonsense in it.

Fixes #3721.
2017-01-13 09:41:41 +01:00
Cristian Prieto
6f9f7632f3 Added default mode prompt function (#3727)
* Added new function for the default prompt mode

Now fish mode prompt will call fish_default_mode_prompt, this will solve #3641

* Added function description

* Change wording for documentation about default mode prompt

* Finish changes requested in code review
2017-01-12 16:07:41 +01:00
Michael Alexander
dcf3d03e54 Implemented Dracula colors 2017-01-11 22:35:15 +08:00
David Adam
81a41e26f8 CHANGELOG: updates for 2.5b1 2017-01-11 22:33:27 +08:00
David Adam
41a41b1591 set_color: add completions for italics, dim and reverse 2017-01-11 22:00:33 +08:00
David Adam
4bc220f349 Drop requirement for socket library
The socket(2) library function is only required on Linux, and does not
require special linker arguments to work.

Closes #2360.
2017-01-11 19:34:32 +08:00
David Adam
5eaccf91e2 drop check for old running fishd instances
Closes #3669.

Reverts commit d1a56139e1.
2017-01-11 19:34:32 +08:00
Clément Martinez
12ea04580a Fix typo in CHANGELOG.md 2017-01-10 23:07:47 +01:00
Kurtis Rader
11dccccdcc optimize determining if can set term title
Decide if the terminal supports setting its title only when necessary
(e.g., when TERM changes) rather than everytime we're about to write
the prompt.
2017-01-10 13:11:39 -08:00
Kurtis Rader
e9de674bbd handle ttyname returning NULL
If the tty has been closed (i.e., become invalid) the `ttyname()`
function will return NULL. Passing that NULL to `strstr()` can crash
fish which means it won't kill its child processes and exit cleanly.

Another fix for #3644
2017-01-10 13:11:39 -08:00
Clément Martinez
4bed9ea56d Add xz support to __fish_complete_tar function 2017-01-10 16:09:49 +01:00
Clément Martinez
c28bd74ca7 Add --xz, -J completion options to tar command 2017-01-10 16:09:49 +01:00
David Adam
bf274f4fb5 CHANGELOG: updates for 2.5b1
[ci skip]
2017-01-10 07:20:53 +08:00
Kurtis Rader
f365f720da don't warn about using obsolete complete options
Fixes #3640
2017-01-09 11:21:34 -08:00
Kurtis Rader
4223b3da68 deal with BC_LINE_LENGTH not being honored
FreeBSD 12, Dragonfly BSD, and presumably other BSDs don't recognize the
BC_LINE_LENGTH env var and might split the output at 70 chars.

Fixes #3414
2017-01-09 17:32:11 +08:00
ridiculousfish
e5bfdb99b6 Enable mkostemp to be weak-linked
mkostemp is not available on some older versions of macOS. In order
for our built binaries to run on them, mkostemp must be weak-linked.
On other systems, we use the autoconf check.

Introduce a function fish_mkstemp_cloexec which uses mkostemp if
it was detected and is available at runtime, else falls back to
mkstemp. This isolates some logic that is currently duplicated in
two places.

See #3138 for more on weak linking.
2017-01-08 22:18:27 -08:00
ridiculousfish
6eb88dc13f Redeclare certain wcs functions as weak on macOS
In order to use C++11 with the standard macOS Xcode toolset,
we must use libc++. This in turn requires using 10.7 as our
MIN_REQUIRED in the availability macros, which in turn marks
certain wide-character functions as strong symbols (since they
were introduced in 10.7).

Redeclare them as weak, so that we can run on 10.6 without link
errors. See #3138 for more.
2017-01-08 22:18:27 -08:00
Fabian Homborg
48392517d4 Moar CHANGELOG for 2.5b1 2017-01-08 16:51:40 +01:00
Fabian Homborg
c5a6d87c5e Add while-read example to read docs 2017-01-07 14:31:05 +01:00
Fabian Homborg
e1b445f934 Document read return status
Fixes #3711.
2017-01-07 14:22:15 +01:00
m4sk1n
19c038d1ef Polish translation (#3710)
61% completed
2017-01-07 14:06:38 +01:00
Fabian Homborg
6daa8d7e12 Replace puts() with wprintf() 2017-01-07 14:05:42 +01:00
Fabian Homborg
177e06808c Replace all printf invocations with wprintf
Remember, GNU doesn't allow mixing narrow and wide IO.
2017-01-07 14:05:42 +01:00
Fabian Homborg
69005f8c60 builtin_test: Produce wide output to stderr
GNU systems don't allow mixing narrow and wide IO, so some of these
messages were lost since 1621fa43d8.

stderr is also the more logical place for error output to end up.

Fixes #3704.
2017-01-07 14:05:42 +01:00
David Adam
fcd53af89d debian packaging: bump version to debhelper compat level 9 2017-01-07 17:53:59 +08:00
David Adam
6c3f12fe24 debian packaging: drop support for Debian 7
Debian 7 (wheezy) is EoL and producing working binaries that are easily
installable has proven impossible.
2017-01-07 16:58:36 +08:00
Kurtis Rader
6f8775499f don't warn about EPIPE errors
Emitting warnings about EPIPE errors when writing to stdout or stderr is
more annoying than helpful. So suppress that specific warning message.

Fixes #2516
2017-01-06 23:59:06 -08:00
David Adam
430d82bd4f debian packaging: drop support for Ubuntu 12.04
Ubuntu 12.04 is EoL in three months' time and producing working binaries
that are easily installable has proven impossible.
2017-01-07 15:33:16 +08:00
Kurtis Rader
573916e5e2 ensure CMD_DURATION can be used in prompts
A third-party plugin noticed that using `$CMD_DURATION` in the prompt
causes problems when combined with the recent changes to tighten up
parsing of strings meant to be integer values. This fixes the problem by
ensuring the var is defined before the first interactive command is run.

See https://github.com/fisherman/dartfish/issues/7
2017-01-06 21:14:29 -08:00
Kurtis Rader
7a3e0924e0 only warn about obsolete complete flags once
It was pointed out that the previous change to alert people to the fact
their completion scripts were using flags that are no longer valid
resulted in way too many warnings. This limits the warning to one per
session.

Fixes #3640
2017-01-06 21:03:16 -08:00
Fabian Homborg
fc81fa6abf Start 2.5b1 CHANGELOG 2017-01-06 17:41:03 +01:00
Fabian Homborg
af022728bd Document complete-and-search moving backwards in pager
This isn't _clean_, but making a real binding that moves backwards if
in pager and does something else if not is more work.

Fixes #3703.
2017-01-06 16:13:01 +01:00
Fabian Homborg
5ca63c4956 dirs: Stringify
Two useless forks plus one per element in $dirstack.
2017-01-06 16:13:01 +01:00
Fabian Homborg
a070dffc4e Merge pull request #3666 from drwilly/master
mixed bag of shell scripting improvements
2017-01-06 16:10:03 +01:00
Kurtis Rader
f0515d0caa improve wording of error message
Zanchey proposed this improved wording in feedback to PR #3658.
2017-01-05 12:09:29 -08:00
Fabian Homborg
1f836f72b3 pushd: Use $PWD instead of command pwd
Useless forks.
2017-01-05 01:49:44 +01:00
dareg
89e48ba0b3 Add completion for the changelog subcommand 2017-01-03 20:59:18 -08:00
Kurtis Rader
b118ed69d3 convert narrow stderr output to wide forms
On some platforms, notably GNU libc, you cannot mix narrow and wide
stdio functions on a stream like stdout or stderr. Doing so will drop
the output of one or the other. This change makes all output to the
stderr stream consistently use the wide forms.

This change also converts some fprintf(stderr,...) calls to debug()
calls where appropriate.

Fixes #3692
2017-01-03 16:14:42 -08:00
Oliver Gondža
dddbdddcff Avoid using empty description for complete in maven completion 2017-01-03 16:57:12 +01:00
Kurtis Rader
05f19ad09c clarify autoloading and aliases
Another dev pointed out my previous attempt to resolve issue #3612 did
not do a good job of clarifying the matter. Hopefully this change is
better at explaining why autoloading is not applicable to aliases.
2017-01-02 17:15:18 -08:00
Kurtis Rader
7211802fc0 silence unused parmeter warning 2017-01-01 21:48:40 -08:00
Dale Eidd
7b906134e2 Fix commandline selection including extra character
Fixes #3684
2017-01-01 13:57:31 -08:00
Aaron Gyes
1fb92b6f8c Use new set_color features for __fish_cancel_commandline
We still apparently need to rely on tput for 'el'.
2016-12-31 06:12:05 -08:00
Anders Rasmussen
b22842a52f Add italics, dim, reverse video to set_color (#3650)
* Add italics and dim modifier to set_color

* update documentation for set_color

* add reverse mode to set_color

* Use standout mode as fallback for reverse mode

* Apply patch from @Darkshadow2 adding additional modes
2016-12-30 11:33:25 -08:00
Vedant Nevetia
834fdf8666 Fix job_t variable name inconsistency (#3685) 2016-12-29 16:09:52 -08:00
Kurtis Rader
1621fa43d8 don't mix narrow and wide stdio
Fixes #3686
2016-12-29 12:24:56 -08:00
Fabian Homborg
3da3558e35 Remove eval in __fish_complete_proc
This was completely useless.
2016-12-29 15:35:19 +01:00
Fabian Homborg
b29b026106 math: Set BC_LINE_LENGTH to a very high number
This means we no longer have to do manual stitching which improves performance.
2016-12-29 15:13:48 +01:00
Fabian Homborg
7ffcb828fe Add test for long numbers in math
This should catch the error in 26e781ef5a.
2016-12-29 14:00:15 +01:00
Fabian Homborg
11f4e64e45 Revert "Use BC_LINE_LENGTH=2 for bc."
This would fail on very long numbers, e.g.

`math "1 + 1233242342353453463458972349873489273984873289472914712894791824712941"`

would now return "42", where it previously returned the correct "1233242342353453463458972349873489273984873289472914712894791824712942".

This reverts commit 26e781ef5a.
2016-12-29 13:53:11 +01:00
Fabian Homborg
bd93a9e6ff Remove useless-use-of-echo in git_prompt 2016-12-29 13:49:21 +01:00
Aaron Gyes
aed5267fd1 Stringify __fish_git_prompt 2016-12-29 04:11:23 -08:00
Aaron Gyes
26e781ef5a Use BC_LINE_LENGTH=2 for bc.
It's not the case that macOS and old BC doesn't respect this environment
variable, just that they don't have special behavior when it's set to 0.
However, there is rather universal favorable behavior with a value of 2.

Output is of the form:
\
999999999999999999999999999999999...

with the second line being arbitrarily long. So just grab that line
instead of stitching with `string`.

This can yield a 25-30% speedup.
2016-12-29 03:47:37 -08:00
Kurtis Rader
ee6691458e clarify that aliases are not autoloaded
Fixes #3612
2016-12-28 19:44:25 -08:00
Samantha Marshall
4cd34816cf Adding subcommand completions for launchctl 2016-12-28 18:39:25 +01:00
Radomír Bosák
f9835b5077 Add support for subcommands in __fish_man_page
This commit adds a feature that after typing "git add" and pressing
"alt+h", the manpage for "git-add" instead of "git" would be displayed.

The new logic takes the first argument which doesn't start with a dash
and tries to display manpage for "command-argument"; it falls back to
"man command" it the first try doesn't succeed.

Fixes #3618.
2016-12-27 16:03:21 -08:00
Zoltán Mizsei
52c7ebe502 Haiku needs _BSD_SOURCE and <bsd/ifaddrs.h> 2016-12-27 16:00:13 -08:00
Sam H
6b536922af Append paths from /etc/manpaths and /etc/manpaths.d/* to MANPATH, for #1092.
* Only append paths if `MANPATH` is already set, to match behavior of macOS
     `path_helper` utility.
   * Use the same technique as is used above to set PATH from /etc/paths and
     /etc/paths.d/*.
2016-12-27 14:21:36 -08:00
Kurtis Rader
574424dc5a fix uvar tests
I noticed that universal variable tests were failing on Cygwin and
Dragonfly BSD. The failures were because we are attempting to verify the
correct behavior of mechanisms that are known to be broken on those
platforms. There are still uvar test failures on those platforms with
this change but they are due to actual problems rather than bugs in the
tests.

Fixes #3587
2016-12-25 21:17:27 -08:00
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
Kurtis Rader
07ef1e7c4b fix minor style nits
While investigating issue #3634 I noticed some inconsistent whitespace
that this cleans up.
2016-12-12 12:35:22 -08:00
Radomír Bosák
896b9ecc70 Add descriptions for dconf subcommands
Suggestions for the dconf command were missing descriptions (it was
marked as TODO). This commit adds them.
2016-12-12 11:56:29 +01:00
Fabian Homborg
4c7baa37a3 Add dconf completions
A configuration tool common with gnome stuff.

Fixes #3638.
2016-12-11 21:12:37 +01:00
David Adam
599089de80 fish.spec: add dependency on newer GCC on old platforms
Moving to C++11 requires a newer compiler on old systems; our Open Build
Service repository has a newer version available for RHEL 5 & 6 builds.
2016-12-11 16:58:15 +08:00
ridiculousfish
eb3ed2680b Fix macOS Xcode build
React to Solaris fixes (0019c12af3) by hiding some more
functions from macOS. The Xcode build uses special weak-linking
magic.
2016-12-10 20:48:54 -08:00
Fabian Homborg
90f7d4b081 clipboard_paste: Require non-empty clipboard contents
Fixes #3637.
2016-12-10 21:30:57 +01:00
ridiculousfish
05a640b027 Increase test coverage and improve completion commenting 2016-12-09 12:14:35 -08:00
Fabian Homborg
a8a10d634b Document *-of-buffer functions
See #3632.
2016-12-09 19:34:26 +01:00
Fabian Homborg
029d88e962 vi_cursor: Refactor detection logic
Makes it a bit easier to read.

Now we can begin reworking it (again) to make iTerm work.
2016-12-09 19:32:18 +01:00
Kurtis Rader
59fa04bd91 function for editing command line in ext editor
This implements a standard function and bindings for editing the command
line in an external editor. This feature has been requested multiple
times in the past year with various solutions cut and pasted into those
issues. This change combines the best aspects of those solutions.

Fixes #1215
2016-12-08 19:17:09 -08:00
Kurtis Rader
0019c12af3 changes to allow building on Solaris 10
Fixes #3456
2016-12-08 19:15:11 -08:00
ridiculousfish
8e1661cd22 Add a test for complete and -- 2016-12-08 02:00:24 -08:00
Kurtis Rader
b48b2ddfb2 fix extraction of LS_COLORS
Strip surrounding quotes if present.

Fixes #3630
2016-12-07 14:22:42 -08:00
Kurtis Rader
d0077d0910 fix default binding documentation
Several uses of @key{Alt,x} incorrectly used uppercase "X" where the
binding is only for the lowercase "x".
2016-12-06 21:04:05 -08:00
Kurtis Rader
e79d42aa52 fix handling dircolors output on Cygwin
Fixes #3563
2016-12-04 18:47:39 -08:00
Kurtis Rader
7bb3bf7c74 fix regression from commit 20bcbcc2
There were two places in the code that used the anti-pattern of
returning True on success else an error message. In python you should
always be able to replace `if x == True:` with just `if x:`. Which is
what the lint tool recommended. Unfortunately I didn't notice how the
return value was being used. This fixes that by changing the two
affected functions to return an error message or None on success.

This also adds `from __future__ import print_function` since the code
uses the `print(msg)` function form rather than the `print msg`
statement form. The former works by accident on python2 because the
parens are interpreted as creating parenthesized expression that
devolves to the single string inside the parens. So while the future
import isn't strictly speaking necessary it will help avoid mistakes in
the future if more complex `print()` calls are added.

Partial fix for #3620
2016-12-04 16:01:32 -08:00
David Adam
41acaced3f webconfig: separate arguments to abbr
`abbr` used to take a single argument and split in on the first space,
but 309e10e7 and predecessors altered this behaviour. Update the web
config use of abbr to the newer format.

Fixes #3620.
2016-12-04 21:32:49 +08:00
Kurtis Rader
42eaacd3a1 enable make style-all doing fish scripts
I had disabled having `make style-all` restyling fish scripts because a
majority of them did not conform to the style enforced by `fish_indent`.
I recently restyled most of the fish scripts with the exception of the
completion scripts. So this re-enables restyling all scripts with the
exception of completion scripts.
2016-12-03 20:39:32 -08:00
Kurtis Rader
9443a415bf time for another make style-all 2016-12-03 20:12:53 -08:00
Kurtis Rader
45d3a705be fix bug introduced by commit eaa37413
When I refactored the code to reduce redundancy and improve the error
messages when the config or data directories could not be used I botched
the customization of the $HOME based data path.
2016-12-03 18:38:00 -08:00
Maciej Ostaszewski
4288db9d39 correct option for bc completion 2016-12-04 00:22:31 +01:00
ridiculousfish
8324893565 Update osx/config.h with HAVE_FLOCK macro
flock() is available on OS X
2016-12-03 13:46:10 -08:00
ridiculousfish
41d4058156 Merge branch 'cleanup_pager'
Fixes those ugly compiler warnings in the pager
2016-12-03 13:41:30 -08:00
ridiculousfish
ed85393611 Restyle pager.cpp via make style 2016-12-03 13:38:50 -08:00
ridiculousfish
ffd4754cb2 Don't show the pager on terminals of height less than 4
Prevents some potential overflow bugs and janky UI
2016-12-03 13:35:24 -08:00
ridiculousfish
54dd4b7ed6 Untangle some pager code and fix some warnings
Fixes various warnings about implicit conversions
2016-12-03 13:29:16 -08:00
ridiculousfish
8041913e7a Stop including spacer width in width_by_column in pager
Additional refactoring to remove some sketchy-looking arithmetic
2016-12-03 13:29:16 -08:00
ridiculousfish
2d5ce72cb4 Remove the min_width parts of the pager
min_width dates back to the original full-screen pager.
After some careful inspection, the code path that uses min_width
is never executed and so the min_width machinery is useless.
Let's remove it!
2016-12-03 13:29:16 -08:00
ridiculousfish
d058d290be Factor pref_width into a function preferred_width()
Beginnings of some pager cleanup
2016-12-03 13:29:16 -08:00
ridiculousfish
85d697f13d Add some pager layout test cases
Helps ensure correct truncation logic
2016-12-03 13:29:16 -08:00
ridiculousfish
754b78a748 Suppress certain stderr-printing during tests
Tests that exercise error paths may result in output to
stderr. This may make it look like the test failed when it did
not. Introduce should_suppress_stderr_for_tests() to suppress
this output so the test output looks clean.
2016-12-03 13:27:50 -08:00
Radomír Bosák
254762f30f Fix status code when bad command name is entered
This commit fixes a bug which causes that

   fish -c ')'; echo $status

("Illegal command name" error) returns 0. This is inconsistent with
e.g. when trying to run non-existent command:

   fish -c 'invalid-command'; echo $status

("Unknown command" error) which correctly returns 127.

A new status code,

    STATUS_ILLEGAL_CMD = 123

is introduced - which is returned whenever the 'Illegal command name *'
message is printed.

This commit also adds a test which checks if valid commands return 0,
while commands with illegal name return status code 123.

Fixes #3606.
2016-12-03 13:14:40 -08:00
David Adam
bf53f39cdd cppcheck: warn on use of flock 2016-12-03 16:36:06 +08:00
David Adam
2b0bad889a configure: force use of -pthread on Solaris
This fixes a problem with non-threadsafe errno.

Ideally, this would be the use of the AX_PTHREAD macro, but it is GPL 3+
only, which is incompatible with the GPL 2 license of fish. It also
would need extending to cover C++.

For now, fish doesn't build on anything except GCC under Solaris anyway,
so `-pthread` is the right thing to use.

Work on #3340.
2016-12-03 16:36:06 +08:00
David Adam
ee15f1b987 configure: check that errno is threadsafe
Without `-pthread` specified to the compiler, errno is not threadsafe on
Solaris (as _REENTRANT is undefined, and _POSIX_C_SOURCE may not be set
until after the inclusion of <errno.h>).

Work on #3340.
2016-12-03 16:36:06 +08:00
David Adam
3289797248 flock fallback: remove noop path
"fail to no locking" is not an ideal strategy.
2016-12-03 16:36:06 +08:00
David Adam
2b7dddf342 add flock fallback
Import the flock compatibility wrapper from NetBSD.

Work on #3340.
2016-12-03 16:36:06 +08:00
David Adam
1293cd8b6a Check for functions in std namespace
On Solaris, some standard wide character functions are only contained in
the std:: namespace. The configure script now checks for these, enabling
the appropriate `uses` statements in src/common.h.

The checks are handwritten, because Autoconf's AC_CHECK_FUNC macro
always uses C linkage, but the problem only appears under C++ linkage.

Work on #3340.
2016-12-03 16:36:06 +08:00
David Adam
417255fc55 Makefile: skip the open manpage on OS X
This is normally handled by the build_documentation.sh script, but if
the tarball includes the documentation then that script is never run.

We should do it in both places as the Xcode build uses only the
build_documentation.sh script!

Fixes #2561.
2016-12-03 12:44:35 +08:00
Kurtis Rader
d73ff39393 fish vi mode cursor shape on iTerm2
Fixes #3593
2016-12-02 19:49:15 -08:00
ridiculousfish
227ba10628 Add -Wno-unreachable-code to PCRE in Xcode build
Prevents an annoying warning from the PCRE build
in Xcode
2016-12-02 15:48:18 -08:00
David Adam
15921d37c4 debian packaging: avoid autoreconf on old platforms
The autoreconf step requires a newer version of automake than is
available on older versions of Debian and Ubuntu; avoid the autoreconf
step on these platforms for now.
2016-12-02 15:40:20 +08:00
Kurtis Rader
eaa3741336 improve error msg about invalid HOME/XDG_* var
This change increases the amount of useful information when fish is
unable to create or use its config or data directory. We now make it
clear when neither var is set or one is set to an unusable location.

Fixes #3545
2016-12-01 20:40:25 -08:00
Fabian Homborg
422ff0f173 Don't paste if xsel fails
This silences a rather verbose error.
2016-12-02 01:29:58 +01:00
Michael Steinert
e2ed561264 Fixes behavior of 'x' in normal mode
After 'x' is used to delete a character at the end of a line the cursor
should be repositioned at the last character, i.e. repeatedly pressing
'x' in normal mode should delete the entire string.
2016-12-01 16:23:59 -08:00
Radomír Bosák
1fbcb1ee9d Add the possibility to rename abbreviations
The abbr function doesn't have the possiblity to rename abbreviations.
You have to delete the old one and create a new one. This commit adds
this functionality and uses the syntax:

abbr -r OLD_KEY NEW_KEY

Fixes #2155.
2016-12-01 14:42:20 -08:00
David Adam
a0d9db94cb osx/config.h: update to match current configure output 2016-11-30 18:50:23 +08:00
Aaron Gyes
6a5a1a8964 [[noreturn]] instead of __attribute__ ((noreturn))
C++11 does this, better to use a standard attribute than a compiler
extension.
2016-11-29 01:41:03 -08:00
Aaron Gyes
a8b2da8405 Use early returns throughout builtin_cd and fix my no-HOME output. 2016-11-28 23:59:37 -08:00
Kurtis Rader
7cfe028b9d fix functions --copy
Fixes #3601
2016-11-28 18:04:37 -08:00
Kurtis Rader
1ca1667786 fix bug introduced by fish_indent
Commit 11a60c8 restyled all the fish scripts using fish_indent. Sadly a
bug in fish_indent did not correctly reformat an unusual structure.
2016-11-28 17:13:01 -08:00
Kurtis Rader
c8d2e6d972 two more tests of VTE_VERSION that need protection 2016-11-28 14:39:41 -08:00
David B. Lamkins
ca33bbd4e0 Eliminate spurious startup message when $VTE_VERSION is unset. 2016-11-28 14:36:20 -08:00
Aaron Gyes
f47ebc4b1c builtin cd: Handle unset HOME. 2016-11-28 12:40:55 -08:00
Aaron Gyes
682af2f83f Remove 4 cppcheck suppressions reported unmatched. 2016-11-28 11:54:03 -08:00
Aaron Gyes
7c6527e9cf Fix segfault with bad USER and unset HOME
A couple things went wrong with `env -u HOME USER=x ./fish -c ''`
We failed to check that `pw` isn't NULL leading to a crash when USER is
bogus. After fixing that we were not left with both variables in a
correct state still.

We now go back and force fish to dig up a working USER when we notice
this and then get both set successfully. Fixes #3599
2016-11-28 09:34:56 -08:00
Aaron Gyes
121109ee4d Adds a --quiet/-q option for command -s (#3591)
devnull'ing this builtin to check presence is a common
enough chore that a --quiet option which works like it does on
`type` would be handy.
2016-11-28 07:26:01 -08:00
Kurtis Rader
11a60c8374 reformat all fish scripts
I hate doing this but I am tired of touching a fish script as part of
some change and having `make style` radically change it. Which makes
editing fish scripts more painful than it needs to be. It is time to do
a wholesale reformatting of these scripts to conform to the documented
style as implemented by the `fish_indent` program.
2016-11-27 21:27:22 -08:00
Kurtis Rader
54a76bb9e5 emit error message when test is given invalid int
This augments the previous change for issue #3346 by adding an error
message when an invalid integer is seen. This change is likely to be
controversial so I'm not going to squash it into the previous change.
2016-11-27 20:37:30 -08:00
Kurtis Rader
2f33c24a07 fix handling of odd strings by test builtin
The `test` builtin currently has unexpected behavior with respect to
expressions such as `'' -eq 0`. That currently evaluates to true with a
return status of zero. This change addresses that oddity while also
ensuring that other unusual strings (e.g., numbers with leading and
trailing whitespace) are handled consistently.

Fixes #3346
2016-11-27 20:37:21 -08:00
Aaron Gyes
d0146d7b6f builtin test: output correct program name on error
Only in one instance would test as `[` have the the errors formatted
as "[: foo". This fixes that. When trying to track down the source of
an error this could lead someone astray.
2016-11-27 20:28:38 -08:00
Fabian Homborg
9ad1b86e4e Reset bindings if the new value was bogus.
See #3590.
2016-11-27 14:17:24 +01:00
Aaron Gyes
f63c8a703e 'test' completions: comment out entries
Our builtin doesn't do some of this stuff. See #3589
2016-11-27 03:05:11 -08:00
Aaron Gyes
4f6ac06b21 Don't automatically generate completions without python
This is doomed to cause a messy error on every launch on any systems
that are using fish without python installed. Fixes #3588
2016-11-27 02:00:21 -08:00
Aaron Gyes
18cc06b38f Don't no-op terminal.app title if it's customized
We only want to override the internal fish hardcoded title.
Fixes #3578
2016-11-26 20:02:51 -08:00
ridiculousfish
c1d4c07548 Update Xcode project for Xcode 8.1 2016-11-26 16:25:55 -08:00
ridiculousfish
e97c5b552c Update make_tarball.sh to run autoreconf instead of autoconf
This is necessary as part of the autotools build changes
for C++11
2016-11-26 15:02:19 -08:00
ridiculousfish
9588c9a811 Teach make distclean to delete autom4te.cache aclocal.m4 2016-11-26 14:58:31 -08:00
ridiculousfish
94ef40fb19 Add aclocal.m4 to .gitignore 2016-11-26 14:46:28 -08:00
ridiculousfish
87b0d1b828 Merge pull request #3585 from fornwall/build-without-shmem
Fix build on systems without shm_open()
2016-11-26 14:38:07 -08:00
ridiculousfish
38ea6e088e Don't invoke make in pcre directory unless it has a Makefile
make clean was outputting misleading messages due to our
recursive invocation of make in the pcre directory, even if
that directory has no Makefile. This can easily come about if
the ./configure script determines we have a system installed PCRE.

This change simply checks for the presence of the Makefile in
the PCRE directory before invoking recursive make, for the clean
and distclean targets.

Fixes #3586
2016-11-26 14:33:15 -08:00
ridiculousfish
0eda4020a2 Update README to describe automake dependency 2016-11-26 14:03:31 -08:00
Patrick Häcker
ded6e726e5 Output current default priority in dpkg-reconfigure completion
This might be a bit over the top, but getting the information that a default priority threshold is used without knowing what that value is or how to find out might not be so useful after all. Thus, change the completion to include this information dynamically.
2016-11-26 22:53:54 +01:00
ridiculousfish
df55991806 Teach ./configure to rerun autoreconf --no-recursive
Currently, the ./configure script generated by autotools will
test if the configure.ac script is newer than its output configure
script, and if so, run autoconf to rebuild it. However autoconf
is no longer sufficient because we have some m4 macros. So now
run autoreconf --no-recursive (per #3572)
2016-11-26 13:17:23 -08:00
ridiculousfish
73bd7c51cf Update README to describe C++11 support 2016-11-26 13:16:50 -08:00
Fredrik Fornwall
df12ac24b2 Fix build on systems without shm_open()
Notably, this fixes building on Android.
2016-11-26 16:14:15 -05:00
ridiculousfish
fb63bee322 Merge branch 'cpp11'
Defaults fish to build as C++11 by default.
See #3572.
2016-11-26 13:10:00 -08:00
ridiculousfish
c7a016a137 Enable C++11 in 'make lint'
autotools implements C++11 support by setting $CXX to
"g++ -std=c++11", so we have to make sure to quote $CXX when
passing it to the linter script
2016-11-26 12:59:00 -08:00
ridiculousfish
3a03d5df53 Enable C++11 in Xcode build
This commit does a few things:
  - Switches to C++11 as the language dialect
  - Eliminates the Release_C++11 configuration (now C++11 is default)
  - Switches to libc++ from libstdc++, since the libstdc++ that ships
    with Xcode does not support C++11
2016-11-26 12:59:00 -08:00
ridiculousfish
f0ba37b73a Enable C++11 in autotools build 2016-11-26 12:59:00 -08:00
Kurtis Rader
a928517e95 improve converting strings to ints/longs
The existing code is inconsistent, and in a couple of cases wrong, about
dealing with strings that are not valid ints. For example, there are
locations that call wcstol() and check errno without first setting errno
to zero. Normalize the code to a consistent pattern.  This is mostly to
deal with inconsistencies between BSD, GNU, and other UNIXes.

This does make some syntax more liberal. For example `echo $PATH[1 .. 3]`
is now valid due to uniformly allowing leading and trailing whitespace
around numbers. Whereas prior to this change you would get a "Invalid
index value" error. Contrast this with `echo $PATH[ 1.. 3 ]` which was
valid and still is.
2016-11-25 18:52:15 -08:00
David B. Lamkins
5ec9fcd8d4 Allow browser for help to be chosen indenpendent of $BROWSER. 2016-11-25 18:35:22 -08:00
Valentin Hăloiu
ed5f90d22e Update key binding docs to reflect actual behavior
Some key bindings were updated in fish 2.4.0 but in some cases the
documentation does not correctly reflect the actual behavior. This
commit attempts to fix that.
2016-11-24 18:58:08 -08:00
Harm Aarts
5cfd3eb63a Update LXD completions. 2016-11-23 23:48:01 +01:00
Kurtis Rader
aad2848e80 use consistent mechanism to validate var names
Builtin commands that validate var names should use a consistent
mechanism. I noticed that builtin_read() had it's own custom code that
differed slightly from wcsvarname().

Fixes #3569
2016-11-22 16:18:20 -08:00
Kurtis Rader
320cb6857f an invalid flag to function is handled wrong
Specifically, an invalid flag keeps the function from being defined but
does not emit an error message.

Fixes #2827
2016-11-22 16:17:51 -08:00
Kurtis Rader
9ac78e06b4 fix builtin ulimit arg handling
Fixes #3570
2016-11-21 21:15:59 -08:00
Aaron Gyes
93e6f57dfc Run make depend
Some object file dependencies have changed.
2016-11-20 20:38:52 -08:00
Kurtis Rader
45c7836bec remove is_wchar_ucs2()
My previous change removed one place where is_wchar_ucs2() was used and
replaced it with compile time tests. This change does the same for the
other uses.
2016-11-20 18:25:49 -08:00
Kurtis Rader
b8778ba4a2 make fish_tests work on MS Windows with C++11
On Cygwin there are two narrowing conversions at line 931 in
src/fish_tests.cpp due to the code assuming a wchar_t is four bytes.
Obviously that's wrong but only became an issue with the pending change to
switch to C++11. The problematic values aren't actually used on Windows
because the tests that would use them are bypassed if is_wchar_ucs2()
returns true. This change predicates that code on a compile time rather
than a run time test.
2016-11-20 18:05:34 -08:00
Kurtis Rader
b16511344e fix incorrect pointer to int comparison
This came to my attention while testing the PR that switches us to the
C++11 standard and one of the compilers reported this error.
2016-11-20 15:04:51 -08:00
Aaron Gyes
1054a2fd36 Makefile.in: fix output alignment spacing 2016-11-20 14:38:02 -08:00
ridiculousfish
b86b84e2a9 L'\0' is not a pointer, don't compare it to one
Compare to NULL instead. Comparison with original code
shows this is what is intended.
2016-11-20 00:30:55 -08:00
ridiculousfish
52d1b6b97d Remove some dead functions
icompare_pred and icompare in history.cpp are unused
2016-11-19 23:12:49 -08:00
ridiculousfish
9b4310b10f Ensure we clear first_unwritten_new_item_index after history::merge
Prevents an issue where we think we've written out history items,
but we haven't, and so they get lost. Fixes #3496
2016-11-19 22:40:50 -08:00
Aaron Gyes
13a4ef80b3 Nuke spurious newline of shell exit.
Nobody has any idea why it's here, and it is mildy annoying to some
users, so let's remove it. Fixes #3502
2016-11-19 16:00:54 -08:00
ridiculousfish
0de2a1072f Fix a pair of implicit conversion warnings 2016-11-19 15:45:08 -08:00
maxried
2e5693a6bc Fix erroneous \t in sysctl completion (#3562)
The last commit to this auto completion changed it to use `string replace` instead of `tr`. Unfortunately they do not behave the same. `tr " = " "\t"` replaces " = " with a tabulator character, while `string replace -a " = " "\t"` replaces it with \t. Either `string` is misbehaving or this auto completion was broken.
2016-11-18 11:10:09 -08:00
Fabian Homborg
acc2353328 vi_cursor: For TERM = xterm require another condition
We cannot just use TERM = xterm and defined Ss sequence, as some old
vte-based terminals are still in the wild that don't support the
sequence and don't have $VTE_VERSION set.

I have tested this on

- konsole - supported and works ($KONSOLE_PROFILE_NAME)
- new xterm - supported and works ($XTERM_VERSION)
- lxterminal-gtk3 - supported and works ($VTE_VERSION)
- new gnome-terminal - supported and works ($VTE_VERSION)
- lxterminal-gtk2 - not supported and deactivated (no $VTE_VERSION)
- tmux in konsole - works
- tmux in lxterminal-gtk2 - deactivated

and for all supported ones with the respective variable erased, to see
that it is deactivated.

Fixes #3499.
2016-11-18 19:24:29 +01:00
Olivier Perret
8423345e09 Add completions for mkvextract (#3492)
* add completions for mkvextract

* fix edge cases with option placement in mkvextract.fish

* improve resiliency to errors in mkvextract.fish

* minor fixes in mkvextract.fish
2016-11-18 14:39:20 +01:00
Harm Aarts
36d4283d17 Add LXC/LXD completions.
At the moment this covers only the most basic use cases.
Texts are taken from `lxc help` command.
2016-11-18 12:27:29 +01:00
Kurtis Rader
acd8363c38 allow complete -d ''
There isn't a good reason to disallow an explicitly empty completion
description. Since I'm touching the code also modify the argument
parsing the match the style of most of the builtins.

Fixes #3557.
2016-11-17 14:53:50 -08:00
Kurtis Rader
e8a31a13a1 make it easy to get the legacy hybrid key bindings
The changes related to issue #3068 removed most of the emacs bindings
from vi mode. However, since fish 2.4.0 was released several people have
pointed out that the directions for reinstating the legacy hybrid key
bindings don't work. This change fixes that and makes it easier to use
the legacy hybrid bindings.

Fixes #3556
2016-11-16 22:45:00 -08:00
Fabian Homborg
3e82be4ac2 vi_cursor: Set required VTE version to 4000
It seems the changelog entry for 1910 was misleading.

Fixes #3499.
2016-11-16 22:43:33 +01:00
Kurtis Rader
521546a986 fix some lint warnings
This fixes some of the IWYU and cppcheck lint warnings. And only on
macOS (formerly OS X). Fixing these types of warnings on a broader set
of platforms should be done but this is a baby step to making `make
lint-all` have few, if any, warnings. This reduces the number of lines
in the `make lint-all` output on macOS by over 500 lines.
2016-11-15 21:15:22 -08:00
Kurtis Rader
708f80d855 handle unexpected args to binding mode functions
Fixes #3472
2016-11-15 18:44:20 -08:00
Kurtis Rader
8645aa94c8 improve linting tool
I found that after fixing the args to `cppcheck` it started reporting
lots of varFuncNullUB warnings. Suppress them as they should be safe to
ignore. Also, improve the readability of the script.
2016-11-14 19:20:12 -08:00
Kurtis Rader
043725cdd5 fix the style of fish_default_key_bindings.fish 2016-11-13 13:39:55 -08:00
Kurtis Rader
209a2576cd fix using external realpath command
Fixes #3489
2016-11-13 13:34:19 -08:00
Kurtis Rader
5284a133b0 silence "parameter 'notifier' is unused." 2016-11-11 21:07:30 -08:00
Kurtis Rader
2d26a262e7 make cppcheck useful again 2016-11-11 20:48:34 -08:00
Kurtis Rader
2e81ade66a don't use set_color reset
There was a discussion recently on Gitter about `set_color reset`. The
result was @floam creating commit bd03c3fbc to change it to `set_color
normal` in share/functions/vared.fish. This does the same for
tests/test_util.fish.
2016-11-11 19:07:52 -08:00
Kurtis Rader
5eb1ef4b4a use enum_map for parser enums
This simplifies the parsing code slightly and makes it more consistent
with how we deal with enums in the *builtin.cpp* module.
2016-11-11 18:56:56 -08:00
Kurtis Rader
5d6415b6bf use binary search for enum map lookups
Switch from a linear to a binary search when looking for a matching
string in an enum map. Testing shows this is a little more than twice as
fast when searching for keywords in the sixteen entry keyword_map array.
This speedup doesn't matter much when searching for subbcommands but any
slow down in the parser is unacceptable.
2016-11-11 18:02:43 -08:00
Aaron Gyes
bd03c3fbc5 vared.fish don't use undocumented 'reset' color
... there is no practical difference in behavior using this here
and it is not documented.
2016-11-11 14:08:28 -08:00
Kurtis Rader
20bcbcc252 fix webconfig.py lint issues 2016-11-10 16:23:08 -08:00
Kurtis Rader
47a9f99523 more robust fish_config IPv6 detection
Fixes #3530
2016-11-10 15:43:59 -08:00
David Adam
7356987e6e debian packaging: soften xdg-utils recommendation to suggestion
Closes #3534
2016-11-09 23:07:11 +08:00
Kurtis Rader
6518b6c6b7 make subcommand lookups table driven
I'm going to use the same mechanism elsewhere such as token_type_map
in src/parse_tree.cpp. But this change only affects the recently
introduce subcommand handling for the history and status commands.
2016-11-08 15:30:52 -08:00
Aaron Gyes
d5462fb3d7 Update issue template for 2.4.0 2016-11-08 14:04:34 -08:00
David Adam
d7283cdaa1 Merge branch 'Integration_2.4.0' 2016-11-08 12:06:15 +08:00
David Adam
54360d8cfe Bump version for 2.4.0 2016-11-08 11:20:54 +08:00
David Adam
0b0d0e7799 CHANGELOG: updates for 2.4.0 2016-11-08 11:20:50 +08:00
Kurtis Rader
609100c196 detect if the magic fish wide chars can be encoded
Verified on Cygwin on MS Windows 7 when invoked as
`env LANG=zh_CN.GBK@cjknarrow fish`. No regression seen
when run on other systems with UTF-8 locales.

Fixes #3503
2016-11-07 13:19:09 -08:00
Kurtis Rader
9e922a6e02 make status saner vis-a-vis arg parsing
The `status` command currently silently allows incompatible flags (i.e.,
subcommands). Too, using flags to specify subcommands misleads the user
into thinking they can specify multiple subcommands.

We recently modified the `history` command to deprecate using flags for
subcommands. This change does the same for the `status` command.

Fixes #3509
2016-11-07 12:11:08 -08:00
Colin Marquardt
a275618589 Typofix: shoe -> show 2016-11-07 09:46:07 -08:00
Kurtis Rader
83c7931afb treat TERM "tmux" the same as "screen"
To the extent that fish special-cases TERM values relevant to the
`screen` program it should do the same for the `tmux` program.

Fixes #3512
2016-11-06 20:27:48 -08:00
Kurtis Rader
1155c4b413 silence false positive errors from some compilers
Fixes #3529
2016-11-06 17:48:26 -08:00
Fabian Weisshaar
7a1146ebb5 add caffeinate completion, see #3525 2016-11-06 05:43:45 -08:00
Fabian Weisshaar
180c211dd2 add mdimport completion 2016-11-06 05:43:45 -08:00
Fabian Weisshaar
848495d4cf add mddiagnose completion 2016-11-06 05:43:45 -08:00
Fabian Weisshaar
87c51f2c10 add tmutil completion 2016-11-06 05:43:45 -08:00
Fabian Weisshaar
b41fced062 add mdfind completion 2016-11-06 05:43:45 -08:00
Fabian Weisshaar
71e835feec add mdls completion 2016-11-06 05:43:45 -08:00
Fabian Weisshaar
313cb0d248 add mdutil completion 2016-11-06 05:43:45 -08:00
Fabian Weisshaar
0c4ede5627 add nvram completion 2016-11-06 05:43:45 -08:00
Aaron Gyes
034aaaa62b cppcheck: incorrect printf specifiers 2016-11-06 04:29:47 -08:00
Aaron Gyes
839cd2a1c7 lint.fish: fix line number display 2016-11-05 15:38:49 -07:00
Aaron Gyes
adba0550d5 lint.fish: colorize cppcheck output 2016-11-05 15:37:19 -07:00
Aaron Gyes
6d1c127687 Enable LTO for fish.app release builds.
Shaves 2MB off app bundle size
2016-11-05 12:21:22 -07:00
Kurtis Rader
7cca963b8f lint all programs on macOS 2016-11-04 20:12:51 -07:00
Kurtis Rader
1fb8f4e277 lint: misc cleanups
Earlier lint cleanups overlooked a couple of modules because on macOS at
the moment oclint ignores them. I noticed this when I ran `make lint-all`
on Ubuntu.
2016-11-04 20:12:51 -07:00
Kurtis Rader
98863541c3 lint: prefer early exits and continue
Fix a location I missed in my earlier cleanup regarding early exits.
2016-11-04 20:12:51 -07:00
Aaron Gyes
87bfd1a01e Revert "Add a fish_key_reader wrapper"
This reverts commit c02f5ceb0f.
2016-11-04 19:08:48 -07:00
Aaron Gyes
95385eda80 Create a fish_key_reader wrapper ala fish_indent
Needed for fish_key_reader to work in a .app bundle without
fish previously installed.

I just copied fish_indent.fish and s/indent/key_reader
2016-11-04 19:07:37 -07:00
Aaron Gyes
c02f5ceb0f Add a fish_key_reader wrapper
This will be necessary for fkk to work when one is using the .app
bundle and has not installed fish otherwise.

I just copied fish_indent.fish.
2016-11-04 19:05:10 -07:00
Aaron Gyes
4ba1f9e398 Include fkk with fish.app 2016-11-04 18:56:57 -07:00
Aaron Gyes
294e78205c Allow xcode to build fish_key_reader 2016-11-04 18:50:37 -07:00
Aaron Gyes
d437a84828 Fix two xcode warnings
An unused macro and a documentation error.
2016-11-04 18:11:37 -07:00
Aaron Gyes
2f28e96956 Fix fish_tests xcode target 2016-11-04 17:55:51 -07:00
Manzur Mukhitdinov
00a8766635 auto-complete for sysbench (0.4.12)
SysBench is a modular, cross-platform and multi-threaded benchmark tool for
evaluating OS parameters that are important for a system running a database
under intensive load
2016-11-04 22:22:12 +01:00
Fabian Weisshaar
097d2246c2 add dig completion 2016-11-04 22:19:55 +01:00
Kurtis Rader
23c3101440 lint: goto and dead code 2016-11-03 16:53:58 -07:00
Kurtis Rader
003ea83410 lint: too few branches in switch statement 2016-11-03 16:41:51 -07:00
Kurtis Rader
de87419df9 lint: multiple unary operator 2016-11-03 16:37:26 -07:00
Kurtis Rader
4e505efc50 lint: redundant if statement 2016-11-03 16:32:27 -07:00
Kurtis Rader
b7d910a941 lint: long variable name 2016-11-03 16:19:41 -07:00
Kurtis Rader
f05fe4e292 lint: problems with default in switch statements 2016-11-03 16:19:41 -07:00
Patrick Häcker
72e687296b Create autocompletion for dpkg-reconfigure
The dpkg-reconfigure command is used on Debian and Ubuntu based systems to reconfigure packages.

According to the relevant manpage's the commited completion file should be complete.
2016-11-03 13:14:28 +01:00
Fabian Homborg
c9c311fbdb fish_vi_cursor: Ignore errors from tput
Fixes #3519.

(cherry picked from commit b9b66791c1)
2016-11-03 15:41:16 +08:00
Fabian Homborg
b9b66791c1 fish_vi_cursor: Ignore errors from tput
Fixes #3519.
2016-11-03 08:34:55 +01:00
Kurtis Rader
9b0d45d4fa lint: unnecessary else statement 2016-11-02 14:44:27 -07:00
Kurtis Rader
5709c81fe0 lint: empty while statement 2016-11-02 14:22:34 -07:00
Kurtis Rader
e35b91d38c lint: empty else block 2016-11-02 14:17:26 -07:00
Kurtis Rader
4f4d34e664 lint: missing break in switch statement 2016-11-02 14:07:12 -07:00
Kurtis Rader
f6047f02d6 lint: constant conditional operator 2016-11-01 21:19:34 -07:00
Kurtis Rader
71e69b6d75 lint: empty if statement 2016-11-01 20:42:02 -07:00
Kurtis Rader
60c47deca9 lint: avoid branching statement as last in loop 2016-11-01 20:00:09 -07:00
Kurtis Rader
c10952c354 lint: fish_indent all sample prompts 2016-11-01 19:19:45 -07:00
Kurtis Rader
e73226d7e8 lint: unused parameter 2016-11-01 19:12:39 -07:00
Aaron Gyes
19e12e3747 Revert mistaken file inclusion.
I was testing command descriptions and mistakenly left in a bogus file.
2016-10-31 23:46:40 -07:00
Aaron Gyes
e4ce5ca24f Revert "sorin right prompt: reset color at end"
This reverts commit 9701d5cc7b.
2016-10-31 23:43:46 -07:00
Aaron Gyes
01fb830bf5 Revert "Sorin prompt: updates"
This reverts commit c18614552d.
2016-10-31 23:43:20 -07:00
Aaron Gyes
edcf15e3d7 Sorin prompt: updates
Use $USER, prompt_hostname, string
Update to use correct color names such as magenta over purple.
Use bright color variants instead of bold in some cases.
2016-10-31 23:41:04 -07:00
Aaron Gyes
9f05697dcc sorin right prompt: reset color at end
bold mode being left enabled was causing issues in the pager.
2016-10-31 23:40:29 -07:00
Aaron Gyes
c18614552d Sorin prompt: updates
Use $USER, prompt_hostname, string
Update to use correct color names such as magenta over purple.
Use bright color variants instead of bold in some cases.
2016-10-31 23:29:50 -07:00
Aaron Gyes
9701d5cc7b sorin right prompt: reset color at end
bold mode being left enabled was causing issues in the pager.
2016-10-31 21:28:05 -07:00
Kurtis Rader
50fc3d72df lint: Use early exit/continue 2016-10-31 18:17:38 -07:00
Kurtis Rader
feaeca4999 lint: Use early exit/continue 2016-10-31 18:17:38 -07:00
Kurtis Rader
d4fb9a0e65 lint: Use early exit/continue 2016-10-31 18:17:38 -07:00
Kurtis Rader
2c38978115 lint: Use early exit/continue 2016-10-31 18:17:37 -07:00
Kurtis Rader
520f810bf9 lint: Use early exit/continue 2016-10-31 18:17:37 -07:00
Kurtis Rader
d441de33e5 lint: Use early exit/continue 2016-10-31 18:17:37 -07:00
Kurtis Rader
46b791240a lint: Use early exit/continue 2016-10-31 18:17:33 -07:00
Kurtis Rader
3bd24ddb17 lint: Use early exit/continue 2016-10-31 18:14:57 -07:00
Kurtis Rader
26c1430e82 lint: Use early exit/continue 2016-10-31 18:05:10 -07:00
Kurtis Rader
6c3900ff64 lint: Use early exit/continue 2016-10-31 18:05:10 -07:00
Kurtis Rader
6192e2453e lint: Use early exit/continue 2016-10-31 18:05:09 -07:00
Kurtis Rader
eab836864e lint: Use early exit/continue 2016-10-31 18:05:01 -07:00
Kurtis Rader
225caa2fe8 lint: Use early exit/continue 2016-10-31 18:03:03 -07:00
Kurtis Rader
4fe2a2921f lint: Use early exit/continue 2016-10-31 18:00:59 -07:00
Kurtis Rader
7779132595 lint: Use early exit/continue 2016-10-31 17:58:41 -07:00
Kurtis Rader
ca5a4ec1d5 lint: Use early exit/continue 2016-10-31 13:29:10 -07:00
Kurtis Rader
49ed20c8cb lint: Use early exit/continue 2016-10-31 13:29:10 -07:00
Aaron Gyes
a5f6382d77 Update changelog 2016-10-31 12:03:09 -07:00
Aaron Gyes
b2f047421d Supress fish_title only for Terminal.app
VTE terminals apparently do not use the OSC sequence to compose
title components.
2016-10-31 12:00:44 -07:00
Aaron Gyes
dfe7813c02 Fix Terminal.app title
Defining fish_title here is too late because there will already be a
title set. Work around issue by clearing it at same time.
2016-10-31 12:00:44 -07:00
David Adam
ddbf63c46f CHANGELOG: updates for 2.4.0 2016-10-31 22:35:36 +08:00
Fabian Homborg
c8fe0e53dd Rework cursor detection
Fixes #3499.

(cherry picked from commit 2a5ad198bf)
2016-10-31 21:52:50 +08:00
Fabian Homborg
7bcae09674 Disable vi-cursor on xterm < 282
Fixes #3499.

@zanchey: This is for integration-2.4.0.

(cherry picked from commit 7ea2dc4488)
2016-10-31 21:52:50 +08:00
Fabian Homborg
2a5ad198bf Rework cursor detection
Fixes #3499.
2016-10-31 21:51:06 +08:00
Aaron Gyes
960cc628b2 Don't choke defining aliases with quotes
Fixes #3510
2016-10-31 01:37:23 -07:00
Aaron Gyes
6b41240cd2 Revert "Move PCRE2 to pcre2"
This reverts commit f4f9ed56ee.
2016-10-30 21:29:48 -07:00
Aaron Gyes
6e873719fd Fix alias doc typo
Fix spelling typo, and a couple small tweaks.
2016-10-30 21:25:21 -07:00
Aaron Gyes
f4f9ed56ee Move PCRE2 to pcre2 2016-10-30 12:38:45 -07:00
David Adam
9f23f619c9 Makefile: pass correct version macro
Fixes display of version in documentation header. A shell-style variable
instead of a Makefile-style variable left it displayed as
ISH_BUILD_VERSION.

(cherry picked from commit 1e234f492c)
2016-10-30 14:27:11 +08:00
David Adam
1e234f492c Makefile: pass correct version macro
Fixes display of version in documentation header. A shell-style variable
instead of a Makefile-style variable left it displayed as
ISH_BUILD_VERSION.
2016-10-30 14:26:11 +08:00
Kurtis Rader
f0ab1331a5 lint: Use early exit/continue 2016-10-29 21:46:11 -07:00
Kurtis Rader
99b729eb4d lint: Use early exit/continue 2016-10-29 21:20:29 -07:00
Kurtis Rader
9af0797334 lint: Use early exit/continue 2016-10-29 20:51:03 -07:00
Kurtis Rader
6bef7b7be9 lint: constant if expression 2016-10-29 19:01:19 -07:00
Kurtis Rader
b0b2182535 lint: missing default in switch statements 2016-10-29 18:27:51 -07:00
Aaron Gyes
fb979922b3 Update alias docs 2016-10-29 13:57:05 -07:00
Aaron Gyes
c4bd110fca List alias-created functions on alias sans args
The previous change I made here makes this not hard to do, but
kind of lame in implementation.
2016-10-28 22:31:58 -07:00
Kurtis Rader
b663b0e818 lint: redundant if statement 2016-10-28 19:15:05 -07:00
Kurtis Rader
41f1232cf9 disable oclint BitwiseOperatorInConditional warning 2016-10-28 17:52:56 -07:00
Kurtis Rader
4a2aed1f8e lint: unnecessary else statement 2016-10-28 17:43:20 -07:00
Aaron Gyes
2d46969d3e alias: identify as alias in description.
Like so:

~ $ alias foo=bar
~ $ functions foo
function foo --description 'alias foo=bar'
	bar  $argv;
end
2016-10-28 14:44:55 -07:00
Kurtis Rader
f382fa8e8a lint: multiple unary operator 2016-10-27 21:21:54 -07:00
Fabian Homborg
7ea2dc4488 Disable vi-cursor on xterm < 282
Fixes #3499.

@zanchey: This is for integration-2.4.0.
2016-10-27 10:16:57 +02:00
Fabian Homborg
56679d4776 Don't use open function if a command exists
Turns out this is also the case on Haiku.

It also eliminates a fork.

Closes #3487.
2016-10-26 15:48:42 +02:00
Kurtis Rader
070ef6fd5b fix regression introduced by commit 851e449
My earlier attempt with commit 851e449 to eliminate all the compiler
warnings about mixing signed and unsigned ints in an expression
introduced a subtle bug. This fixes that mistake.

Fixes #3488

(cherry picked from commit 075be74cc4)
2016-10-26 18:28:49 +08:00
Kurtis Rader
075be74cc4 fix regression introduced by commit 851e449
My earlier attempt with commit 851e449 to eliminate all the compiler
warnings about mixing signed and unsigned ints in an expression
introduced a subtle bug. This fixes that mistake.

Fixes #3488
2016-10-25 20:56:15 -07:00
Aaron Gyes
5a8be61954 defaults completions: shorten and improve brevity
At 80 columns the description obscured 'find' in 'default find'.

Improve others.

(cherry picked from commit cbe2d4b5f1)
2016-10-25 08:55:03 +08:00
Fabian Weisshaar
7fdbbe0711 add defaults (macOS) completion
(cherry picked from commit 7878dbc4f0)
2016-10-25 08:55:02 +08:00
Fabian Weisshaar
8af6bb4436 add listFilesystems to diskutil completion
(cherry picked from commit e16f6ca2aa)
2016-10-25 08:55:02 +08:00
Kurtis Rader
2bb52c65c2 fix bug introduced by 42458ff7
There was one block of code modified by commit 42458ff7 that had
convoluted, inverted, logic. In the process of collapsing nested
"if" blocks the logic was modified to avoid using "!" everywhere the
bool was tested. Unfortunately I neglected to modify two of the
conditions used to set that var to reflect the changed polarity.
2016-10-24 17:13:39 -07:00
Kurtis Rader
37d91d0c29 change name of the function 2016-10-23 15:02:14 -07:00
Kurtis Rader
8dfee7ff76 add new file to change 2016-10-23 14:56:18 -07:00
Kurtis Rader
07de13f61f implement a fish_prompt_hostname function
Standardize how the host name is included in the prompts that do so.

Fixes #3480
2016-10-23 14:20:54 -07:00
Aaron Gyes
668de88e69 Supress fish_title only for Terminal.app
VTE terminals apparently do not use the OSC sequence to compose
title components.
2016-10-23 12:02:01 -07:00
Kurtis Rader
31432c3535 Revert "Fix lexicon_filter verbosity"
This reverts commit dcb39af8c0.

It breaks building the documentation because splitting the sed invocation
in the `lexicon_filter` target from the preceding `if` block means the
`WORDBL` and `WORDBR` shell vars aren't available.

(cherry picked from commit 100a0ea549)
2016-10-23 20:54:29 +08:00
Kurtis Rader
cdb82e45ac lint: remove another "too few branches in switch statement" 2016-10-22 22:12:22 -07:00
Kurtis Rader
a90b521eb4 lint: remove unused function 2016-10-22 21:28:46 -07:00
Kurtis Rader
25e0a39165 fix bug introduced by lint cleanup commit 42458ff 2016-10-22 21:14:21 -07:00
Kurtis Rader
d982427216 remove unused function
The fish_key_reader program was the only user of the
`set_wait_on_escape_ms()` function and that use was removed with commit
0461743. So remove it from the main fish code. This was found by `make
lint`.
2016-10-22 21:08:53 -07:00
Kurtis Rader
21521b2953 lint: too few branches in switch statement
Someone was way too enamored of the `switch` statement. Using it in
places where a simple `if...else if...else` was clearer and shorter.
2016-10-22 21:01:27 -07:00
Kurtis Rader
42458ff7ab lint: "collapsible if statements" warnings 2016-10-22 19:09:40 -07:00
Aaron Gyes
a8c9019a39 Re-fix 'fix lexicon_filter verbosity' 2016-10-22 18:37:11 -07:00
Kurtis Rader
100a0ea549 Revert "Fix lexicon_filter verbosity"
This reverts commit dcb39af8c0.

It breaks building the documentation because splitting the sed invocation
in the `lexicon_filter` target from the preceding `if` block means the
`WORDBL` and `WORDBR` shell vars aren't available.
2016-10-22 18:23:03 -07:00
Aaron Gyes
cbe2d4b5f1 defaults completions: shorten and improve brevity
At 80 columns the description obscured 'find' in 'default find'.

Improve others.
2016-10-22 12:37:00 -07:00
Fabian Weisshaar
7878dbc4f0 add defaults (macOS) completion 2016-10-22 20:13:18 +02:00
Fabian Weisshaar
e16f6ca2aa add listFilesystems to diskutil completion 2016-10-22 20:13:18 +02:00
Aaron Gyes
c7e26e494e Fix Terminal.app title
Defining fish_title here is too late because there will already be a
title set. Work around issue by clearing it at same time.
2016-10-22 10:47:46 -07:00
Kurtis Rader
6e6b294a3f lint: deal with "double negative" warnings 2016-10-20 21:14:40 -07:00
Kurtis Rader
00303ed07f lint cleanup: parameter reassignment 2016-10-20 18:53:31 -07:00
Kurtis Rader
345950ac1b workaround broken groff man page config
Fixes #2673
2016-10-19 13:43:04 -07:00
391 changed files with 18282 additions and 16417 deletions

View File

@@ -1,18 +0,0 @@
<?xml version="1.0"?>
<rule version="1">
<pattern> wcwidth \(</pattern>
<message>
<id>wcwidthForbidden</id>
<severity>warning</severity>
<summary>Always use fish_wcwidth rather than wcwidth.</summary>
</message>
</rule>
<rule version="1">
<pattern> wcswidth \(</pattern>
<message>
<id>wcswidthForbidden</id>
<severity>warning</severity>
<summary>Always use fish_wcswidth rather than wcswidth.</summary>
</message>
</rule>

35
.cppcheck.rules Normal file
View File

@@ -0,0 +1,35 @@
<?xml version="1.0"?>
<![CDATA[
<!-- Sadly we can't enable the following two rules since doing so causes false
positives in standard header files rather than just project specific
source files. If we can find a way to enable these rules by also
excluding system include files we should do so.
<rule version="1">
<pattern> wcwidth \(</pattern>
<message>
<id>wcwidthForbidden</id>
<severity>warning</severity>
<summary>Always use fish_wcwidth rather than wcwidth.</summary>
</message>
</rule>
<rule version="1">
<pattern> wcswidth \(</pattern>
<message>
<id>wcswidthForbidden</id>
<severity>warning</severity>
<summary>Always use fish_wcswidth rather than wcswidth.</summary>
</message>
</rule>
<--!>
]]>
<rule>
<pattern>flock \(</pattern>
<message>
<id>flockSemanticsWarning</id>
<severity>warning</severity>
<summary>flock has a fallback implemented in terms of fcntl; ensure that the fcntl semantics will apply (see http://0pointer.de/blog/projects/locking.html)</summary>
</message>
</rule>

14
.cppcheck.suppressions Normal file
View File

@@ -0,0 +1,14 @@
// suppress all instances of varFuncNullUB: "Passing NULL after the last typed
// argument to a variadic function leads to undefined behaviour." That's
// because all the places we do this are valid and won't cause problems even
// on a ILP64 platform because we're careful about using NULL rather than 0.
varFuncNullUB
// Suppress the warning about unmatched suppressions. At the moment these
// warnings are emitted even when removing the suppression comment results in
// the warning being suppressed. In other words this unmatchedSuppression
// warnings are false positives.
unmatchedSuppression
memleak:src/env_universal_common.cpp
flockSemanticsWarning:src/env_universal_common.cpp
flockSemanticsWarning:src/history.cpp

View File

@@ -1,5 +1,5 @@
<!-- check if this problem is already solved! github.com/issues?q=is:issue+user:fish-shell -->
- [ ] Have you checked if problem occurs with [fish 2.3.1](/fish-shell/fish-shell/releases/tag/2.3.1)?
- [ ] Have you checked if problem occurs with [fish 2.4.0](/fish-shell/fish-shell/releases/tag/2.4.0)?
- [ ] Tried fish without third-party customizations *(check `sh -c 'env HOME=$(mktemp -d) fish'`)*?
**fish version installed** *(`fish --version`)*:

1
.gitignore vendored
View File

@@ -41,6 +41,7 @@ Desktop.ini
# These file names can appear anywhere in the hierarchy. They tend to be OS
# or build system artifacts.
autom4te.cache
aclocal.m4
Makefile
config.h
config.cache

14
.oclint
View File

@@ -51,3 +51,17 @@ disable-rules:
# and is therefore just noise. Disable this rule.
#
- InvertedLogic
#
# The idea behind the "double negative" rule is sound since constructs
# like "!!(var & flag)" should be written as "static_cast<bool>(var &
# flag)". Unfortunately this rule has way too many false positives;
# especially in the context of assert statements. So disable this rule.
#
- DoubleNegative
#
# Avoiding bitwise operators in a conditional is a good idea with one
# exception: testing whether a bit flag is set. Which happens to be the
# only time you'll see something like `if (j->flags & JOB_CONSTRUCTED)`
# in fish source.
#
- BitwiseOperatorInConditional

View File

@@ -1,3 +1,102 @@
# fish 2.5b1 (released January 14, 2017)
## Platform Changes
Starting with version 2.5, fish requires a more up-to-date version of C++, specifically C++11 (from 2011). This affects some older platforms:
### Linux
For users building from source, GCC's g++ 4.8 or later, or LLVM's clang 3.3 or later, are known to work. Older platforms may require a newer compiler installed.
Unfortunately, because of the complexity of the toolchain, binary packages are no longer published by the fish-shell developers for the following platforms:
- Red Hat Enterprise Linux and CentOS 5 & 6 for 64-bit builds
- Ubuntu 12.04 (EoLTS April 2017)
- Debian 7 (EoLTS May 2018)
Installing newer version of fish on these systems will require building from source.
### OS X SnowLeopard
Starting with version 2.5, fish requires a C++11 standard library on OS X 10.6 ("SnowLeopard"). If this library is not installed, you will see this error: `dyld: Library not loaded: /usr/lib/libc++.1.dylib`
MacPorts is the easiest way to obtain this library. After installing the SnowLeopard MacPorts release from the install page, run:
```
sudo port -v install libcxx
```
Now fish should launch successfully. (Please open an issue if it does not.)
This is only necessary on 10.6. OS X 10.7 and later include the required library by default.
## Other significant changes
- Attempting to exit with running processes in the background produces a warning, then signals them to terminate if a second attempt to exit is made. This brings the behaviour for running background processes into line with stopped processes. (#3497)
- `random` can now have start, stop and step values specified, or the new `choice` subcommand can be used to pick an argument from a list (#3619).
- A new key bindings preset, `fish_hybrid_key_bindings`, including all the Emacs-style and Vi-style bindings, which behaves like `fish_vi_key_bindings` in fish 2.3.0 (#3556).
- `function` now returns an error when called with invalid options, rather than defining the function anyway (#3574). This was a regression present in fish 2.3 and 2.4.0.
- fish no longer prints a warning when it identifies a running instance of an old version (2.1.0 and earlier). Changes to universal variables may not propagate between these old versions and 2.5b1.
- Improved compatiblity with Android (#3585), MSYS/mingw (#2360), Solaris (#3456, #3340)
- Like other shells, the `test` builting now returns an error for numeric operations on invalid integers (#3346, #3581).
- `complete` no longer recognises `--authoritative` and `--unauthoritative` options, and they are marked as obsolete.
- `status` accepts subcommands, and should be used like `status is-interactive`. The old options continue to be supported for the foreseeable future (#3526), although only one subcommand or option can be specified at a time.
- Selection mode (used with "begin-selection") no longer selects a character the cursor does not move over (#3684).
- List indexes are handled better, and a bit more liberally in some cases (`echo $PATH[1 .. 3]` is now valid) (#3579).
- The `fish_mode_prompt` function is now simply a stub around `fish_default_mode_prompt`, which allows the mode prompt to be included more easily in customised prompt functions (#3641).
## Notable fixes and improvements
- `alias`, run without options or arguments, lists all defined aliases, and aliases now include a description in the function signature that identifies them.
- `complete` accepts empty strings as descriptions (#3557).
- `command` accepts `-q`/`--quiet` in combination with `--search` (#3591), providing a simple way of checking whether a command exists in scripts.
- Abbreviations can now be renamed with `abbr --rename OLD_KEY NEW_KEY` (#3610).
- The command synopses printed by `--help` options work better with copying and pasting (#2673).
- `help` launches the browser specified by the `$fish_help_browser variable` if it is set (#3131).
- History merging could lose items under certain circumstances and is now fixed (#3496).
- The `$status` variable is now set to 123 when a syntactically invalid command is entered (#3616).
- Exiting fish now signals all background processes to terminate, not just stopped jobs (#3497).
- A new `prompt_hostname` function which prints a hostname suitable for use in prompts (#3482).
- The `__fish_man_page` function (bound to Alt-h by default) now tries to recognize subcommands (e.g. `git add` will now open the "git-add" man page) (#3678).
- A new function `edit_command_buffer` (bound to Alt-e & Alt-v by default) to edit the command buffer in an external editor (#1215, #3627).
- `set_color` now supports italics (`--italics`), dim (`--dim`) and reverse (`--reverse`) modes (#3650).
- Filesystems with very slow locking (eg incorrectly-configured NFS) will no longer slow fish down (#685).
- Improved completions for `apt` (#3695), `fusermount` (#3642), `make` (#3628), `netctl-auto` (#3378), `nmcli` (#3648), `pygmentize` (#3378), and `tar` (#3719).
- Added completions for:
- `VBoxHeadless` (#3378)
- `VBoxSDL` (#3378)
- `base64` (#3378)
- `caffeinate` (#3524)
- `dconf` (#3638)
- `dig` (#3495)
- `dpkg-reconfigure` (#3521 & #3522)
- `feh` (#3378)
- `launchctl` (#3682)
- `lxc` (#3554 & #3564),
- `mddiagnose` (#3524)
- `mdfind` (#3524)
- `mdimport` (#3524)
- `mdls` (#3524)
- `mdutil` (#3524)
- `mkvextract` (#3492)
- `nvram` (#3524)
- `objdump` (#3378)
- `sysbench` (#3491)
- `tmutil` (#3524)
---
# fish 2.4.0 (released November 8, 2016)
There are no major changes between 2.4b1 and 2.4.0.
## Notable fixes and improvements
- The documentation is now generated properly and with the correct version identifier.
- Automatic cursor changes are now only enabled on the subset of XTerm versions known to support them, resolving a problem where older versions printed garbage to the terminal before and after every prompt (#3499).
- Improved the title set in Apple Terminal.app.
- Added completions for `defaults` and improved completions for `diskutil` (#3478).
---
# fish 2.4b1 (released October 18, 2016)
## Significant changes
@@ -37,7 +136,7 @@
- `p4`, the Perforce client (#3314)
- `pygmentize` (#3378)
- `ranger` (#3378)
- Improved completions for `aura` (#3297), `abbr` (#3267), `brew` (#3309), `chown` (#3380, #3383),`cygport` (#3392), `git` (#3274, #3226, #3225, #3094, #3087, #3035, #3021, #2982, #3230), `kill & `pkill` (#3200), `screen` (#3271), `wget` (#3470), and `xz` (#3378).
- Improved completions for `aura` (#3297), `abbr` (#3267), `brew` (#3309), `chown` (#3380, #3383),`cygport` (#3392), `git` (#3274, #3226, #3225, #3094, #3087, #3035, #3021, #2982, #3230), `kill` & `pkill` (#3200), `screen` (#3271), `wget` (#3470), and `xz` (#3378).
- Distributors, packagers and developers will notice that the build process produces more succinct output by default; use `make V=1` to get verbose output (#3248).
- Improved compatibility with minor platforms including musl (#2988), Cygwin (#2993), Android (#3441, #3442), Haiku (#3322) and Solaris .

View File

@@ -9,7 +9,7 @@ you can redistribute it and/or modify it under the terms of the GNU GPL as
published by the Free Software Foundation.
fish also includes software licensed under the GNU Lesser General Public
License version 2, the OpenBSD license and the ISC license.
License version 2, the OpenBSD license, the ISC license, and the NetBSD license.
Full licensing information is contained in doc_src/license.hdr.

View File

@@ -181,6 +181,17 @@ PROGRAMS := fish fish_indent fish_key_reader
# Manual pages to install
#
MANUALS := $(addsuffix .1, $(addprefix share/man/man1/, $(PROGRAMS)))
HELP_MANPAGES := $(wildcard share/man/man1/*.1)
# Determine which man pages we don't want to install
# On OS X, don't install a man page for open, since we defeat fish's open
# function on OS X.
# This is also done in build_tools/build_documentation.sh, but because the
# tarball includes this page, we need to skip it in the Makefile too (see
# https://github.com/fish-shell/fish-shell/issues/2561).
ifeq ($(shell uname), Darwin)
HELP_MANPAGES := $(filter-out share/man/man1/open.1, $(HELP_MANPAGES))
endif
#
# All translation message catalogs
@@ -286,7 +297,7 @@ prof: all
# directory once Doxygen is done.
#
doc: $(HDR_FILES_SRC) Doxyfile.user $(HTML_SRC) $(HELP_SRC) doc.h $(HDR_FILES) lexicon_filter
@echo " SED doxygen $(em)user_doc$(sgr0)"
@echo " doxygen $(em)user_doc$(sgr0)"
$v (cat Doxyfile.user; echo INPUT_FILTER=./lexicon_filter; echo PROJECT_NUMBER=$(FISH_BUILD_VERSION) | $(SED) "s/-.*//") | doxygen - && touch user_doc
$v rm -f $(wildcard $(addprefix ./user_doc/html/,arrow*.png bc_s.png bdwn.png closed.png doc.png folder*.png ftv2*.png nav*.png open.png splitbar.png sync_*.png tab*.* doxygen.* dynsections.js jquery.js pages.html))
@@ -367,7 +378,7 @@ test_interactive: $(call filter_up_to,test_interactive,$(active_test_goals))
# builtins
#
doc_src/commands.hdr:$(HELP_SRC) doc_src/commands.hdr.in |
@echo " CAT AWK $(em)$@$(sgr0)"
@echo " CAT AWK $(em)$@$(sgr0)"
$v rm -f command_list.tmp command_list_toc.tmp $@
$v for i in $(sort $(HELP_SRC)); do \
echo "<hr>" >>command_list.tmp; \
@@ -383,10 +394,10 @@ doc_src/commands.hdr:$(HELP_SRC) doc_src/commands.hdr.in |
$v cat $@.in | $(AWK) '{if ($$0 ~ /@command_list_toc@/) { system("cat command_list_toc.txt"); } else if ($$0 ~ /@command_list@/){ system("cat command_list.txt");} else{ print $$0;}}' >$@
toc.txt: $(HDR_FILES:index.hdr=index.hdr.in) | show-SED
@echo " SED $(em)$@$(sgr0)"
@echo " SED $(em)$@$(sgr0)"
$v rm -f toc.tmp $@
# Ugly hack to set the toc initial title for the main page
$v echo '- <a href="index.html" id="toc-index">fish shell documentation - $FISH_BUILD_VERSION</a>' > toc.tmp
$v echo '- <a href="index.html" id="toc-index">fish shell documentation - $(FISH_BUILD_VERSION)</a>' > toc.tmp
# The first sed command captures the page name, followed by the description
# The second sed command captures the command name \1 and the description \2, but only up to a dash
# This is to reduce the size of the TOC in the command listing on the main page
@@ -400,7 +411,7 @@ toc.txt: $(HDR_FILES:index.hdr=index.hdr.in) | show-SED
$v mv toc.tmp $@
doc_src/index.hdr: toc.txt doc_src/index.hdr.in | show-AWK
@echo " AWK CAT $(em)$@$(sgr0)"
@echo " AWK CAT $(em)$@$(sgr0)"
$v cat $@.in | $(AWK) '{if ($$0 ~ /@toc@/){ system("cat toc.txt");} else{ print $$0;}}' >$@
#
@@ -415,7 +426,7 @@ doc_src/index.hdr: toc.txt doc_src/index.hdr.in | show-AWK
lexicon.txt: doc_src/commands.hdr $(FUNCTIONS_DIR_FILES) $(COMPLETIONS_DIR_FILES) share/functions/__fish_config_interactive.fish | show-SED show-FGREP
$v rm -f lexicon.tmp lexicon_catalog.tmp lexicon_catalog.txt $@
# Scan sources for commands/functions/binaries/colours. If GNU sed was portable, this could be much smarter.
@echo " SEDFGREP $(em)$@$(sgr0)"
@echo " SEDFGREP $(em)$@$(sgr0)"
$v $(SED) <command_list_toc.txt >>lexicon.tmp -n \
-e "s|^.*>\([a-z][a-z_]*\)</a>|'\1'|w lexicon_catalog.tmp" \
-e "s|'\(.*\)'|bltn \1|p"; mv lexicon_catalog.tmp lexicon_catalog.txt
@@ -453,8 +464,7 @@ lexicon_filter: lexicon.txt lexicon_filter.in | show-SED
WORDBL='[[:<:]]'; WORDBR='[[:>:]]'; \
else \
WORDBL='\\<'; WORDBR='\\>'; \
fi
$v $(SED) <lexicon.txt >>$@.tmp -n -e "s|^\([a-z][a-z][a-z][a-z]\) \([a-z_-]*\)$$|s,$$WORDBL\2$$WORDBR,@\1{\2},g|p" -e '$$G;s/.*\n/b tidy/p'
fi; $(SED) <lexicon.txt >>$@.tmp -n -e "s|^\([a-z][a-z][a-z][a-z]\) \([a-z_-]*\)$$|s,$$WORDBL\2$$WORDBR,@\1{\2},g|p" -e '$$G;s/.*\n/b tidy/p';
$v mv $@.tmp $@; test -x $@ || chmod a+x $@;
@@ -475,7 +485,7 @@ doc.h: $(HDR_FILES)
# the internal help function text.
#
%.doxygen:%.txt
@echo " cat * $(em)$@$(sgr0)"
@echo " cat * $(em)$@$(sgr0)"
$v echo "/** \page " `basename $*` >$@;
$v cat $*.txt >>$@;
$v echo "*/" >>$@
@@ -521,7 +531,7 @@ doc.h: $(HDR_FILES)
# Create a template translation object
#
messages.pot: $(wildcard src/*.cpp src/*.h share/completions/*.fish share/functions/*.fish)
@echo " xgettext $(em)$@$(sgr0)"
@echo " xgettext $(em)$@$(sgr0)"
xgettext -k_ -kN_ $(wildcard src/*.cpp src/*.h) -o messages.pot
$v xgettext -j -k_ -kN_ -k--description -LShell --from-code=UTF-8 $(wildcard share/completions/*.fish share/functions/*.fish) share/fish.config -o messages.pot
@@ -650,6 +660,7 @@ install-force: all install-translations | show-datadir show-sysconfdir show-extr
$v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish
$v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/completions
$v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/functions
$v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/groff
$v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/man/man1
$v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools
$v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools/web_config
@@ -674,7 +685,8 @@ install-force: all install-translations | show-datadir show-sysconfdir show-extr
$(INSTALL) -m 644 $$i $(DESTDIR)$(datadir)/fish/functions/; \
done;
@echo "Installing $(bo)man pages$(sgr0)";
$v for i in $(wildcard share/man/man1/*.1); do \
$v $(INSTALL) -m 644 share/groff/* $(DESTDIR)$(datadir)/fish/groff/
$v for i in $(HELP_MANPAGES); do \
$(INSTALL) -m 644 $$i $(DESTDIR)$(datadir)/fish/man/man1/; \
done;
@echo "Installing helper tools";
@@ -817,7 +829,7 @@ $(PCRE2_LIB): $(PCRE2_H)
$v $(MAKE) V=$(V) -C $(PCRE2_DIR) libpcre2-$(PCRE2_WIDTH).la
$(PCRE2_H):
@echo " autoconf $(em)$@$(sgr0)"
@echo " autoconf $(em)$@$(sgr0)"
$v (cd $(PCRE2_DIR) && ./config.status)
#
@@ -869,9 +881,9 @@ depend: | show-MKDIR_P
# TODO - why not have the Makefile run lint.fish on actual files itself (generate a report target?)
#
lint:
$v build_tools/lint.fish $(CXX) $(CXXFLAGS) $(CPPFLAGS)
$v build_tools/lint.fish "$(CXX)" $(CXXFLAGS) $(CPPFLAGS)
lint-all:
$v build_tools/lint.fish $(CXX) --all $(CXXFLAGS) $(CPPFLAGS)
$v build_tools/lint.fish "$(CXX)" --all $(CXXFLAGS) $(CPPFLAGS)
.PHONY: lint lint-all
#
@@ -888,8 +900,9 @@ style-all:
# Restore the source tree to the state right after extracting a tarball.
#
distclean: clean
$v $(MAKE) V=$(V) -C $(PCRE2_DIR) distclean ||:
$v rm -f config.status config.log config.h Makefile
$v test ! -f $(PCRE2_DIR)/Makefile || \
$(MAKE) V=$(V) -C $(PCRE2_DIR) distclean ||:
$v rm -rf config.status config.log config.h Makefile autom4te.cache aclocal.m4
.PHONY: distclean
#
@@ -905,9 +918,12 @@ clean:
# PCRE's make clean has a few slightly annoying exceptions to the V= rule. If V=0
# send all output to /dev/null - unless there's an error, in which case run it again not silenced.
ifeq ($(V), 0 )
$(MAKE) -C $(PCRE2_DIR) clean ||:
@test ! -f $(PCRE2_DIR)/Makefile || \
$(MAKE) -C $(PCRE2_DIR) clean ||:
else
@$(MAKE) -s -C $(PCRE2_DIR) clean > /dev/null || $(MAKE) -s -C $(PCRE2_DIR) clean ||:
@test ! -f $(PCRE2_DIR)/Makefile || \
$(MAKE) -s -C $(PCRE2_DIR) clean > /dev/null || \
$(MAKE) -s -C $(PCRE2_DIR) clean ||:
endif
$v rm -f obj/*.o *.o doc.h doc.tmp
$v rm -f doc_src/*.doxygen doc_src/*.cpp doc_src/*.o doc_src/commands.hdr
@@ -1019,14 +1035,13 @@ obj/expand.o: src/complete.h src/env.h src/exec.h src/expand.h
obj/expand.o: src/parse_constants.h src/iothread.h src/parse_util.h
obj/expand.o: src/tokenizer.h src/path.h src/proc.h src/io.h src/parse_tree.h
obj/expand.o: src/util.h src/wildcard.h src/wutil.h
obj/fallback.o: config.h src/signal.h src/fallback.h src/util.h
obj/fallback.o: config.h src/signal.h src/common.h src/fallback.h src/util.h
obj/fish.o: config.h src/builtin.h src/common.h src/fallback.h src/signal.h
obj/fish.o: src/env.h src/event.h src/expand.h src/parse_constants.h
obj/fish.o: src/fish_version.h src/function.h src/history.h src/wutil.h
obj/fish.o: src/input.h src/input_common.h src/io.h src/parser.h
obj/fish.o: src/parse_tree.h src/tokenizer.h src/proc.h src/path.h
obj/fish.o: src/reader.h src/complete.h src/highlight.h src/color.h
obj/fish.o: src/wildcard.h
obj/fish.o: src/input.h src/io.h src/parser.h src/parse_tree.h
obj/fish.o: src/tokenizer.h src/proc.h src/path.h src/reader.h src/complete.h
obj/fish.o: src/highlight.h src/color.h
obj/fish_indent.o: config.h src/color.h src/common.h src/fallback.h
obj/fish_indent.o: src/signal.h src/env.h src/fish_version.h src/highlight.h
obj/fish_indent.o: src/input.h src/output.h src/parse_constants.h
@@ -1135,8 +1150,8 @@ obj/sanity.o: src/wutil.h src/kill.h src/proc.h src/io.h src/parse_tree.h
obj/sanity.o: src/parse_constants.h src/tokenizer.h src/reader.h
obj/sanity.o: src/complete.h src/highlight.h src/color.h src/env.h
obj/sanity.o: src/sanity.h
obj/screen.o: config.h src/common.h src/fallback.h src/signal.h src/env.h
obj/screen.o: src/highlight.h src/color.h src/output.h src/pager.h
obj/screen.o: config.h src/common.h src/fallback.h src/signal.h
obj/screen.o: src/highlight.h src/color.h src/env.h src/output.h src/pager.h
obj/screen.o: src/complete.h src/reader.h src/parse_constants.h src/screen.h
obj/screen.o: src/util.h
obj/signal.o: config.h src/signal.h src/common.h src/fallback.h src/event.h
@@ -1145,7 +1160,7 @@ obj/signal.o: src/tokenizer.h src/reader.h src/complete.h src/highlight.h
obj/signal.o: src/color.h src/env.h src/wutil.h
obj/tokenizer.o: config.h src/common.h src/fallback.h src/signal.h
obj/tokenizer.o: src/tokenizer.h src/wutil.h
obj/utf8.o: config.h src/utf8.h
obj/utf8.o: config.h src/common.h src/fallback.h src/signal.h src/utf8.h
obj/util.o: config.h src/common.h src/fallback.h src/signal.h src/util.h
obj/util.o: src/wutil.h
obj/wcstringutil.o: config.h src/common.h src/fallback.h src/signal.h

View File

@@ -13,9 +13,9 @@ Detailed user documentation is available by running `help` within fish, and also
## Building
Fish can be built using a C++11 environment but only requires C++03. It builds successfully with g++ 4.2 or later, and with clang. This allows fish to run on older systems such as OS X Snow Leopard (released in 2009).
fish requires a C++11 compiler. It builds successfully with g++ 4.8 or later, or with clang 3.3 or later.
Fish can be built using autotools or Xcode. autoconf 2.60 or later is required to build from git versions, but is not required for releases.
fish can be built using autotools or Xcode. autoconf 2.60 or later, as well as automake 1.13 or later, are required to build from git versions. These are not required to build from released tarballs.
fish depends on a curses implementation, such as ncurses. The headers and libraries are required for building.
@@ -27,7 +27,7 @@ Building the documentation requires Doxygen 1.8.7 or newer.
### Autotools Build
autoconf [if building from Git]
autoreconf --no-recursive [if building from Git]
./configure
make [gmake on BSD]
sudo make install

View File

@@ -21,6 +21,7 @@ fi
# Determine which man pages we don't want to generate.
# on OS X, don't make a man page for open, since we defeat fish's open function on OS X.
# This is also done in the Makefile, but the Xcode build doesn't use that
CONDEMNED_PAGES=
if test `uname` = 'Darwin'; then
CONDEMNED_PAGES="$CONDEMNED_PAGES open.1"

View File

@@ -35,10 +35,14 @@ for arg in $argv
set cppcheck_args $cppcheck_args $arg
else if string match -q -- '-I*' $arg
set cppcheck_args $cppcheck_args $arg
else if string match -q -- '-iquote*' $arg
set cppcheck_args $cppcheck_args $arg
end
end
# Not sure when this became necessary but without these flags cppcheck no longer works on macOS.
# It complains that "Cppcheck cannot find all the include files." It appears that cppcheck used
# to, but no longer, recognizes the -iquote flag. So switch to hardcoding the appropriate -I flags.
set cppcheck_args $cppcheck_args -I . -I ./src
if test "$machine_type" = "x86_64"
set cppcheck_args -D__x86_64__ -D__LP64__ $cppcheck_args
end
@@ -49,7 +53,8 @@ else
# We haven't been asked to lint all the source. If there are uncommitted
# changes lint those, else lint the files in the most recent commit.
# Select (cached files) (modified but not cached, and untracked files)
set files (git diff-index --cached HEAD --name-only) (git ls-files --exclude-standard --others --modified)
set files (git diff-index --cached HEAD --name-only)
set files $files (git ls-files --exclude-standard --others --modified)
if not set -q files[1]
# No pending changes so lint the files in the most recent commit.
set files (git diff-tree --no-commit-id --name-only -r HEAD)
@@ -75,9 +80,12 @@ if set -q c_files[1]
for c_file in $c_files
switch $kernel_name
case Darwin
include-what-you-use -Xiwyu --no_default_mappings -Xiwyu --mapping_file=build_tools/iwyu.osx.imp $cppcheck_args --std=c++11 $c_file 2>&1
include-what-you-use -Xiwyu --no_default_mappings -Xiwyu \
--mapping_file=build_tools/iwyu.osx.imp --std=c++11 \
$cppcheck_args $c_file 2>&1
case Linux
include-what-you-use -Xiwyu --mapping_file=build_tools/iwyu.linux.imp $cppcheck_args $c_file 2>&1
include-what-you-use -Xiwyu --mapping_file=build_tools/iwyu.linux.imp \
$cppcheck_args $c_file 2>&1
case '*' # hope for the best
include-what-you-use $cppcheck_args $c_file 2>&1
end
@@ -92,7 +100,25 @@ if set -q c_files[1]
# The stderr to stdout redirection is because cppcheck, incorrectly IMHO, writes its
# diagnostic messages to stderr. Anyone running this who wants to capture its output will
# expect those messages to be written to stdout.
cppcheck -q --verbose --std=posix --language=c++ --template "[{file}:{line}]: {severity} ({id}): {message}" --suppress=missingIncludeSystem --inline-suppr --enable=$cppchecks --rule-file=.cppcheck.rule $cppcheck_args $c_files 2>&1
set -l cn (set_color normal)
set -l cb (set_color --bold)
set -l cu (set_color --underline)
set -l cm (set_color magenta)
set -l cbrm (set_color brmagenta)
set -l template "[$cb$cu{file}$cn$cb:{line}$cn] $cbrm{severity}$cm ({id}):$cn\n {message}"
set cppcheck_args -q --verbose --std=c++11 --std=posix --language=c++ --template $template \
--suppress=missingIncludeSystem --inline-suppr --enable=$cppchecks \
--rule-file=.cppcheck.rules --suppressions-list=.cppcheck.suppressions $cppcheck_args
cppcheck $cppcheck_args $c_files 2>&1
echo
echo ========================================
echo 'Running `cppcheck --check-config` to identify missing includes similar problems.'
echo 'Ignore unmatchedSuppression warnings as they are probably false positives we'
echo 'cannot suppress.'
echo ========================================
cppcheck $cppcheck_args --check-config $c_files 2>&1
end
if type -q oclint
@@ -105,7 +131,7 @@ if set -q c_files[1]
# output will expect those messages to be written to stdout.
if test "$kernel_name" = "Darwin"
if not test -f compile_commands.json
xcodebuild >xcodebuild.log
xcodebuild -alltargets >xcodebuild.log
oclint-xcodebuild xcodebuild.log >/dev/null
end
if test $all = yes

View File

@@ -49,9 +49,7 @@ rm -f "$path" "$path".gz
git archive --format=tar --prefix="$prefix"/ HEAD > "$path"
# tarball out the documentation, generate a configure script and version file
# Don't use autoreconf since it invokes commands that may not be installed, like aclocal
# Don't run autoheader since configure.ac runs it. autoconf is enough.
autoconf
autoreconf --no-recursive
./configure --with-doxygen
make doc share/man
echo $VERSION > version

View File

@@ -30,12 +30,10 @@ if test $all = yes
exit 1
end
set c_files src/*.h src/*.cpp
# For now we don't restyle all the fish scripts. That's because `fish_indent` still has some
# problems with its output that require manual intervention. Not to mention that very few of the
# fish scripts even conform to `fish_indent` output at this time. When `fish_indent` output is
# deemed acceptable as a default and all the fish scripts have been restyled this comment should
# be removed and the following statement uncommented.
# set f_files share/***.fish
# For now we don't restyle all fish scripts other than completion scripts. That's because people
# really like to vertically align the elements of the `complete` command and fish_indent
# currently does not honor that whitespace.
set f_files (printf '%s\n' share/***.fish | grep -v /completions/)
else
# We haven't been asked to reformat all the source. If there are uncommitted changes reformat
# those using `git clang-format`. Else reformat the files in the most recent commit.

View File

@@ -15,6 +15,7 @@ AC_INIT(fish,
m4_esyscmd([cut -f 3 -d ' ' FISH-BUILD-VERSION-FILE | tr -d '\n']),
fish-users@lists.sourceforge.net)
ac_clean_files=a.out.dSYM
#
# List of output variables produced by this configure script
#
@@ -33,23 +34,23 @@ AC_SUBST(EXTRA_PCRE2)
# running autoconf to handle an updates configure.ac.
#
AC_MSG_CHECKING([if autoconf needs to be run])
AC_MSG_CHECKING([if autoreconf needs to be run])
if test configure -ot configure.ac; then
AC_MSG_RESULT([yes])
if which autoconf >/dev/null; then
# No need to provide any error messages if autoconf fails, the
if which autoreconf >/dev/null; then
# No need to provide any error messages if autoreconf fails, the
# shell and autconf should take care of that themselves
AC_MSG_NOTICE([running autoconf])
if autoconf; then
AC_MSG_NOTICE([running autoreconf --no-recursive])
if autoreconf --no-recursive; then
./configure "$@"
exit
fi
exit 1
else
AC_MSG_ERROR(
[cannot find the autoconf program in your path.
[cannot find the autoreconf program in your path.
This program needs to be run whenever the configure.ac file is modified.
Please install autoconf and try again.]
Please install autoreconf and try again.]
)
fi
else
@@ -81,6 +82,12 @@ else
AC_MSG_RESULT([no])
fi
#
# Include the autoconf macros directory
#
AC_CONFIG_MACRO_DIRS([m4])
#
# Set up various programs needed for install
# Note AC_PROG_CXX sets CXXFLAGS if not set, which we want
@@ -97,12 +104,13 @@ AC_PROG_AWK
AC_PROG_FGREP
AC_PROG_SED
AC_USE_SYSTEM_EXTENSIONS
AX_CXX_COMPILE_STDCXX_11(noext,mandatory)
#
# Tell autoconf to create config.h header
#
AC_CONFIG_HEADERS(config.h)
AC_CANONICAL_TARGET
AC_CANONICAL_HOST
#
@@ -242,6 +250,18 @@ AC_CHECK_FILES([/proc/self/stat])
AC_DEFINE([NCURSES_NOMACROS], [1], [Define to 1 to disable ncurses macros that conflict with the STL])
AC_DEFINE([NOMACROS], [1], [Define to 1 to disable curses macros that conflict with the STL])
# Threading is excitingly broken on Solaris without adding -pthread to CXXFLAGS
# Only support GCC for now
dnl Ideally we would use the AX_PTHREAD macro here, but it's GPL3-licensed
dnl ACX_PTHREAD is way too old and seems to break the OS X build
dnl Both only check with AC_LANG(C) in any case
case $host_os in
solaris*)
CXXFLAGS="$CXXFLAGS -pthread"
CFLAGS="$CFLAGS -pthread"
;;
esac
#
# Check presense of various libraries. This is done on a per-binary
# level, since including various extra libraries in all binaries only
@@ -250,9 +270,8 @@ AC_DEFINE([NOMACROS], [1], [Define to 1 to disable curses macros that conflict w
#
# Check for os dependant libraries for all binaries.
AC_SEARCH_LIBS( connect, socket, , [AC_MSG_ERROR([Cannot find the socket library, needed to build this package.] )] )
AC_SEARCH_LIBS( nanosleep, rt, , [AC_MSG_ERROR([Cannot find the rt library, needed to build this package.] )] )
AC_SEARCH_LIBS( shm_open, rt, , [AC_MSG_ERROR([Cannot find the rt library, needed to build this package.] )] )
AC_SEARCH_LIBS( shm_open, rt, [AC_DEFINE([HAVE_SHM_OPEN], [1], [Define to 1 if the shm_open() function exists])] )
AC_SEARCH_LIBS( pthread_create, pthread, , [AC_MSG_ERROR([Cannot find the pthread library, needed to build this package.] )] )
AC_SEARCH_LIBS( setupterm, [ncurses tinfo curses], , [AC_MSG_ERROR([Could not find a curses implementation, needed to build fish. If this is Linux, try running 'sudo apt-get install libncurses5-dev' or 'sudo yum install ncurses-devel'])] )
AC_SEARCH_LIBS( [dladdr], [dl] )
@@ -302,10 +321,67 @@ AC_CHECK_FUNCS( futimes )
AC_CHECK_FUNCS( wcslcpy lrand48_r killpg )
AC_CHECK_FUNCS( backtrace_symbols getifaddrs )
AC_CHECK_FUNCS( futimens clock_gettime )
AC_CHECK_FUNCS( getpwent )
AC_CHECK_FUNCS( getpwent flock )
AC_CHECK_FUNCS( dirfd )
AC_CHECK_DECL( [mkostemp], [ AC_CHECK_FUNCS([mkostemp]) ] )
dnl AC_CHECK_FUNCS uses C linkage, but sometimes (Solaris!) the behaviour is
dnl different with C++.
AC_MSG_CHECKING([for wcsdup])
AC_TRY_LINK( [ #include <wchar.h> ],
[ wchar_t* foo = wcsdup(L""); ],
[ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_WCSDUP, 1, Define to 1 if you have the `wcsdup' function.)
],
[AC_MSG_RESULT(no)],
)
AC_MSG_CHECKING([for std::wcsdup])
AC_TRY_LINK( [ #include <wchar.h> ],
[ wchar_t* foo = std::wcsdup(L""); ],
[ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_STD__WCSDUP, 1, Define to 1 if you have the `std::wcsdup' function.)
],
[AC_MSG_RESULT(no)],
)
AC_MSG_CHECKING([for wcscasecmp])
AC_TRY_LINK( [ #include <wchar.h> ],
[ int foo = wcscasecmp(L"", L""); ],
[ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_WCSCASECMP, 1, Define to 1 if you have the `wcscasecmp' function.)
],
[AC_MSG_RESULT(no)],
)
AC_MSG_CHECKING([for std::wcscasecmp])
AC_TRY_LINK( [ #include <wchar.h> ],
[ int foo = std::wcscasecmp(L"", L""); ],
[ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_STD__WCSCASECMP, 1, Define to 1 if you have the `std::wcscasecmp' function.)
],
[AC_MSG_RESULT(no)],
)
AC_MSG_CHECKING([for wcsncasecmp])
AC_TRY_LINK( [ #include <wchar.h> ],
[ int foo = wcsncasecmp(L"", L"", 0); ],
[ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_WCSNCASECMP, 1, Define to 1 if you have the `wcsncasecmp' function.)
],
[AC_MSG_RESULT(no)],
)
AC_MSG_CHECKING([for std::wcsncasecmp])
AC_TRY_LINK( [ #include <wchar.h> ],
[ int foo = std::wcsncasecmp(L"", L"", 0); ],
[ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_STD__WCSNCASECMP, 1, Define to 1 if you have the `std::wcsncasecmp' function.)
],
[AC_MSG_RESULT(no)],
)
if test x$local_gettext != xno; then
AC_CHECK_FUNCS( gettext )
@@ -472,6 +548,34 @@ else
AC_MSG_RESULT(no)
fi
# Check that threads actually work on Solaris
AC_MSG_CHECKING([for threadsafe errno])
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([
#include <errno.h>
#include <pthread.h>
#include <signal.h>
void *thread1_func(void *p_arg)
{
errno = 1;
return 0;
}
],[
errno = 0;
pthread_t t1;
pthread_create(&t1, NULL, thread1_func, NULL);
pthread_join(t1, NULL);
return errno;
])],
[AC_MSG_RESULT(yes)],
[
AC_MSG_RESULT(no)
AC_MSG_FAILURE([errno is not threadsafe - check your compiler settings])
],
[AC_MSG_RESULT(crosscompiling, skipped)]
)
pcre2_min_version=10.21
EXTRA_PCRE2=
AC_ARG_WITH(

2
debian/compat vendored
View File

@@ -1 +1 @@
8
9

7
debian/control vendored
View File

@@ -3,7 +3,7 @@ Section: shells
Priority: extra
Maintainer: ridiculous_fish <corydoras@ridiculousfish.com>
Uploaders: David Adam <zanchey@ucc.gu.uwa.edu.au>
Build-Depends: debhelper (>= 8.0.0), libncurses5-dev, autoconf, autotools-dev, dh-autoreconf, gettext
Build-Depends: debhelper (>= 9.0.0), libncurses5-dev, autoconf, autotools-dev, dh-autoreconf, gettext
# When libpcre2-dev is available on all supported Debian versions, add a dependency on that.
Standards-Version: 3.9.4
Homepage: http://fishshell.com/
@@ -13,7 +13,7 @@ Vcs-Browser: https://github.com/fish-shell/fish-shell
Package: fish
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, fish-common (= ${source:Version}), passwd (>= 4.0.3-10), bc, gettext-base, man-db
Recommends: xsel (>=1.2.0), xdg-utils
Recommends: xsel (>=1.2.0)
Description: friendly interactive shell
Fish is a command-line shell for modern systems, focusing on user-friendliness,
sensibility and discoverability in interactive use. The syntax is simple, but
@@ -22,7 +22,8 @@ Description: friendly interactive shell
Package: fish-common
Architecture: all
Depends: ${misc:Depends}
Recommends: fish, python (>=2.6), xdg-utils
Recommends: fish, python (>=2.6)
Suggests: xdg-utils
Replaces: fish (<= 2.1.1.dfsg-2)
Description: friendly interactive shell (architecture-independent files)
Fish is a command-line shell for modern systems, focusing on user-friendliness,

7
debian/rules vendored
View File

@@ -4,17 +4,14 @@
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
# dpkg-dev 1.16.1 doesn't export buildflags
# can be removed once on dh compat level 9
DPKG_EXPORT_BUILDFLAGS = 1
-include /usr/share/dpkg/buildflags.mk
%:
dh $@ --with autotools-dev,autoreconf
override_dh_installdocs:
dh_installdocs --link-doc=fish
# Still needed until all platforms have debhelper 9.20151219
# Consider transitioning https://wiki.debian.org/DebugPackage
override_dh_strip:
dh_strip --dbg-package=fish-dbg

View File

@@ -3,6 +3,7 @@
\subsection abbr-synopsis Synopsis
\fish{synopsis}
abbr --add word phrase...
abbr --rename word new_word
abbr --show
abbr --list
abbr --erase word
@@ -33,6 +34,8 @@ The following parameters are available:
- `-a WORD PHRASE` or `--add WORD PHRASE` Adds a new abbreviation, causing WORD to be expanded to PHRASE.
- `-r WORD NEW_WORD` or `--rename WORD NEW_WORD` Renames an abbreviation, from WORD to NEW_WORD.
- `-s` or `--show` Show all abbreviated words and their expanded phrases in a manner suitable for export and import.
- `-l` or `--list` Lists all abbreviated words.
@@ -48,6 +51,11 @@ abbr -a gco git checkout
\endfish
Add a new abbreviation where `gco` will be replaced with `git checkout`.
\fish
abbr -r gco gch
\endfish
Renames an existing abbreviation from `gco` to `gch`.
\fish
abbr -e gco
\endfish

View File

@@ -2,39 +2,34 @@
\subsection alias-synopsis Synopsis
\fish{synopsis}
alias
alias NAME DEFINITION
alias NAME=DEFINITION
\endfish
\subsection alias-description Description
`alias` is a simple wrapper for the `function` builtin. It exists for backwards compatibility with Posix shells. For other uses, it is recommended to define a <a href='#function'>function</a>.
`alias` is a simple wrapper for the `function` builtin, which creates a function wrapping a command. It has similar syntax to POSIX shell `alias`. For other uses, it is recommended to define a <a href='#function'>function</a>.
`fish` does not keep track of which functions have been defined using `alias`. They must be erased using `functions -e`.
`fish` marks functions that have been created by `alias` by including the command used to create them in the function description. You can list `alias`-created functions by running `alias` without arguments. They must be erased using `functions -e`.
- `NAME` is the name of the alias
- `DEFINITION` is the actual command to execute. The string `$argv` will be appended.
You cannot create an alias to a function with the same name.
Note that spaces need to be escaped in the call to alias just like in the commandline _even inside the quotes_.
You cannot create an alias to a function with the same name. Note that spaces need to be escaped in the call to `alias` just like at the command line, _even inside quoted parts_.
\subsection alias-example Example
The following code will create `rmi`, which runs `rm` with additional arguments on every invocation.
\fish
alias rmi "rm -i"
alias rmi="rm -i"
# This is equivalent to entering the following function:
function rmi
function rmi --wraps rm --description 'alias rmi=rm -i'
rm -i $argv
end
# This needs to have the spaces escaped or "Chrome.app..." will be seen as an argument to "/Applications/Google":
alias chrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome banana'
\endfish

View File

@@ -71,6 +71,8 @@ The following special input functions are available:
- `backward-word`, move one word to the left
- `beginning-of-buffer`, moves to the beginning of the buffer, i.e. the start of the first line
- `beginning-of-history`, move to the beginning of the history
- `beginning-of-line`, move to the beginning of the line
@@ -81,12 +83,14 @@ The following special input functions are available:
- `complete`, guess the remainder of the current token
- `complete-and-search`, invoke the searchable pager on completion options
- `complete-and-search`, invoke the searchable pager on completion options (for convenience, this also moves backwards in the completion pager)
- `delete-char`, delete one character to the right of the cursor
- `downcase-word`, make the current word lowercase
- `end-of-buffer`, moves to the end of the buffer, i.e. the end of the first line
- `end-of-history`, move to the end of the history
- `end-of-line`, move to the end of the line

View File

@@ -13,7 +13,7 @@ The following options are available:
- `-s` or `--search` returns the name of the disk file that would be executed, or nothing if no file with the specified name could be found in the `$PATH`.
With the `-s` option, `command` treats every argument as a separate command to look up and sets the exit status to 0 if any of the specified commands were found, or 1 if no commands could be found.
With the `-s` option, `command` treats every argument as a separate command to look up and sets the exit status to 0 if any of the specified commands were found, or 1 if no commands could be found. Additionally passing a `-q` or `--quiet` option prevents any paths from being printed, like the `type -q`, for testing only the exit status.
For basic compatibility with POSIX `command`, the `-v` flag is recognized as an alias for `-s`.

View File

@@ -61,6 +61,10 @@ the fish manual.
- `-C` or `--do-complete` with no argument makes complete try to find all possible completions for the current command line buffer. If the shell is not in interactive mode, an error is returned.
- `-A` and `--authoritative` no longer do anything and are silently ignored.
- `-u` and `--unauthoritative` no longer do anything and are silently ignored.
Command specific tab-completions in `fish` are based on the notion of options and arguments. An option is a parameter which begins with a hyphen, such as '`-h`', '`-help`' or '`--help`'. Arguments are parameters that do not begin with a hyphen. Fish recognizes three styles of options, the same styles as the GNU version of the getopt library. These styles are:
- Short options, like '`-a`'. Short options are a single character long, are preceded by a single hyphen and may be grouped together (like '`-la`', which is equivalent to '`-l -a`'). Option arguments may be specified in the following parameter ('`-w 32`') or by appending the option with the value ('`-w32`').

View File

@@ -31,7 +31,7 @@ The following options are available:
- `-S` or `--no-scope-shadowing` allows the function to access the variables of calling functions. Normally, any variables inside the function that have the same name as variables from the calling function are "shadowed", and their contents is independent of the calling function.
- `-V` or `--inherit-variable NAME` snapshots the value of the variable `NAME` and defines a local variable with that same name and value when the function is executed.
- `-V` or `--inherit-variable NAME` snapshots the value of the variable `NAME` and defines a local variable with that same name and value when the function is defined. This is similar to a closure in other languages like Python but a bit different. Note the word "snapshot" in the first sentence. If you change the value of the variable after defining the function, even if you do so in the same scope (typically another function) the new value will not be used by the function you just created using this option. See the `function notify` example below for how this might be used.
If the user enters any additional arguments after the function, they are inserted into the environment <a href="index.html#variables-arrays">variable array</a> `$argv`. If the `--argument-names` option is provided, the arguments are also assigned to names specified in that option.

View File

@@ -13,6 +13,8 @@ If a `SECTION` is specified, the help for that command is shown.
If the BROWSER environment variable is set, it will be used to display the documentation. Otherwise, fish will search for a suitable browser.
If you prefer to use a different browser (other than as described above) for fish help, you can set the fish_help_browser variable. This variable may be set as an array, where the first element is the browser command and the rest are browser options.
Note that most builtin commands display their help in the terminal when given the `--help` option.

View File

@@ -14,8 +14,6 @@ history ( -h | --help )
`history` is used to search, delete, and otherwise manipulate the history of interactive commands.
Note that for backwards compatibility each subcommand can also be specified as a long option. For example, rather than `history search` you can type `history --search`. Those long options are deprecated and will be removed in a future release.
The following operations (sub-commands) are available:
- `search` returns history items matching the search string. If no search string is provided it returns all history items. This is the default operation if no other operation is specified. You only have to explicitly say `history search` if you wish to search for one of the subcommands. The `--contains` search option will be used if you don't specify a different search option. Entries are ordered newest to oldest. If stdout is attached to a tty the output will be piped through your pager by the history function. The history builtin simply writes the results to stdout.
@@ -60,9 +58,10 @@ history --search --contains "foo"
history --delete --prefix "foo"
# Interactively deletes commands which start with "foo" from the history.
# You can select more than one entry by entering their IDs seperated by a space.
\endfish
\subsection history-notes Notes
If you specify both `--prefix` and `--contains` the last flag seen is used.
\endfish
Note that for backwards compatibility each subcommand can also be specified as a long option. For example, rather than `history search` you can type `history --search`. Those long options are deprecated and will be removed in a future release.

View File

@@ -240,6 +240,8 @@ There are a few important things that need to be noted about aliases:
- If the alias has the same name as the aliased command, it is necessary to prefix the call to the program with `command` in order to tell fish that the function should not call itself, but rather a command with the same name. Failing to do so will cause infinite recursion bugs.
- Autoloading isn't applicable to aliases. Since, by definition, the function is created at the time the alias command is executed. You cannot autoload aliases.
To easily create a function of this form, you can use the <a href="commands.html#alias">alias</a> command.
@@ -263,6 +265,8 @@ It is very important that function definition files only contain the definition
Autoloading also won't work for <a href=#event>event handlers</a>, since fish cannot know that a function is supposed to be executed when an event occurs when it hasn't yet loaded the function. See the <a href=#event>event handlers</a> section for more information.
Autoloading is not applicable to functions created by the `alias` command. For functions simple enough that you prefer to use the `alias` command to define them you'll need to put those commands in your `~/.config/fish/config.fish` script or some other script run when the shell starts.
If you are developing another program, you may wish to install functions which are available for all users of the fish shell on a system. They can be installed to the "vendor" functions directory. As this path may vary from system to system, the `pkgconfig` framework should be used to discover this path with the output of `pkg-config --variable functionsdir fish`.
@@ -865,6 +869,8 @@ If `fish` encounters a problem while executing a command, the status variable ma
- 1 is the generally the exit status from fish builtin commands if they were supplied with invalid arguments
- 123 means that the command was not executed because the command name contained invalid characters
- 124 means that the command was not executed because none of the wildcards in the command produced any matches
- 125 means that while an executable with the specified name was located, the operating system could not actually execute the command
@@ -977,7 +983,7 @@ Some bindings are shared between emacs- and vi-mode because they aren't text edi
- @key{Alt,&uarr;,Up} and @key{Alt,&darr;,Down} search the command history for the previous/next token containing the token under the cursor before the search was started. If the commandline was not on a token when the search started, all tokens match. See the <a href='#history'>history</a> section for more information on history searching.
- @key{Control,C} deletes the entire line.
- @key{Control,C} cancels the entire line.
- @key{Control,D} delete one character to the right of the cursor. If the command line is empty, @key{Control,D} will exit fish.
@@ -987,15 +993,21 @@ Some bindings are shared between emacs- and vi-mode because they aren't text edi
- @key{Control,W} moves the previous path component (everything up to the previous "/") to the <a href="#killring">killring</a>.
- @key{Alt,D} moves the next word to the <a href="#killring">killring</a>.
- @key{Control,X} copies the current buffer to the system's clipboard, @key{Control,V} inserts the clipboard contents.
- @key{Alt,H} (or @key{F1}) shows the manual page for the current command, if one exists.
- @key{Alt,d} moves the next word to the <a href="#killring">killring</a>.
- @key{Alt,L} lists the contents of the current directory, unless the cursor is over a directory argument, in which case the contents of that directory will be listed.
- @key{Alt,h} (or @key{F1}) shows the manual page for the current command, if one exists.
- @key{Alt,P} adds the string '`| less;`' to the end of the job under the cursor. The result is that the output of the command will be paged.
- @key{Alt,l} lists the contents of the current directory, unless the cursor is over a directory argument, in which case the contents of that directory will be listed.
- @key{Alt,W} prints a short description of the command under the cursor.
- @key{Alt,p} adds the string '`| less;`' to the end of the job under the cursor. The result is that the output of the command will be paged.
- @key{Alt,w} prints a short description of the command under the cursor.
- @key{Alt,e} edit the current command line in an external editor. The editor is chosen from the first available of the `$VISUAL` or `$EDITOR` variables.
- @key{Alt,v} Same as @key{Alt,e}.
\subsection emacs-mode Emacs mode commands
@@ -1009,11 +1021,11 @@ Some bindings are shared between emacs- and vi-mode because they aren't text edi
- @key{Control,K} moves contents from the cursor to the end of line to the <a href="#killring">killring</a>.
- @key{Alt,C} capitalizes the current word.
- @key{Alt,c} capitalizes the current word.
- @key{Alt,U} makes the current word uppercase.
- @key{Alt,u} makes the current word uppercase.
- @key{Control, t} transposes the last two characters
- @key{Control,t} transposes the last two characters
- @key{Alt,t} transposes the last two words
@@ -1038,7 +1050,7 @@ function fish_user_key_bindings
end
\endfish
When in vi-mode, the <a href="fish_mode_prompt.html">`fish_mode_prompt`</a> function will display a mode indicator to the left of the prompt. The `fish_vi_cursor` function will be used to change the cursor's shape depending on the mode in supported terminals. To disable this feature, override it with an empty function.
When in vi-mode, the <a href="fish_mode_prompt.html">`fish_mode_prompt`</a> function will display a mode indicator to the left of the prompt. The `fish_vi_cursor` function will be used to change the cursor's shape depending on the mode in supported terminals. To disable this feature, override it with an empty function. To display the mode elsewhere (like in your right prompt), use the output of the `fish_default_mode_prompt` function.
\subsubsection vi-mode-command Command mode
@@ -1068,16 +1080,11 @@ Command mode is also known as normal mode.
- @key{[} and @key{]} search the command history for the previous/next token containing the token under the cursor before the search was started. See the <a href='#history'>history</a> section for more information on history searching.
- @key{Control, X} copies the current buffer to the system's clipboard, @key{Control, V} inserts the clipboard contents.
- @key{Control,C} deletes the entire line.
- @key{Backspace} moves the cursor left.
\subsubsection vi-mode-insert Insert mode
- @key{Escape} or @key{Control,C} enters <a href="#vi-mode-command">command mode</a>.
- @key{Control,x} moves the cursor to the end of the line. If an autosuggestion is available, it will be accepted completely.
- @key{Escape} enters <a href="#vi-mode-command">command mode</a>.
- @key{Backspace} removes one character to the left.

View File

@@ -320,6 +320,38 @@ Permission to use, copy, modify, and/or distribute this software for any purpose
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
----
## License for flock
`fish` also contains small amounts of code from NetBSD, namely the `flock` fallback function. This code is copyright 2001 The NetBSD Foundation, Inc., and derived from software contributed to The NetBSD Foundation by Todd Vierling.
The NetBSD license follows.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
\htmlonly[block]
</div>
</div>

View File

@@ -9,6 +9,8 @@ open FILES...
`open` opens a file in its default application, using the appropriate tool for the operating system. On GNU/Linux, this requires the common but optional `xdg-open` utility, from the `xdg-utils` package.
Note that this function will not be used if a command by this name exists (which is the case on macOS or Haiku).
\subsection open-example Example

View File

@@ -2,31 +2,43 @@
\subsection random-synopsis Synopsis
\fish{synopsis}
random [SEED]
random
random SEED
random START END
random START STEP END
random choice [ITEMS...]
\endfish
\subsection random-description Description
`random` outputs a psuedo-random number from 0 to 32767, inclusive.
Even ignoring the very narrow range of values you should not assume
this produces truly random values within that range. Do not use the
value for any cryptographic purposes, and take care to handle collisions:
the same random number appearing more than once in a given fish instance.
`RANDOM` generates a pseudo-random integer from a uniform distribution. The
range (inclusive) is dependent on the arguments passed.
No arguments indicate a range of [0; 32767].
If one argument is specified, the internal engine will be seeded with the
argument for future invocations of `RANDOM` and no output will be produced.
Two arguments indicate a range of [START; END].
Three arguments indicate a range of [START; END] with a spacing of STEP
between possible outputs.
`RANDOM choice` will select one random item from the succeeding arguments.
If a `SEED` value is provided, it is used to seed the random number
generator, and no output will be produced. This can be useful for debugging
purposes, where it can be desirable to get the same random number sequence
multiple times. If the random number generator is called without first
seeding it, the current time will be used as the seed.
Note that seeding the engine will NOT give the same result across different
systems.
You should not consider `RANDOM` cryptographically secure, or even
statistically accurate.
\subsection random-example Example
The following code will count down from a random number to 1:
The following code will count down from a random even number between 10 and 20 to 1:
\fish
for i in (seq (random) -1 1)
for i in (seq (random 10 2 20) -1 1)
echo $i
sleep
end
\endfish
And this will open a random picture from any of the subdirectories:
\fish
open (random choice **jpg)
\endfish

View File

@@ -43,6 +43,7 @@ If `-a` or `--array` is provided, only one variable name is allowed and the toke
See the documentation for `set` for more details on the scoping rules for variables.
When read reaches the end-of-file (EOF) instead of the separator, it returns 1. If not, it returns 0.
\subsection read-example Example
@@ -50,4 +51,9 @@ The following code stores the value 'hello' in the shell variable `$foo`.
\fish
echo hello|read foo
# This is a neat way to handle command output by-line:
printf '%s\n' line1 line2 line3 line4 | while read -l foo
echo "This is another line: $foo"
end
\endfish

View File

@@ -21,15 +21,18 @@ The following options are available:
- `-b`, `--background` *COLOR* sets the background color.
- `-c`, `--print-colors` prints a list of the 16 named colors.
- `-o`, `--bold` sets bold mode.
- `-d`, `--dim` sets dim mode.
- `-i`, `--italics` sets italics mode.
- `-r`, `--reverse` sets reverse mode.
- `-u`, `--underline` sets underlined mode.
Using the *normal* keyword will reset foreground, background, and all formatting back to default.
Using the *normal* keyword will reset foreground, background, and all formatting back to default.
\subsection set_color-notes Notes
1. Using the *normal* keyword will reset both background and foreground colors to whatever is the default for the terminal.
2. Setting the background color only affects subsequently written characters. Fish provides no way to set the background color for the entire terminal window. Configuring the window background color (and other attributes such as its opacity) has to be done using whatever mechanisms the terminal provides.
3. Some terminals use the `--bold` escape sequence to switch to a brighter color set rather than increasing the weight of text.
3. Some terminals use the `--bold` escape sequence to switch to a brighter color set rather than increasing the weight of text.
4. `set_color` works by printing sequences of characters to *stdout*. If used in command substitution or a pipe, these characters will also be captured. This may or may not be desirable. Checking the exit code of `isatty stdout` before using `set_color` can be useful to decide not to colorize output in a script.
\subsection set_color-example Examples
@@ -50,3 +53,5 @@ If terminfo reports 256 color support for a terminal, support will always be ena
Many terminals support 24-bit (i.e., true-color) color escape sequences. This includes modern xterm, Gnome Terminal, Konsole, and iTerm2. Fish attempts to detect such terminals through various means in `config.fish` You can explicitly force that support via `set fish_term24bit 1`.
The `set_color` command uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it. Fish will assume that all terminals can use the [ANSI X3.64](https://en.wikipedia.org/wiki/ANSI_escape_code) escape sequences if the terminfo definition indicates a color below 16 is not supported.
Support for italics, dim, reverse, and other modes is not guaranteed in all terminal emulators. Fish attempts to determine if the terminal supports these modes even if the terminfo database may not be up-to-date.

View File

@@ -2,33 +2,50 @@
\subsection status-synopsis Synopsis
\fish{synopsis}
status [OPTION]
status
status is-login
status is-interactive
status is-block
status is-command-substitution
status is-no-job-control
status is-full-job-control
status is-interactive-job-control
status current-filename
status current-line-number
status print-stack-trace
status job-control CONTROL-TYPE
\endfish
\subsection status-description Description
With no arguments, `status` displays a summary of the current login and job control status of the shell.
The following options are available:
The following operations (sub-commands) are available:
- `-c` or `--is-command-substitution` returns 0 if fish is currently executing a command substitution.
- `is-command-sub` returns 0 if fish is currently executing a command substitution. Also `-c` or `--is-command-substitution`.
- `-b` or `--is-block` returns 0 if fish is currently executing a block of code.
- `is-block` returns 0 if fish is currently executing a block of code. Also `-b` or `--is-block`.
- `-i` or `--is-interactive` returns 0 if fish is interactive - that is, connected to a keyboard.
- `is-interactive` returns 0 if fish is interactive - that is, connected to a keyboard. Also `-i` or `--is-interactive`.
- `-l` or `--is-login` returns 0 if fish is a login shell - that is, if fish should perform login tasks such as setting up the PATH.
- `is-login` returns 0 if fish is a login shell - that is, if fish should perform login tasks such as setting up the PATH. Also `-l` or `--is-login`.
- `--is-full-job-control` returns 0 if full job control is enabled.
- `is-full-job-control` returns 0 if full job control is enabled. Also `--is-full-job-control` (no short flag).
- `--is-interactive-job-control` returns 0 if interactive job control is enabled.
- `is-interactive-job-control` returns 0 if interactive job control is enabled. Also, `--is-interactive-job-control` (no short flag).
- `--is-no-job-control` returns 0 if no job control is enabled.
- `is-no-job-control` returns 0 if no job control is enabled. Also `--is-no-job-control` (no short flag).
- `-f` or `--current-filename` prints the filename of the currently running script.
- `current-filename` prints the filename of the currently running script. Also `-f` or `--current-filename`.
- `-n` or `--current-line-number` prints the line number of the currently running script.
- `current-line-number` prints the line number of the currently running script. Also `-n` or `--current-line-number`.
- `-j CONTROLTYPE` or `--job-control=CONTROLTYPE` sets the job control type, which can be `none`, `full`, or `interactive`.
- `job-control CONTROL-TYPE` sets the job control type, which can be `none`, `full`, or `interactive`. Also `-j CONTROL-TYPE` or `--job-control=CONTROL-TYPE`.
- `-t` or `--print-stack-trace` prints a stack trace of all function calls on the call stack.
- `print-stack-trace` prints a stack trace of all function calls on the call stack. Also `-t` or `--print-stack-trace`.
\subsection status-notes Notes
For backwards compatibility each subcommand can also be specified as a long or short option. For example, rather than `status is-login` you can type `status --is-login`. The flag forms are deprecated and may be removed in a future release (but not before fish 3.0).
You can only specify one subcommand per invocation even if you use the flag form of the subcommand.

View File

@@ -11,6 +11,10 @@ URL: http://fishshell.com/
Source0: %{name}_@VERSION@.orig.tar.gz
BuildRequires: ncurses-devel gettext gcc-c++ autoconf
%if 0%{?opensuse_bs} && 0%{?rhel} && 0%{?rhel} < 7
BuildRequires: gcc48 gcc48-c++
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: bc
@@ -34,7 +38,19 @@ is simple but incompatible with other shell languages.
%setup -q -n %{name}-@VERSION@
%build
%if 0%{?opensuse_bs} && 0%{?rhel} && 0%{?rhel} < 7
export CC=gcc48
export CXX=g++48
%if 0%{?rhel} < 6
# i686 required for atomic instructions; default is i386
export CXXFLAGS="$CXXFLAGS -march=i686"
%endif
%endif
%if 0%{?opensuse_bs}
%configure || cat config.log
%else
%configure
%endif
make %{?_smp_mflags}
%install

View File

@@ -56,6 +56,7 @@
D01A2C9B16964C8200767098 /* Copy Files */,
);
dependencies = (
9C7A55801DCD73930049C25D /* PBXTargetDependency */,
D0F01A1315AA36280034B3B1 /* PBXTargetDependency */,
D0F01A1715AA36300034B3B1 /* PBXTargetDependency */,
D0A564EF168D09C000AF6161 /* PBXTargetDependency */,
@@ -67,6 +68,72 @@
/* Begin PBXBuildFile section */
63A2C0E91CC60F3B00973404 /* pcre2_find_bracket.c in Sources */ = {isa = PBXBuildFile; fileRef = 63A2C0E81CC5F9FB00973404 /* pcre2_find_bracket.c */; };
9C7A55271DCD651F0049C25D /* fallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853E13B3ACEE0099B651 /* fallback.cpp */; };
9C7A55281DCD65540049C25D /* builtin_commandline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853013B3ACEE0099B651 /* builtin_commandline.cpp */; };
9C7A55291DCD65540049C25D /* builtin_complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853113B3ACEE0099B651 /* builtin_complete.cpp */; };
9C7A552A1DCD65540049C25D /* builtin_jobs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853213B3ACEE0099B651 /* builtin_jobs.cpp */; };
9C7A552B1DCD65540049C25D /* builtin_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853313B3ACEE0099B651 /* builtin_set.cpp */; };
9C7A552C1DCD65540049C25D /* builtin_set_color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C861EA16CC7054003B5A04 /* builtin_set_color.cpp */; };
9C7A552D1DCD65540049C25D /* builtin_ulimit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853413B3ACEE0099B651 /* builtin_ulimit.cpp */; };
9C7A552E1DCD65540049C25D /* builtin_printf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0CA63F316FC275F00093BD4 /* builtin_printf.cpp */; };
9C7A552F1DCD65820049C25D /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855E13B3ACEE0099B651 /* util.cpp */; };
9C7A55361DCD71330049C25D /* autoload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C6FCC914CFA4B0004CE8AD /* autoload.cpp */; };
9C7A55371DCD71330049C25D /* builtin_commandline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853013B3ACEE0099B651 /* builtin_commandline.cpp */; };
9C7A55381DCD71330049C25D /* builtin_complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853113B3ACEE0099B651 /* builtin_complete.cpp */; };
9C7A55391DCD71330049C25D /* builtin_jobs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853213B3ACEE0099B651 /* builtin_jobs.cpp */; };
9C7A553A1DCD71330049C25D /* builtin_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853313B3ACEE0099B651 /* builtin_set.cpp */; };
9C7A553B1DCD71330049C25D /* builtin_set_color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C861EA16CC7054003B5A04 /* builtin_set_color.cpp */; };
9C7A553C1DCD71330049C25D /* builtin_ulimit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853413B3ACEE0099B651 /* builtin_ulimit.cpp */; };
9C7A553D1DCD71330049C25D /* builtin_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0F3373A1506DE3C00ECEFC0 /* builtin_test.cpp */; };
9C7A553E1DCD71330049C25D /* builtin_printf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0CA63F316FC275F00093BD4 /* builtin_printf.cpp */; };
9C7A553F1DCD71330049C25D /* builtin_string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F7B1BA4BF4000B0F227 /* builtin_string.cpp */; };
9C7A55401DCD71330049C25D /* color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0B6B0FE14E88BA400AD6C10 /* color.cpp */; };
9C7A55411DCD71330049C25D /* common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853613B3ACEE0099B651 /* common.cpp */; };
9C7A55421DCD71330049C25D /* event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853B13B3ACEE0099B651 /* event.cpp */; };
9C7A55431DCD71330049C25D /* input_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854913B3ACEE0099B651 /* input_common.cpp */; };
9C7A55441DCD71330049C25D /* io.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854C13B3ACEE0099B651 /* io.cpp */; };
9C7A55451DCD71330049C25D /* iothread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854D13B3ACEE0099B651 /* iothread.cpp */; };
9C7A55461DCD71330049C25D /* parse_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855213B3ACEE0099B651 /* parse_util.cpp */; };
9C7A55471DCD71330049C25D /* path.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855513B3ACEE0099B651 /* path.cpp */; };
9C7A55481DCD71330049C25D /* parse_execution.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D052D8091868F7FC003ABCBD /* parse_execution.cpp */; };
9C7A55491DCD71330049C25D /* postfork.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D09B1C1914FC7B5B00F91077 /* postfork.cpp */; };
9C7A554A1DCD71330049C25D /* screen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855A13B3ACEE0099B651 /* screen.cpp */; };
9C7A554B1DCD71330049C25D /* signal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855C13B3ACEE0099B651 /* signal.cpp */; };
9C7A554C1DCD71330049C25D /* utf8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C9733718DE5449002D7C81 /* utf8.cpp */; };
9C7A554D1DCD71330049C25D /* builtin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853513B3ACEE0099B651 /* builtin.cpp */; };
9C7A554E1DCD71330049C25D /* function.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854413B3ACEE0099B651 /* function.cpp */; };
9C7A554F1DCD71330049C25D /* complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853713B3ACEE0099B651 /* complete.cpp */; };
9C7A55501DCD71330049C25D /* env.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853A13B3ACEE0099B651 /* env.cpp */; };
9C7A55511DCD71330049C25D /* exec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853C13B3ACEE0099B651 /* exec.cpp */; };
9C7A55521DCD71330049C25D /* wcstringutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0F5B46319CFCDE80090665E /* wcstringutil.cpp */; };
9C7A55531DCD71330049C25D /* expand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853D13B3ACEE0099B651 /* expand.cpp */; };
9C7A55541DCD71330049C25D /* fallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853E13B3ACEE0099B651 /* fallback.cpp */; };
9C7A55551DCD71330049C25D /* fish_version.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D00F63F019137E9D00FCCDEC /* fish_version.cpp */; settings = {COMPILER_FLAGS = "-I$(DERIVED_FILE_DIR)"; }; };
9C7A55561DCD71330049C25D /* highlight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854713B3ACEE0099B651 /* highlight.cpp */; };
9C7A55571DCD71330049C25D /* history.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854813B3ACEE0099B651 /* history.cpp */; };
9C7A55581DCD71330049C25D /* kill.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854F13B3ACEE0099B651 /* kill.cpp */; };
9C7A55591DCD71330049C25D /* parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855413B3ACEE0099B651 /* parser.cpp */; };
9C7A555A1DCD71330049C25D /* parser_keywords.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855313B3ACEE0099B651 /* parser_keywords.cpp */; };
9C7A555B1DCD71330049C25D /* proc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855713B3ACEE0099B651 /* proc.cpp */; };
9C7A555C1DCD71330049C25D /* reader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855813B3ACEE0099B651 /* reader.cpp */; };
9C7A555D1DCD71330049C25D /* sanity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855913B3ACEE0099B651 /* sanity.cpp */; };
9C7A555E1DCD71330049C25D /* tokenizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855D13B3ACEE0099B651 /* tokenizer.cpp */; };
9C7A555F1DCD71330049C25D /* wildcard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0856013B3ACEE0099B651 /* wildcard.cpp */; };
9C7A55601DCD71330049C25D /* wgetopt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855F13B3ACEE0099B651 /* wgetopt.cpp */; };
9C7A55611DCD71330049C25D /* wutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0856113B3ACEE0099B651 /* wutil.cpp */; };
9C7A55621DCD71330049C25D /* input.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854A13B3ACEE0099B651 /* input.cpp */; };
9C7A55631DCD71330049C25D /* output.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855113B3ACEE0099B651 /* output.cpp */; };
9C7A55641DCD71330049C25D /* intern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854B13B3ACEE0099B651 /* intern.cpp */; };
9C7A55651DCD71330049C25D /* env_universal_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853813B3ACEE0099B651 /* env_universal_common.cpp */; };
9C7A55661DCD71330049C25D /* pager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D03238891849D1980032CF2C /* pager.cpp */; };
9C7A55681DCD71330049C25D /* parse_tree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C52F351765284C00BFAB82 /* parse_tree.cpp */; };
9C7A55691DCD71330049C25D /* parse_productions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FE8EE7179FB75F008C9F21 /* parse_productions.cpp */; };
9C7A556A1DCD71330049C25D /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855E13B3ACEE0099B651 /* util.cpp */; };
9C7A556C1DCD71330049C25D /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D02A8C15983CFA008E62BD /* libncurses.dylib */; };
9C7A556D1DCD71330049C25D /* libpcre2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D04F7FD01BA4E29300B0F227 /* libpcre2.a */; };
9C7A557D1DCD71890049C25D /* fish_key_reader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9C7A557C1DCD717C0049C25D /* fish_key_reader.cpp */; };
9C7A557E1DCD71CD0049C25D /* print_help.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855613B3ACEE0099B651 /* print_help.cpp */; };
9C7A55811DCD739C0049C25D /* fish_key_reader in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9C7A55721DCD71330049C25D /* fish_key_reader */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
D00769121990137800CA4627 /* autoload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C6FCC914CFA4B0004CE8AD /* autoload.cpp */; };
D00769131990137800CA4627 /* builtin_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0F3373A1506DE3C00ECEFC0 /* builtin_test.cpp */; };
D00769141990137800CA4627 /* color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0B6B0FE14E88BA400AD6C10 /* color.cpp */; };
@@ -286,6 +353,27 @@
/* End PBXBuildRule section */
/* Begin PBXContainerItemProxy section */
9C7A55321DCD71330049C25D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D0A084F213B3AC130099B651 /* Project object */;
proxyType = 1;
remoteGlobalIDString = D008D0C41BC58F8800841177;
remoteInfo = "generate-version-header";
};
9C7A55341DCD71330049C25D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D0A084F213B3AC130099B651 /* Project object */;
proxyType = 1;
remoteGlobalIDString = D04F7FCF1BA4E29300B0F227;
remoteInfo = libpcre2.a;
};
9C7A557F1DCD73930049C25D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D0A084F213B3AC130099B651 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 9C7A55301DCD71330049C25D;
remoteInfo = fish_key_reader;
};
D008D0CA1BC58FDD00841177 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D0A084F213B3AC130099B651 /* Project object */;
@@ -438,6 +526,7 @@
dstPath = base/bin;
dstSubfolderSpec = 1;
files = (
9C7A55811DCD739C0049C25D /* fish_key_reader in CopyFiles */,
D0F019F115A977140034B3B1 /* fish in CopyFiles */,
D0F019F315A977290034B3B1 /* fish_indent in CopyFiles */,
);
@@ -468,6 +557,17 @@
/* Begin PBXFileReference section */
4E142D731B56B5D7008783C8 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../osx/config.h; sourceTree = "<group>"; };
63A2C0E81CC5F9FB00973404 /* pcre2_find_bracket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_find_bracket.c; sourceTree = "<group>"; };
9C7A55721DCD71330049C25D /* fish_key_reader */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = fish_key_reader; sourceTree = BUILT_PRODUCTS_DIR; };
9C7A55731DCD716F0049C25D /* builtin_commandline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_commandline.h; sourceTree = "<group>"; };
9C7A55741DCD716F0049C25D /* builtin_complete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_complete.h; sourceTree = "<group>"; };
9C7A55751DCD716F0049C25D /* builtin_jobs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_jobs.h; sourceTree = "<group>"; };
9C7A55761DCD716F0049C25D /* builtin_printf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_printf.h; sourceTree = "<group>"; };
9C7A55771DCD716F0049C25D /* builtin_set_color.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_set_color.h; sourceTree = "<group>"; };
9C7A55781DCD716F0049C25D /* builtin_set.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_set.h; sourceTree = "<group>"; };
9C7A55791DCD716F0049C25D /* builtin_string.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_string.h; sourceTree = "<group>"; };
9C7A557A1DCD716F0049C25D /* builtin_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_test.h; sourceTree = "<group>"; };
9C7A557B1DCD716F0049C25D /* builtin_ulimit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_ulimit.h; sourceTree = "<group>"; };
9C7A557C1DCD717C0049C25D /* fish_key_reader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fish_key_reader.cpp; sourceTree = "<group>"; };
D00769421990137800CA4627 /* fish_tests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = fish_tests; sourceTree = BUILT_PRODUCTS_DIR; };
D00F63F019137E9D00FCCDEC /* fish_version.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fish_version.cpp; sourceTree = "<group>"; };
D01A2D23169B730A00767098 /* man1 */ = {isa = PBXFileReference; lastKnownFileType = text; name = man1; path = pages_for_manpath/man1; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -618,6 +718,15 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
9C7A556B1DCD71330049C25D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9C7A556C1DCD71330049C25D /* libncurses.dylib in Frameworks */,
9C7A556D1DCD71330049C25D /* libpcre2.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D007693C1990137800CA4627 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -743,6 +852,16 @@
D0D02A91159845EF008E62BD /* Sources */ = {
isa = PBXGroup;
children = (
9C7A557C1DCD717C0049C25D /* fish_key_reader.cpp */,
9C7A55731DCD716F0049C25D /* builtin_commandline.h */,
9C7A55741DCD716F0049C25D /* builtin_complete.h */,
9C7A55751DCD716F0049C25D /* builtin_jobs.h */,
9C7A55761DCD716F0049C25D /* builtin_printf.h */,
9C7A55771DCD716F0049C25D /* builtin_set_color.h */,
9C7A55781DCD716F0049C25D /* builtin_set.h */,
9C7A55791DCD716F0049C25D /* builtin_string.h */,
9C7A557A1DCD716F0049C25D /* builtin_test.h */,
9C7A557B1DCD716F0049C25D /* builtin_ulimit.h */,
4E142D731B56B5D7008783C8 /* config.h */,
D0C6FCCB14CFA4B7004CE8AD /* autoload.h */,
D0C6FCC914CFA4B0004CE8AD /* autoload.cpp */,
@@ -888,6 +1007,7 @@
D0D02AD01598642A008E62BD /* fish_indent */,
D00769421990137800CA4627 /* fish_tests */,
D04F7FD01BA4E29300B0F227 /* libpcre2.a */,
9C7A55721DCD71330049C25D /* fish_key_reader */,
);
name = Products;
sourceTree = "<group>";
@@ -905,6 +1025,24 @@
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
9C7A55301DCD71330049C25D /* fish_key_reader */ = {
isa = PBXNativeTarget;
buildConfigurationList = 9C7A556E1DCD71330049C25D /* Build configuration list for PBXNativeTarget "fish_key_reader" */;
buildPhases = (
9C7A55351DCD71330049C25D /* Sources */,
9C7A556B1DCD71330049C25D /* Frameworks */,
);
buildRules = (
);
dependencies = (
9C7A55311DCD71330049C25D /* PBXTargetDependency */,
9C7A55331DCD71330049C25D /* PBXTargetDependency */,
);
name = fish_key_reader;
productName = fish_Xcode;
productReference = 9C7A55721DCD71330049C25D /* fish_key_reader */;
productType = "com.apple.product-type.tool";
};
D00769101990137800CA4627 /* fish_tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = D007693E1990137800CA4627 /* Build configuration list for PBXNativeTarget "fish_tests" */;
@@ -1000,7 +1138,7 @@
D0A084F213B3AC130099B651 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0820;
TargetAttributes = {
D008D0C41BC58F8800841177 = {
CreatedOnToolsVersion = 7.0.1;
@@ -1031,6 +1169,7 @@
D00769101990137800CA4627 /* fish_tests */,
D04F7FCF1BA4E29300B0F227 /* pcre2 */,
D008D0C41BC58F8800841177 /* generate-version-header */,
9C7A55301DCD71330049C25D /* fish_key_reader */,
);
};
/* End PBXProject section */
@@ -1226,10 +1365,80 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
9C7A55351DCD71330049C25D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9C7A557E1DCD71CD0049C25D /* print_help.cpp in Sources */,
9C7A557D1DCD71890049C25D /* fish_key_reader.cpp in Sources */,
9C7A55361DCD71330049C25D /* autoload.cpp in Sources */,
9C7A55371DCD71330049C25D /* builtin_commandline.cpp in Sources */,
9C7A55381DCD71330049C25D /* builtin_complete.cpp in Sources */,
9C7A55391DCD71330049C25D /* builtin_jobs.cpp in Sources */,
9C7A553A1DCD71330049C25D /* builtin_set.cpp in Sources */,
9C7A553B1DCD71330049C25D /* builtin_set_color.cpp in Sources */,
9C7A553C1DCD71330049C25D /* builtin_ulimit.cpp in Sources */,
9C7A553D1DCD71330049C25D /* builtin_test.cpp in Sources */,
9C7A553E1DCD71330049C25D /* builtin_printf.cpp in Sources */,
9C7A553F1DCD71330049C25D /* builtin_string.cpp in Sources */,
9C7A55401DCD71330049C25D /* color.cpp in Sources */,
9C7A55411DCD71330049C25D /* common.cpp in Sources */,
9C7A55421DCD71330049C25D /* event.cpp in Sources */,
9C7A55431DCD71330049C25D /* input_common.cpp in Sources */,
9C7A55441DCD71330049C25D /* io.cpp in Sources */,
9C7A55451DCD71330049C25D /* iothread.cpp in Sources */,
9C7A55461DCD71330049C25D /* parse_util.cpp in Sources */,
9C7A55471DCD71330049C25D /* path.cpp in Sources */,
9C7A55481DCD71330049C25D /* parse_execution.cpp in Sources */,
9C7A55491DCD71330049C25D /* postfork.cpp in Sources */,
9C7A554A1DCD71330049C25D /* screen.cpp in Sources */,
9C7A554B1DCD71330049C25D /* signal.cpp in Sources */,
9C7A554C1DCD71330049C25D /* utf8.cpp in Sources */,
9C7A554D1DCD71330049C25D /* builtin.cpp in Sources */,
9C7A554E1DCD71330049C25D /* function.cpp in Sources */,
9C7A554F1DCD71330049C25D /* complete.cpp in Sources */,
9C7A55501DCD71330049C25D /* env.cpp in Sources */,
9C7A55511DCD71330049C25D /* exec.cpp in Sources */,
9C7A55521DCD71330049C25D /* wcstringutil.cpp in Sources */,
9C7A55531DCD71330049C25D /* expand.cpp in Sources */,
9C7A55541DCD71330049C25D /* fallback.cpp in Sources */,
9C7A55551DCD71330049C25D /* fish_version.cpp in Sources */,
9C7A55561DCD71330049C25D /* highlight.cpp in Sources */,
9C7A55571DCD71330049C25D /* history.cpp in Sources */,
9C7A55581DCD71330049C25D /* kill.cpp in Sources */,
9C7A55591DCD71330049C25D /* parser.cpp in Sources */,
9C7A555A1DCD71330049C25D /* parser_keywords.cpp in Sources */,
9C7A555B1DCD71330049C25D /* proc.cpp in Sources */,
9C7A555C1DCD71330049C25D /* reader.cpp in Sources */,
9C7A555D1DCD71330049C25D /* sanity.cpp in Sources */,
9C7A555E1DCD71330049C25D /* tokenizer.cpp in Sources */,
9C7A555F1DCD71330049C25D /* wildcard.cpp in Sources */,
9C7A55601DCD71330049C25D /* wgetopt.cpp in Sources */,
9C7A55611DCD71330049C25D /* wutil.cpp in Sources */,
9C7A55621DCD71330049C25D /* input.cpp in Sources */,
9C7A55631DCD71330049C25D /* output.cpp in Sources */,
9C7A55641DCD71330049C25D /* intern.cpp in Sources */,
9C7A55651DCD71330049C25D /* env_universal_common.cpp in Sources */,
9C7A55661DCD71330049C25D /* pager.cpp in Sources */,
9C7A55681DCD71330049C25D /* parse_tree.cpp in Sources */,
9C7A55691DCD71330049C25D /* parse_productions.cpp in Sources */,
9C7A556A1DCD71330049C25D /* util.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D00769111990137800CA4627 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9C7A552F1DCD65820049C25D /* util.cpp in Sources */,
9C7A55281DCD65540049C25D /* builtin_commandline.cpp in Sources */,
9C7A55291DCD65540049C25D /* builtin_complete.cpp in Sources */,
9C7A552A1DCD65540049C25D /* builtin_jobs.cpp in Sources */,
9C7A552B1DCD65540049C25D /* builtin_set.cpp in Sources */,
9C7A552C1DCD65540049C25D /* builtin_set_color.cpp in Sources */,
9C7A552D1DCD65540049C25D /* builtin_ulimit.cpp in Sources */,
9C7A552E1DCD65540049C25D /* builtin_printf.cpp in Sources */,
9C7A55271DCD651F0049C25D /* fallback.cpp in Sources */,
D00769121990137800CA4627 /* autoload.cpp in Sources */,
D00769131990137800CA4627 /* builtin_test.cpp in Sources */,
D00769141990137800CA4627 /* color.cpp in Sources */,
@@ -1440,6 +1649,21 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
9C7A55311DCD71330049C25D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = D008D0C41BC58F8800841177 /* generate-version-header */;
targetProxy = 9C7A55321DCD71330049C25D /* PBXContainerItemProxy */;
};
9C7A55331DCD71330049C25D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = D04F7FCF1BA4E29300B0F227 /* pcre2 */;
targetProxy = 9C7A55341DCD71330049C25D /* PBXContainerItemProxy */;
};
9C7A55801DCD73930049C25D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 9C7A55301DCD71330049C25D /* fish_key_reader */;
targetProxy = 9C7A557F1DCD73930049C25D /* PBXContainerItemProxy */;
};
D008D0CB1BC58FDD00841177 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = D008D0C41BC58F8800841177 /* generate-version-header */;
@@ -1503,6 +1727,30 @@
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
9C7A556F1DCD71330049C25D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
LLVM_LTO = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
9C7A55701DCD71330049C25D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
LLVM_LTO = YES_THIN;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
D007693F1990137800CA4627 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -1511,6 +1759,7 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
LLVM_LTO = NO;
PRODUCT_NAME = fish_tests;
};
name = Debug;
@@ -1523,139 +1772,11 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
LLVM_LTO = YES_THIN;
PRODUCT_NAME = fish_tests;
};
name = Release;
};
D00769411990137800CA4627 /* Release_C++11 */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
PRODUCT_NAME = fish_tests;
};
name = "Release_C++11";
};
D007FDDA17136EAA00A52BE6 /* Release_C++11 */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_ENABLE_CPP_EXCEPTIONS = NO;
GCC_ENABLE_CPP_RTTI = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"LOCALEDIR=\\\"/usr/local/share/locale\\\"",
"PREFIX=L\\\"/usr/local\\\"",
"DATADIR=L\\\"/usr/local/share\\\"",
"SYSCONFDIR=L\\\"/usr/local/etc\\\"",
"BINDIR=L\\\"/usr/local/bin\\\"",
"DOCDIR=L\\\"/usr/local/share/doc\\\"",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx;
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx $(SRCROOT)/osx/shared_headers $(SHARED_DERIVED_FILE_DIR)";
WARNING_CFLAGS = (
"-Wall",
"-Wunused-macros",
);
};
name = "Release_C++11";
};
D007FDDB17136EAA00A52BE6 /* Release_C++11 */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
INSTALL_PATH = /usr/local;
PRODUCT_NAME = "base copy";
SKIP_INSTALL = NO;
};
name = "Release_C++11";
};
D007FDDC17136EAA00A52BE6 /* Release_C++11 */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
INSTALL_PATH = /usr/local;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = NO;
};
name = "Release_C++11";
};
D007FDDD17136EAA00A52BE6 /* Release_C++11 */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
EXECUTABLE_NAME = fish_launcher;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
INFOPLIST_FILE = osx/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = "com.ridiculousfish.fish-shell";
PRODUCT_NAME = fish;
WRAPPER_EXTENSION = app;
};
name = "Release_C++11";
};
D007FDDE17136EAA00A52BE6 /* Release_C++11 */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
PRODUCT_NAME = fish;
};
name = "Release_C++11";
};
D007FDE017136EAA00A52BE6 /* Release_C++11 */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = "Release_C++11";
};
D007FDE217136EAA00A52BE6 /* Release_C++11 */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = "Release_C++11";
};
D008D0C51BC58F8800841177 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -1670,13 +1791,6 @@
};
name = Release;
};
D008D0C71BC58F8800841177 /* Release_C++11 */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = "Release_C++11";
};
D04F7FD21BA4E29300B0F227 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -1694,11 +1808,12 @@
);
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
LLVM_LTO = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/pcre2 $(SRCROOT)/osx/shared_headers/";
USE_HEADERMAP = NO;
WARNING_CFLAGS = "";
WARNING_CFLAGS = "-Wno-unreachable-code";
};
name = Debug;
};
@@ -1719,39 +1834,15 @@
);
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
LLVM_LTO = YES_THIN;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/pcre2 $(SRCROOT)/osx/shared_headers/";
USE_HEADERMAP = NO;
WARNING_CFLAGS = "";
WARNING_CFLAGS = "-Wno-unreachable-code";
};
name = Release;
};
D04F7FD41BA4E29300B0F227 /* Release_C++11 */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
GCC_INPUT_FILETYPE = sourcecode.c.c;
GCC_PREPROCESSOR_DEFINITIONS = (
"LOCALEDIR=\\\"/usr/local/share/locale\\\"",
"PREFIX=L\\\"/usr/local\\\"",
"DATADIR=L\\\"/usr/local/share\\\"",
"SYSCONFDIR=L\\\"/usr/local/etc\\\"",
"BINDIR=L\\\"/usr/local/bin\\\"",
"DOCDIR=L\\\"/usr/local/share/doc\\\"",
"PCRE2_CODE_UNIT_WIDTH=32",
"HAVE_CONFIG_H=1",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/pcre2 $(SRCROOT)/osx/shared_headers/";
USE_HEADERMAP = NO;
WARNING_CFLAGS = "";
};
name = "Release_C++11";
};
D07D267015E33B86009E43F6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -1776,6 +1867,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@@ -1811,7 +1904,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.6;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx $(SRCROOT)/osx/shared_headers $(SHARED_DERIVED_FILE_DIR)";
@@ -1826,6 +1919,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@@ -1859,7 +1954,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.6;
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx;
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx $(SRCROOT)/osx/shared_headers $(SHARED_DERIVED_FILE_DIR)";
WARNING_CFLAGS = (
@@ -1900,6 +1995,7 @@
);
GCC_WARN_UNINITIALIZED_AUTOS = YES;
INFOPLIST_FILE = osx/Info.plist;
LLVM_LTO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.ridiculousfish.fish-shell";
PRODUCT_NAME = fish;
WRAPPER_EXTENSION = app;
@@ -1917,6 +2013,7 @@
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
INFOPLIST_FILE = osx/Info.plist;
LLVM_LTO = YES_THIN;
PRODUCT_BUNDLE_IDENTIFIER = "com.ridiculousfish.fish-shell";
PRODUCT_NAME = fish;
WRAPPER_EXTENSION = app;
@@ -1935,6 +2032,7 @@
"$(inherited)",
);
GCC_WARN_UNINITIALIZED_AUTOS = YES;
LLVM_LTO = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
@@ -1947,6 +2045,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
LLVM_LTO = YES_THIN;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
@@ -1958,6 +2057,7 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
LLVM_LTO = NO;
PRODUCT_NAME = fish;
};
name = Debug;
@@ -1969,6 +2069,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
LLVM_LTO = YES_THIN;
PRODUCT_NAME = fish;
};
name = Release;
@@ -1996,12 +2097,20 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
9C7A556E1DCD71330049C25D /* Build configuration list for PBXNativeTarget "fish_key_reader" */ = {
isa = XCConfigurationList;
buildConfigurations = (
9C7A556F1DCD71330049C25D /* Debug */,
9C7A55701DCD71330049C25D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D007693E1990137800CA4627 /* Build configuration list for PBXNativeTarget "fish_tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D007693F1990137800CA4627 /* Debug */,
D00769401990137800CA4627 /* Release */,
D00769411990137800CA4627 /* Release_C++11 */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -2011,7 +2120,6 @@
buildConfigurations = (
D008D0C51BC58F8800841177 /* Debug */,
D008D0C61BC58F8800841177 /* Release */,
D008D0C71BC58F8800841177 /* Release_C++11 */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -2021,7 +2129,6 @@
buildConfigurations = (
D04F7FD21BA4E29300B0F227 /* Debug */,
D04F7FD31BA4E29300B0F227 /* Release */,
D04F7FD41BA4E29300B0F227 /* Release_C++11 */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -2031,7 +2138,6 @@
buildConfigurations = (
D07D267015E33B86009E43F6 /* Debug */,
D07D267115E33B86009E43F6 /* Release */,
D007FDDB17136EAA00A52BE6 /* Release_C++11 */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -2041,7 +2147,6 @@
buildConfigurations = (
D0A084F813B3AC130099B651 /* Debug */,
D0A084F913B3AC130099B651 /* Release */,
D007FDDA17136EAA00A52BE6 /* Release_C++11 */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -2051,7 +2156,6 @@
buildConfigurations = (
D0A564E7168CFDD800AF6161 /* Debug */,
D0A564E8168CFDD800AF6161 /* Release */,
D007FDE217136EAA00A52BE6 /* Release_C++11 */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -2061,7 +2165,6 @@
buildConfigurations = (
D0D02AA515985A75008E62BD /* Debug */,
D0D02AA615985A75008E62BD /* Release */,
D007FDDD17136EAA00A52BE6 /* Release_C++11 */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -2071,7 +2174,6 @@
buildConfigurations = (
D0D02AD41598642A008E62BD /* Debug */,
D0D02AD51598642A008E62BD /* Release */,
D007FDE017136EAA00A52BE6 /* Release_C++11 */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -2081,7 +2183,6 @@
buildConfigurations = (
D0D26944159835CA005D9B9C /* Debug */,
D0D26945159835CA005D9B9C /* Release */,
D007FDDE17136EAA00A52BE6 /* Release_C++11 */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -2091,7 +2192,6 @@
buildConfigurations = (
D0F019EE15A976F30034B3B1 /* Debug */,
D0F019EF15A976F30034B3B1 /* Release */,
D007FDDC17136EAA00A52BE6 /* Release_C++11 */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

562
m4/ax_cxx_compile_stdcxx.m4 Normal file
View File

@@ -0,0 +1,562 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the specified
# version of the C++ standard. If necessary, add switches to CXX and
# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard)
# or '14' (for the C++14 standard).
#
# The second argument, if specified, indicates whether you insist on an
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
# -std=c++11). If neither is specified, you get whatever works, with
# preference for an extended mode.
#
# The third argument, if specified 'mandatory' or if left unspecified,
# indicates that baseline support for the specified C++ standard is
# required and that the macro should error out if no mode with that
# support is found. If specified 'optional', then configuration proceeds
# regardless, after defining HAVE_CXX${VERSION} if and only if a
# supporting mode is found.
#
# LICENSE
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 4
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
dnl (serial version number 13).
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
m4_if([$1], [11], [],
[$1], [14], [],
[$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])],
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$2], [], [],
[$2], [ext], [],
[$2], [noext], [],
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
[$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
[$3], [optional], [ax_cxx_compile_cxx$1_required=false],
[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
AC_LANG_PUSH([C++])dnl
ac_success=no
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
ax_cv_cxx_compile_cxx$1,
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[ax_cv_cxx_compile_cxx$1=yes],
[ax_cv_cxx_compile_cxx$1=no])])
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
ac_success=yes
fi
m4_if([$2], [noext], [], [dnl
if test x$ac_success = xno; then
for switch in -std=gnu++$1 -std=gnu++0x; do
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXX="$CXX"
CXX="$CXX $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXX="$ac_save_CXX"])
if eval test x\$$cachevar = xyes; then
CXX="$CXX $switch"
if test -n "$CXXCPP" ; then
CXXCPP="$CXXCPP $switch"
fi
ac_success=yes
break
fi
done
fi])
m4_if([$2], [ext], [], [dnl
if test x$ac_success = xno; then
dnl HP's aCC needs +std=c++11 according to:
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
dnl Cray's crayCC needs "-h std=c++11"
for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXX="$CXX"
CXX="$CXX $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXX="$ac_save_CXX"])
if eval test x\$$cachevar = xyes; then
CXX="$CXX $switch"
if test -n "$CXXCPP" ; then
CXXCPP="$CXXCPP $switch"
fi
ac_success=yes
break
fi
done
fi])
AC_LANG_POP([C++])
if test x$ax_cxx_compile_cxx$1_required = xtrue; then
if test x$ac_success = xno; then
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
fi
fi
if test x$ac_success = xno; then
HAVE_CXX$1=0
AC_MSG_NOTICE([No compiler with C++$1 support was found])
else
HAVE_CXX$1=1
AC_DEFINE(HAVE_CXX$1,1,
[define if the compiler supports basic C++$1 syntax])
fi
AC_SUBST(HAVE_CXX$1)
])
dnl Test body for checking C++11 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
)
dnl Test body for checking C++14 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
)
dnl Tests for new features in C++11
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
// If the compiler admits that it is not ready for C++11, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201103L
#error "This is not a C++11 compiler"
#else
namespace cxx11
{
namespace test_static_assert
{
template <typename T>
struct check
{
static_assert(sizeof(int) <= sizeof(T), "not big enough");
};
}
namespace test_final_override
{
struct Base
{
virtual void f() {}
};
struct Derived : public Base
{
virtual void f() override {}
};
}
namespace test_double_right_angle_brackets
{
template < typename T >
struct check {};
typedef check<void> single_type;
typedef check<check<void>> double_type;
typedef check<check<check<void>>> triple_type;
typedef check<check<check<check<void>>>> quadruple_type;
}
namespace test_decltype
{
int
f()
{
int a = 1;
decltype(a) b = 2;
return a + b;
}
}
namespace test_type_deduction
{
template < typename T1, typename T2 >
struct is_same
{
static const bool value = false;
};
template < typename T >
struct is_same<T, T>
{
static const bool value = true;
};
template < typename T1, typename T2 >
auto
add(T1 a1, T2 a2) -> decltype(a1 + a2)
{
return a1 + a2;
}
int
test(const int c, volatile int v)
{
static_assert(is_same<int, decltype(0)>::value == true, "");
static_assert(is_same<int, decltype(c)>::value == false, "");
static_assert(is_same<int, decltype(v)>::value == false, "");
auto ac = c;
auto av = v;
auto sumi = ac + av + 'x';
auto sumf = ac + av + 1.0;
static_assert(is_same<int, decltype(ac)>::value == true, "");
static_assert(is_same<int, decltype(av)>::value == true, "");
static_assert(is_same<int, decltype(sumi)>::value == true, "");
static_assert(is_same<int, decltype(sumf)>::value == false, "");
static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
return (sumf > 0.0) ? sumi : add(c, v);
}
}
namespace test_noexcept
{
int f() { return 0; }
int g() noexcept { return 0; }
static_assert(noexcept(f()) == false, "");
static_assert(noexcept(g()) == true, "");
}
namespace test_constexpr
{
template < typename CharT >
unsigned long constexpr
strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
{
return *s ? strlen_c_r(s + 1, acc + 1) : acc;
}
template < typename CharT >
unsigned long constexpr
strlen_c(const CharT *const s) noexcept
{
return strlen_c_r(s, 0UL);
}
static_assert(strlen_c("") == 0UL, "");
static_assert(strlen_c("1") == 1UL, "");
static_assert(strlen_c("example") == 7UL, "");
static_assert(strlen_c("another\0example") == 7UL, "");
}
namespace test_rvalue_references
{
template < int N >
struct answer
{
static constexpr int value = N;
};
answer<1> f(int&) { return answer<1>(); }
answer<2> f(const int&) { return answer<2>(); }
answer<3> f(int&&) { return answer<3>(); }
void
test()
{
int i = 0;
const int c = 0;
static_assert(decltype(f(i))::value == 1, "");
static_assert(decltype(f(c))::value == 2, "");
static_assert(decltype(f(0))::value == 3, "");
}
}
namespace test_uniform_initialization
{
struct test
{
static const int zero {};
static const int one {1};
};
static_assert(test::zero == 0, "");
static_assert(test::one == 1, "");
}
namespace test_lambdas
{
void
test1()
{
auto lambda1 = [](){};
auto lambda2 = lambda1;
lambda1();
lambda2();
}
int
test2()
{
auto a = [](int i, int j){ return i + j; }(1, 2);
auto b = []() -> int { return '0'; }();
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
const auto identity = [](int y){ return y; };
for (auto i = 0; i < a; ++i)
a += b--;
return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
int
test3()
{
const auto nullary = [](){ return 0; };
const auto unary = [](int x){ return x; };
using nullary_t = decltype(nullary);
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
}
namespace test_variadic_templates
{
template <int...>
struct sum;
template <int N0, int... N1toN>
struct sum<N0, N1toN...>
{
static constexpr auto value = N0 + sum<N1toN...>::value;
};
template <>
struct sum<>
{
static constexpr auto value = 0;
};
static_assert(sum<>::value == 0, "");
static_assert(sum<1>::value == 1, "");
static_assert(sum<23>::value == 23, "");
static_assert(sum<1, 2>::value == 3, "");
static_assert(sum<5, 5, 11>::value == 21, "");
static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
}
// http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
// Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
// because of this.
namespace test_template_alias_sfinae
{
struct foo {};
template<typename T>
using member = typename T::member_type;
template<typename T>
void func(...) {}
template<typename T>
void func(member<T>*) {}
void test();
void test() { func<foo>(0); }
}
} // namespace cxx11
#endif // __cplusplus >= 201103L
]])
dnl Tests for new features in C++14
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
// If the compiler admits that it is not ready for C++14, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201402L
#error "This is not a C++14 compiler"
#else
namespace cxx14
{
namespace test_polymorphic_lambdas
{
int
test()
{
const auto lambda = [](auto&&... args){
const auto istiny = [](auto x){
return (sizeof(x) == 1UL) ? 1 : 0;
};
const int aretiny[] = { istiny(args)... };
return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
}
namespace test_binary_literals
{
constexpr auto ivii = 0b0000000000101010;
static_assert(ivii == 42, "wrong value");
}
namespace test_generalized_constexpr
{
template < typename CharT >
constexpr unsigned long
strlen_c(const CharT *const s) noexcept
{
auto length = 0UL;
for (auto p = s; *p; ++p)
++length;
return length;
}
static_assert(strlen_c("") == 0UL, "");
static_assert(strlen_c("x") == 1UL, "");
static_assert(strlen_c("test") == 4UL, "");
static_assert(strlen_c("another\0test") == 7UL, "");
}
namespace test_lambda_init_capture
{
int
test()
{
auto x = 0;
const auto lambda1 = [a = x](int b){ return a + b; };
const auto lambda2 = [a = lambda1(x)](){ return a; };
return lambda2();
}
}
namespace test_digit_seperators
{
constexpr auto ten_million = 100'000'000;
static_assert(ten_million == 100000000, "");
}
namespace test_return_type_deduction
{
auto f(int& x) { return x; }
decltype(auto) g(int& x) { return x; }
template < typename T1, typename T2 >
struct is_same
{
static constexpr auto value = false;
};
template < typename T >
struct is_same<T, T>
{
static constexpr auto value = true;
};
int
test()
{
auto x = 0;
static_assert(is_same<int, decltype(f(x))>::value, "");
static_assert(is_same<int&, decltype(g(x))>::value, "");
return x;
}
}
} // namespace cxx14
#endif // __cplusplus >= 201402L
]])

View File

@@ -0,0 +1,39 @@
# ============================================================================
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
# ============================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the C++11
# standard; if necessary, add switches to CXX and CXXCPP to enable
# support.
#
# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
# macro with the version set to C++11. The two optional arguments are
# forwarded literally as the second and third argument respectively.
# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
# more information. If you want to use this macro, you also need to
# download the ax_cxx_compile_stdcxx.m4 file.
#
# LICENSE
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 17
AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])])

View File

@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.3.900</string>
<string>2.4.900</string>
<key>CFBundleVersion</key>
<string>0.1</string>
<key>LSApplicationCategoryType</key>

View File

@@ -10,13 +10,22 @@
/* Define to 1 if you have the <curses.h> header file. */
#define HAVE_CURSES_H 1
/* define if the compiler supports basic C++11 syntax */
#define HAVE_CXX11 1
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#define HAVE_DIRENT_H 1
/* Define to 1 if you have the `dirfd' function. */
#define HAVE_DIRFD 1
/* Define to 1 if you have the <execinfo.h> header file. */
#define HAVE_EXECINFO_H 1
/* Define to 1 if you have the `flock' function. */
#define HAVE_FLOCK 1
/* Define to 1 if you have the `futimens' function. */
/* #undef HAVE_FUTIMENS */
@@ -65,6 +74,9 @@
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
/* #undef HAVE_NDIR_H */
/* Define to 1 if the shm_open() function exists */
#define HAVE_SHM_OPEN 1
/* Define to 1 if you have the <siginfo.h> header file. */
/* #undef HAVE_SIGINFO_H */
@@ -77,6 +89,15 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `std::wcscasecmp' function. */
/* #undef HAVE_STD__WCSCASECMP */
/* Define to 1 if you have the `std::wcsdup' function. */
/* #undef HAVE_STD__WCSDUP */
/* Define to 1 if you have the `std::wcsncasecmp' function. */
/* #undef HAVE_STD__WCSNCASECMP */
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
@@ -136,9 +157,18 @@
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `wcscasecmp' function. */
#define HAVE_WCSCASECMP 1
/* Define to 1 if you have the `wcsdup' function. */
#define HAVE_WCSDUP 1
/* Define to 1 if you have the `wcslcpy' function. */
#define HAVE_WCSLCPY 1
/* Define to 1 if you have the `wcsncasecmp' function. */
#define HAVE_WCSNCASECMP 1
/* Define to 1 if you have the `wcsndup' function. */
/* #undef HAVE_WCSNDUP */
@@ -167,7 +197,7 @@
#define PACKAGE_NAME "fish"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "fish 2.4b1"
#define PACKAGE_STRING "fish 2.5b1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "fish"
@@ -176,7 +206,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "2.4b1"
#define PACKAGE_VERSION "2.5b1"
/* The size of `wchar_t', as computed by sizeof. */
#define SIZEOF_WCHAR_T 4

View File

@@ -18,11 +18,11 @@ static void die(const char *format, ...) {
vfprintf(stderr, format, ap);
va_end(ap);
fputc('\n', stderr);
if (s_command_path[0] != '\0') {
unlink(s_command_path);
}
exit(EXIT_FAILURE);
}
@@ -31,14 +31,14 @@ static void launch_fish_with_applescript(NSString *fish_binary_path)
// load the script from a resource by fetching its URL from within our bundle
NSString *path = [[NSBundle mainBundle] pathForResource:@"launch_fish" ofType:@"scpt"];
if (! path) die("Couldn't get path to launch_fish.scpt");
NSURL *url = [NSURL fileURLWithPath:path isDirectory:NO];
if (! url) die("Couldn't get URL to launch_fish.scpt");
NSDictionary *errors = nil;
NSAppleScript *appleScript = [[NSAppleScript alloc] initWithContentsOfURL:url error:&errors];
if (! appleScript) die("Couldn't load AppleScript");
// create the first parameter
NSAppleEventDescriptor *firstParameter =
[NSAppleEventDescriptor descriptorWithString:fish_binary_path];
@@ -84,16 +84,17 @@ static void launch_fish_with_applescript(NSString *fish_binary_path)
/* This approach asks Terminal to open a script that we control */
int main(void) {
@autoreleasepool {
/* Get the fish executable. Make sure it's absolute. */
NSURL *fish_executable = [[NSBundle mainBundle] URLForResource:@"fish" withExtension:@"" subdirectory:@"base/bin"];
NSURL *fish_executable = [[NSBundle mainBundle] URLForResource:@"fish" withExtension:@""
subdirectory:@"base/bin"];
if (! fish_executable)
die("Could not find fish executable in bundle");
launch_fish_with_applescript([fish_executable path]);
}
/* If we succeeded, it will clean itself up */
return 0;
}

11413
po/de.po

File diff suppressed because it is too large Load Diff

1544
po/pl.po Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
complete -c VBoxHeadless -l startvm -o startvm -s s -x -d "Start given VM" -a "(__fish_print_VBox_vms)"
complete -c VBoxHeadless -l vrde -o vrde -s v -d "Enable or disamble VRDE server or don't change setting" -a "on off config"
complete -c VBoxHeadless -l vrdeproperty -o vrdeproperty -s e -x -d "Set VRDE property"
complete -c VBoxHeadless -l settingspw -x -d "Specify settings password"
complete -c VBoxHeadless -l settingspwfile -f -d "Specify file containing setting password"
complete -c VBoxHeadless -l start-paused -o start-paused -d "Start VM in paused state"
complete -c VBoxHeadless -l capture -o capture -s c -x -d "Record VM screen ouput to file"
complete -c VBoxHeadless -l width -s w -x -d "Frame width when recording"
complete -c VBoxHeadless -l height -s h -x -d "Frame height when recording"
complete -c VBoxHeadless -l bitrate -s r -x -d "Recording bit rate when recording"
complete -c VBoxHeadless -l filename -s f -f -d "File name when recording"

View File

@@ -0,0 +1,34 @@
complete -c VBoxSDL -l startvm -x -d "Set virtual machine to start" -a "(__fish_print_VBox_vms)"
complete -c VBoxSDL -l seperate -d "Run separate VM process or attach to a running VM"
complete -c VBoxSDL -l hda -f -d "Set temporary first hard disk"
complete -c VBoxSDL -l fda -f -d "Set temporary first floppy disk"
complete -c VBoxSDL -l cdrom -r -d "Set temporary CDROM/DVD" -a "none\tunmount"
complete -c VBoxSDL -l boot -x -d "Set temporary boot device" -a "a\tFloppy c\tFirst\ HD d\tDVD n\tNetwork"
complete -c VBoxSDL -l memory -x -d "Set temporary memory size in MB"
complete -c VBoxSDL -l vram -x -d "Set temporary video memory size in MB"
complete -c VBoxSDL -l fullscreen -d "Start VM in fullscreen mode"
complete -c VBoxSDL -l fullscreenresize -d "Resize guest on fullscreen"
complete -c VBoxSDL -l fixedmode -r -d "Use fixed SDL video mode with given width height and bit/pixel"
complete -c VBoxSDL -l nofstoggle -d "Forbid switching to/from fullscreen mode"
complete -c VBoxSDL -l noresize -d "Make SDL frame non resizable"
complete -c VBoxSDL -l nohostkey -d "Disable all hoskey combinations"
complete -c VBoxSDL -l nohostkeys -d "Disable specific hostkey combinations"
complete -c VBoxSDL -l nograbonclick -d "Disable mouse/keyboard grabbing on mouse click w/o additions"
complete -c VBoxSDL -l detecthostkey -d "Get hostkey identifier and modifier state"
complete -c VBoxSDL -l hostkey -r -d "Set host key to values obtained using --detecthostkey"
complete -c VBoxSDL -l termacpi -d "Send APCI power button when closing window"
complete -c VBoxSDL -l vrdp -d "Listen for VRDP connexions on if one of specified"
complete -c VBoxSDL -l discardstate -d "Discard saved state (if present) and revert to last snapshot (if present)"
complete -c VBoxSDL -l settingspw -x -d "Specify settings password"
complete -c VBoxSDL -l settingspwfile -f -d "Specify file containing setting password"
complete -c VBoxSDL -l rowr0 -d "Enable raw ring 3"
complete -c VBoxSDL -l rowr3 -d "Enable raw ring 0"
complete -c VBoxSDL -l patm -d "Enable PATM"
complete -c VBoxSDL -l csam -d "Enable CSAM"
complete -c VBoxSDL -l hwvirtex -d "Permit usage of VT-x/AMD-V"
complete -c VBoxSDL -l norowr0 -d "Disable raw ring 3"
complete -c VBoxSDL -l norowr3 -d "Disable raw ring 0"
complete -c VBoxSDL -l nopatm -d "Disable PATM"
complete -c VBoxSDL -l nocsam -d "Disable CSAM"
complete -c VBoxSDL -l nohwvirtex -d "Deny usage of VT-x/AMD-V"

View File

@@ -110,7 +110,7 @@ complete -n '__fish_seen_subcommand_from install' -c adb -l 'iv' -d 'Hex-encoded
# uninstall
complete -n '__fish_seen_subcommand_from uninstall' -c adb -s k -d 'Keep the data and cache directories'
complete -n '__fish_seen_subcommand_from uninstall' -c adb -f -u -a "(__fish_adb_list_uninstallable_packages)"
complete -n '__fish_seen_subcommand_from uninstall' -c adb -f -a "(__fish_adb_list_uninstallable_packages)"
# devices
complete -n '__fish_seen_subcommand_from devices' -c adb -s l -d 'Also list device qualifiers'

View File

@@ -16,7 +16,7 @@ complete -c adduser -l group --description 'When combined with --system, a group
complete -c adduser -l help --description 'Display brief instructions'
complete -c adduser -l home --description 'Use specified directory as the user\'s home directory' -x -a '(__fish_complete_directories)'
complete -c adduser -l shell --description 'Use shell as the user\'s login shell, rather than the default specified by the configuration file' -x -a '(cat /etc/shells)'
complete -c adduser -l ingroup --description 'Add the new user to GROUP instead of a usergroup or the default group defined by USERS_GID in the configuration file' -x -a '(cat /etc/group|cut -d : -f 1)'
complete -c adduser -l ingroup --description 'Add the new user to GROUP instead of a usergroup or the default group defined by USERS_GID in the configuration file' -x -a '(cut -d : -f 1 /etc/group)'
complete -c adduser -l no-create-home --description 'Do not create the home directory, even if it doesni\'t exist'
complete -c adduser -l quiet --description 'Suppress informational messages, only show warnings and errors'
complete -c adduser -l debug --description 'Be verbose, most useful if you want to nail down a problem with adduser'

View File

@@ -2,7 +2,7 @@
function __fish_apt_no_subcommand --description 'Test if apt has yet to be given the subcommand'
for i in (commandline -opc)
if contains -- $i update upgrade full-upgrade search list install show remove edit-sources purge
if contains -- $i update upgrade full-upgrade search list install show remove edit-sources purge changelog
return 1
end
end
@@ -11,7 +11,7 @@ end
function __fish_apt_use_package --description 'Test if apt command should have packages as potential completion'
for i in (commandline -opc)
if contains -- $i install remove upgrade full-upgrade show search purge
if contains -- $i install remove upgrade full-upgrade show search purge changelog
return 0
end
end
@@ -66,3 +66,6 @@ __fish_apt_subcommand full-upgrade -r --description 'Upgrade packages, removing
# Purge
__fish_apt_subcommand purge -x --description 'Remove packages and delete their config files'
# Changelog
__fish_apt_subcommand changelog -r --description 'Download and display package changelog'

View File

@@ -0,0 +1,5 @@
complete -c base64 -l decode -s d -d "Decode data"
complete -c base64 -l ignore-garbage -s i -d "When decoding, ignore non-alphabet characters"
complete -c base64 -l wrap -s w -x -d "Wrap encoded line after given number of caracters (default 76)"
complete -c base64 -l help -d "Display help"
complete -c base64 -l version -d "Display version"

View File

@@ -1,7 +1,7 @@
# Completions for the binary calculator
complete -c bc -s i -l interactive --description "Force interactive mode"
complete -c bc -s l -l math-lib --description "Define math library"
complete -c bc -s l -l mathlib --description "Define math library"
complete -c bc -s w -l warn --description "Give warnings for extensions to POSIX bc"
complete -c bc -s s -l standard --description "Process exactly POSIX bc"
complete -c bc -s q -l quiet --description "Do not print the GNU welcome"

View File

@@ -108,7 +108,7 @@ end
set -l commands list status monitor capture tree introspect call get-property set-property help
complete -f -e -c busctl
complete -A -f -c busctl -n "not __fish_seen_subcommand_from $commands" -a "$commands"
complete -f -c busctl -n "not __fish_seen_subcommand_from $commands" -a "$commands"
### Arguments to commands
# "status" only takes a single service as argument

View File

@@ -0,0 +1,11 @@
# completion for caffeinate (macOS)
complete -c caffeinate -s d -f -d 'Create an assertion to prevent the display from sleeping'
complete -c caffeinate -s i -f -d 'Create an assertion to prevent the system from idle sleeping'
complete -c caffeinate -s m -f -d 'Create an assertion to prevent the disk from idle sleeping'
complete -c caffeinate -s s -f -d 'Create an assertion to prevent the system from sleeping (AC power)'
complete -c caffeinate -s u -f -d 'Create an assertion to declare that user is active'
complete -c caffeinate -s t -x -a '10 60 300 600 1800 3600' -d 'Specifies the timeout value in seconds'
complete -c caffeinate -s w -x -a '(__fish_complete_pids)' -d 'Waits for the process with the specified PID to exit'
complete -c caffeinate -x -a '(__fish_complete_subcommand)'

View File

@@ -10,5 +10,3 @@ complete -c configure -l exec-prefix --description "Architecture-dependent insta
complete -c configure -l build --description "Configure for building on BUILD" -x
complete -c configure -l host --description "Cross-compile to build programs to run on HOST" -x
complete -c configure -l target --description "Configure for building compilers for TARGET" -x
complete -c configure -u

View File

@@ -5,26 +5,26 @@ complete -c cygport -s 8 -l 64 -d "Build for 64-bit Cygwin"
complete -c cygport -l debug -d "Enable debugging messages"
# Cygport file
complete -c cygport -n '__fish_is_first_token' -A -f -a '*.cygport' -d "Cygport file"
complete -c cygport -n '__fish_is_first_token' -f -a '*.cygport' -d "Cygport file"
# Commands
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'downloadall fetchall wgetall getall' -d "Download all sources"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'download fetch wget get' -d "Download missing sources"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'prep unpack' -d "Prepare source directory"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'compile build make' -d "Build software"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'check test' -d "Run test suite"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'inst install' -d "Install into DESTDIR and run post-installation steps"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'postinst' -d "Run post-installation steps"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'list' -d "List package files"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'listdebug listdbg' -d "List debug package files"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'dep' -d "Show dependencies"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'info' -d "Show packaging info"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'homepage web www' -d "Show project homepage URL"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'package pkg' -d "Create packages"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'diff mkdiff mkpatch' -d "Create source patches"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'upload up' -d "Upload finished packages"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'announce' -d "Send announcement email"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'clean finish' -d "Delete working directory"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'almostall all' -d "Same as prep build inst pkg"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'help' -d "Show help"
complete -c cygport -n 'not __fish_is_first_token' -A -f -a 'version' -d "Show version"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'downloadall fetchall wgetall getall' -d "Download all sources"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'download fetch wget get' -d "Download missing sources"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'prep unpack' -d "Prepare source directory"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'compile build make' -d "Build software"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'check test' -d "Run test suite"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'inst install' -d "Install into DESTDIR and run post-installation steps"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'postinst' -d "Run post-installation steps"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'list' -d "List package files"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'listdebug listdbg' -d "List debug package files"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'dep' -d "Show dependencies"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'info' -d "Show packaging info"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'homepage web www' -d "Show project homepage URL"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'package pkg' -d "Create packages"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'diff mkdiff mkpatch' -d "Create source patches"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'upload up' -d "Upload finished packages"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'announce' -d "Send announcement email"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'clean finish' -d "Delete working directory"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'almostall all' -d "Same as prep build inst pkg"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'help' -d "Show help"
complete -c cygport -n 'not __fish_is_first_token' -f -a 'version' -d "Show version"

View File

@@ -0,0 +1,44 @@
# Fish completions for gnome's "dconf" configuration tool
function __fish_dconf_keys
set -l dir
set -l key
# We parse the `dump` output instead of `list`
# because it allows us to complete non-incrementally
# i.e. to get the keys directly, without going through
# `dconf list /`, `dconf list /org/` and so on.
dconf dump / ^/dev/null | while read -l line
if string match -q "[*]" -- $line
# New directory - just save it for the keys
set dir /(string trim -c "[]" -- $line)
else if test -n "$line"
# New key - output with the dir prepended.
echo $dir/(string replace -r '=.*' '' -- $line)
end
end
end
### Commands
set -l commands read list write reset compile update watch dump load help
complete -f -e -c dconf
complete -f -c dconf -n "not __fish_seen_subcommand_from read" -a 'read' -d 'Read the value of a key'
complete -f -c dconf -n "not __fish_seen_subcommand_from list" -a 'list' -d 'List the sub-keys and sub-directories of a directory'
complete -f -c dconf -n "not __fish_seen_subcommand_from write" -a 'write' -d 'Write a new value to a key'
complete -f -c dconf -n "not __fish_seen_subcommand_from reset" -a 'reset' -d 'Delete a key or an entire directory'
complete -f -c dconf -n "not __fish_seen_subcommand_from compile" -a 'compile' -d 'Compile a binary database from keyfiles'
complete -f -c dconf -n "not __fish_seen_subcommand_from update" -a 'update' -d 'Update the system dconf databases'
complete -f -c dconf -n "not __fish_seen_subcommand_from watch" -a 'watch' -d 'Watch a key or directory for changes'
complete -f -c dconf -n "not __fish_seen_subcommand_from dump" -a 'dump' -d 'Dump an entire subpath to stdout'
complete -f -c dconf -n "not __fish_seen_subcommand_from load" -a 'load' -d 'Populate a subpath from stdin'
complete -f -c dconf -n "not __fish_seen_subcommand_from help" -a 'help' -d 'Display help and exit'
### Arguments to commands
# Technically, reset/watch take a "PATH" (which is a dir or a key)
# while read and write take a KEY, but for now this is close enough.
complete -f -c dconf -n "__fish_seen_subcommand_from read write reset watch" -a "(__fish_dconf_keys)"
# List/dump/load take a dir, which is something that ends in a "/"
complete -f -c dconf -n "__fish_seen_subcommand_from list dump load" -a "(__fish_dconf_keys | string replace -r '/[^/]*\$' '/')"
complete -f -c dconf -n "__fish_seen_subcommand_from help" -a "$commands"

View File

@@ -0,0 +1,33 @@
# completion for defaults (macOS)
function __fish_defaults_domains
defaults domains | string split ", "
end
complete -f -c defaults -o 'currentHost' -d 'Restricts preferences operations to the current logged-in host'
complete -f -c defaults -o 'host' -d 'Restricts preferences operations to hostname'
# read
complete -f -c defaults -n '__fish_use_subcommand' -a read -d 'Shows defaults entire given domain'
complete -f -c defaults -n '__fish_seen_subcommand_from read read-type write rename delete' -a '(__fish_defaults_domains)'
complete -f -c defaults -n '__fish_seen_subcommand_from read read-type write rename delete' -o 'app'
# write
complete -f -c defaults -n '__fish_use_subcommand' -a write -d 'Writes domain or or a key in the domain'
complete -f -c defaults -n '__fish_seen_subcommand_from write' -o 'string' -d 'String as the value for the given key'
complete -f -c defaults -n '__fish_seen_subcommand_from write' -o 'data' -d 'Raw data bytes for given key'
complete -f -c defaults -n '__fish_seen_subcommand_from write' -o 'int' -d 'Integer as the value for the given key'
complete -f -c defaults -n '__fish_seen_subcommand_from write' -o 'float' -d 'Floating point number as the value for the given key'
complete -f -c defaults -n '__fish_seen_subcommand_from write' -o 'bool' -d 'Boolean as the value for the given key'
complete -f -c defaults -n '__fish_seen_subcommand_from write' -o 'date' -d 'Date as the value for the given key'
complete -f -c defaults -n '__fish_seen_subcommand_from write' -o 'array' -d 'Array as the value for the given key'
complete -f -c defaults -n '__fish_seen_subcommand_from write' -o 'array-add' -d 'Add new elements to the end of an array'
complete -f -c defaults -n '__fish_seen_subcommand_from write' -o 'dict' -d 'Add a dictionary to domain'
complete -f -c defaults -n '__fish_seen_subcommand_from write' -o 'dict-add' -d 'Add new key/value pairs to a dictionary'
complete -f -c defaults -n '__fish_use_subcommand' -a read-type -d 'Shows the type for the given domain, key'
complete -f -c defaults -n '__fish_use_subcommand' -a rename -d 'Renames old_key to new_key'
complete -f -c defaults -n '__fish_use_subcommand' -a delete -d 'Deletes domain or a key in the domain'
complete -f -c defaults -n '__fish_use_subcommand' -a domains -d 'Prints the names of all domains in the users defaults system'
complete -f -c defaults -n '__fish_use_subcommand' -a find -d 'Searches for word in domain names, keys, and values'
complete -f -c defaults -n '__fish_use_subcommand' -a help -d 'Prints a list of possible command formats'

View File

@@ -0,0 +1,64 @@
# completion for dig
function __fish_complete_dig
set -l token (commandline -ct)
switch $token
case '+tries=*' '+retry=*' '+time=*' '+bufsize=*' '+ndots=*' '+edns=*'
printf '%s\n' $token(seq 0 50)
end
end
complete -f -c dig -s 4 -d 'Use IPv4 query transport only'
complete -f -c dig -s 6 -d 'Use IPv6 query transport only'
complete -f -c dig -s m -d 'Enable memory usage debugging'
complete -c dig -s b -x -d 'Bind to source address/port'
complete -c dig -s f -r -d 'Specify batch mode file'
complete -c dig -s c -x -a 'IN CH HS QCLASS' -d 'Specify query class'
complete -c dig -s k -r -d 'Specify TSIG key file'
complete -c dig -s y -x -d 'specify named base64 TSIG key'
complete -c dig -s p -x -d 'Specify port number'
complete -c dig -s q -x -d 'Specify query name'
complete -c dig -s t -x -a 'A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT URI' -d 'Specify query type'
complete -c dig -s x -x -d 'Reverse lookup'
complete -f -c dig -s h -d 'Print help and exit'
complete -f -c dig -s v -d 'Print version and exit'
complete -f -c dig -a '+vc +novc' -d 'TCP mode'
complete -f -c dig -a '+tcp +notcp' -d 'TCP mode, alternate syntax'
complete -f -c dig -a '+search +nosearch' -d 'Set whether to use searchlist'
complete -f -c dig -a '+showsearch +noshowsearch' -d 'Search with intermediate results'
complete -f -c dig -a '+defname +nodefname' -d 'Deprecated, treated as a synonym for +[no]search'
complete -f -c dig -a '+recurse +norecurse' -d 'Recursive mode'
complete -f -c dig -a '+ignore +noignore' -d 'Dont revert to TCP for TC responses.'
complete -f -c dig -a '+fail +nofail' -d 'Dont try next server on SERVFAIL'
complete -f -c dig -a '+besteffort +nobesteffort' -d 'Try to parse even illegal messages'
complete -f -c dig -a '+aaonly +noaaonly' -d 'Set AA flag in query (+[no]aaflag)'
complete -f -c dig -a '+adflag +noadflag' -d 'Set AD flag in query'
complete -f -c dig -a '+cdflag +nocdflag' -d 'Set CD flag in query'
complete -f -c dig -a '+cl +nocl' -d 'Control display of class in records'
complete -f -c dig -a '+cmd +nocmd' -d 'Control display of command line'
complete -f -c dig -a '+comments +nocomments' -d 'Control display of comment lines'
complete -f -c dig -a '+question +noquestion' -d 'Control display of question'
complete -f -c dig -a '+answer +noanswer' -d 'Control display of answer'
complete -f -c dig -a '+authority +noauthority' -d 'Control display of authority'
complete -f -c dig -a '+additional +noadditional' -d 'Control display of additional'
complete -f -c dig -a '+stats +nostats' -d 'Control display of statistics'
complete -f -c dig -a '+short +noshort' -d 'Disable everything except short form of answer'
complete -f -c dig -a '+ttlid +nottlid' -d 'Control display of ttls in records'
complete -f -c dig -a '+all +noall' -d 'Set or clear all display flags'
complete -f -c dig -a '+qr +noqr' -d 'Print question before sending'
complete -f -c dig -a '+nssearch +nonssearch' -d 'Search all authoritative nameservers'
complete -f -c dig -a '+identify +noidentify' -d 'ID responders in short answers'
complete -f -c dig -a '+trace +notrace' -d 'Trace delegation down from root'
complete -f -c dig -a '+dnssec +nodnssec' -d 'Request DNSSEC records'
complete -f -c dig -a '+nsid +nonsid' -d 'Request Name Server ID'
complete -f -c dig -a '+multiline +nomultiline' -d 'Print records in an expanded format'
complete -f -c dig -a '+onesoa +noonesoa' -d 'AXFR prints only one soa record'
complete -f -c dig -a '+tries=' -d 'Set number of UDP attempts'
complete -f -c dig -a '+retry=' -d 'Set number of UDP retries'
complete -f -c dig -a '+time=' -d 'Set query timeout'
complete -f -c dig -a '+bufsize=' -d 'Set EDNS0 Max UDP packet size'
complete -f -c dig -a '+ndots=' -d 'Set NDOTS value'
complete -f -c dig -a '+edns=' -d 'Set EDNS version'
complete -c dig -a '(__fish_complete_dig)'

View File

@@ -1,4 +1,4 @@
#completion for diskutil
# completion for diskutil (macOS)
function __fish_diskutil_devices
set -l mountpoints /dev/disk*; printf '%s\n' $mountpoints
@@ -22,6 +22,10 @@ complete -f -c diskutil -n '__fish_seen_subcommand_from info' -o 'all' -d 'Proce
# activity
complete -f -c diskutil -n '__fish_use_subcommand' -a activity -d 'Continuously display system-wide disk manipulation activity'
# listFilesystems
complete -f -c diskutil -n '__fish_use_subcommand' -a listFilesystems -d 'Show the file system personalities available'
complete -f -c diskutil -n '__fish_seen_subcommand_from listFilesystems' -o 'plist' -d 'Return a property list'
# umount
complete -f -c diskutil -n '__fish_use_subcommand' -a umount -d 'Unmount a single volume'
complete -f -c diskutil -n '__fish_seen_subcommand_from umount' -a '(__fish_diskutil_mounted_volumes)'

View File

@@ -0,0 +1,14 @@
# Completions for the `dpkg-reconfigure` command
complete -f -c dpkg-reconfigure -a '(__fish_print_packages)' --description 'Package'
# Support flags
complete -x -f -c dpkg-reconfigure -s h -l help --description 'Display help'
# General options
complete -f -c dpkg-reconfigure -s f -l frontend -r -a "dialog readline noninteractive gnome kde editor web" --description 'Set configuration frontend'
complete -f -c dpkg-reconfigure -s p -l priority -r -a "low medium high critical" --description 'Set priority threshold'
complete -f -c dpkg-reconfigure -l default-priority --description "Use current default ("(echo get debconf/priority | debconf-communicate | string match -r '\w+$')") priority threshold"
complete -f -c dpkg-reconfigure -s u -l unseen-only --description 'Show only unseen question'
complete -f -c dpkg-reconfigure -l force --description 'Reconfigure also inconsistent packages'
complete -f -c dpkg-reconfigure -l no-reload --description 'Prevent reloading templates'

View File

@@ -3,4 +3,3 @@ complete -c echo -s s --description "Do not separate arguments with spaces"
complete -c echo -s E --description "Disable backslash escapes"
complete -c echo -s e --description "Enable backslash escapes"
complete -c echo -s h -l help --description "Display help and exit"
complete -c echo -u

View File

@@ -4,7 +4,7 @@
function __fish_emerge_print_installed_pkgs --description 'Prints completions for installed packages on the system from /var/db/pkg'
if test -d /var/db/pkg
find /var/db/pkg/ -type d | cut -d'/' -f5-6 | sort | uniq | \
find /var/db/pkg/ -type d | cut -d'/' -f5-6 | sort -u | \
sed 's/-[0-9]\{1,\}\..*$//' | sed -e '/^ *$/d'
return
end
@@ -13,7 +13,7 @@ end
function __fish_emerge_print_all_pkgs --description 'Prints completions for all available packages on the system from /usr/portage'
if test -d /usr/portage
find /usr/portage/ -maxdepth 2 -type d | cut -d'/' -f4-5 | \
sed 's/^\(distfiles\|profiles\|eclass\).*$//' | sort | uniq | \
sed 's/^\(distfiles\|profiles\|eclass\).*$//' | sort -u | \
sed 's/-[0-9]\{1,\}\..*$//' | sed -e '/^ *$/d'
return
end

View File

@@ -7,6 +7,3 @@ complete -c env -s i -l ignore-environment --description "Start with an empty en
complete -c env -s u -l unset --description "Remove variable from the environment" -x -a "(set -n)"
complete -c env -l help --description "Display help and exit"
complete -c env -l version --description "Display version and exit"
# Since env runs subcommands, it can accept any switches
complete -c env -u

View File

@@ -4,21 +4,21 @@
function __fish_equery_print_installed_pkgs --description 'Prints completions for installed packages on the system from /var/db/pkg'
if test -d /var/db/pkg
find /var/db/pkg/ -type d | cut -d'/' -f5-6 | sort | uniq | sed 's/-[0-9]\{1,\}\..*$//'
find /var/db/pkg/ -type d | cut -d'/' -f5-6 | sort -u | sed 's/-[0-9]\{1,\}\..*$//'
return
end
end
function __fish_equery_print_all_pkgs --description 'Prints completions for all available packages on the system from /usr/portage'
if test -d /usr/portage
find /usr/portage/ -maxdepth 2 -type d | cut -d'/' -f4-5 | sed 's/^\(distfiles\|profiles\|eclass\).*$//' | sort | uniq | sed 's/-[0-9]\{1,\}\..*$//'
find /usr/portage/ -maxdepth 2 -type d | cut -d'/' -f4-5 | sed 's/^\(distfiles\|profiles\|eclass\).*$//' | sort -u | sed 's/-[0-9]\{1,\}\..*$//'
return
end
end
function __fish_equery_print_all_categories --description 'Prints completions for all available categories on the system from /usr/portage'
if test -d /usr/portage
find /usr/portage/ -maxdepth 1 -type d | cut -d'/' -f4 | sed 's/^\(distfiles\|profiles\|eclass\).*$//' | sort | uniq | sed 's/-[0-9]\{1,\}\..*$//'
find /usr/portage/ -maxdepth 1 -type d | cut -d'/' -f4 | sed 's/^\(distfiles\|profiles\|eclass\).*$//' | sort -u | sed 's/-[0-9]\{1,\}\..*$//'
return
end
end

View File

@@ -0,0 +1,89 @@
complete -c feh -l action -s A -x -d "Specify a shell command as action to perform on the image"
for i in (seq 1 9)
complete -c feh -l action$i -x -d "Extra action triggered with number key "$i
end
complete -c feh -l auto-zoom -s Z -d "Zoom pictures to screen size"
complete -c feh -l borderless -s x -d "Create borderless window"
complete -c feh -l cache-thumbnails -s P -d "Enable thumbnail caching"
complete -c feh -l caption-path -s K -r -d "Path to directory containing image caption"
complete -c feh -l customlist -s L -x -d "Print image info according to given format"
complete -c feh -l cycle-once -d "Exit feh after one loop through the slideshow"
complete -c feh -l draw-actions -s G -d "Draw the defined actions"
complete -c feh -l draw-exif -d "Display some EXIF information"
complete -c feh -l draw-filename -s d -d "Draw filename"
complete -c feh -l draw-tinted -d "Show overlay texts on semi-transparent background"
complete -c feh -l filelist -s f -r
complete -c feh -l font -s e -x -r -d "Set global font"
complete -c feh -l fontpath -s C -r -d "Add given path as directory to search fonts"
complete -c feh -l force-aliasing -d "Disable antialiasing for zooming, bg settings, etc."
complete -c feh -l fullindex -s I
complete -c feh -l fullscreen -s F -d "Make window fullscreen"
complete -c feh -l geometry -s g -x -d "Limit window size. Format: [w x h] [+ x + y]"
complete -c feh -l hide-pointer -s Y -d "Hide pointer"
complete -c feh -l image-bg -s B -x -a "checks white black" -d "Use style as background for transparent image parts"
complete -c feh -l index -s i -d "Enable index mode"
complete -c feh -l index-info -x -d "Show image information based on given format"
complete -c feh -l info -x -d "Execute given command line and display its output"
complete -c feh -l keep-http -s k -d "Keep files fetched using HTTP"
complete -c feh -l insecure -d "Disable strict hostname and peer checking with HTTPS"
complete -c feh -l keep-zoom-vp -d "When switching images, keep zoom and viewport settings"
complete -c feh -l list -s l -d "Don't display images. Display an ls style listing"
complete -c feh -l loadable -s U -d "Just print out image names if imlib2 can read them"
complete -c feh -l magick-timeout -x -d "Stop trying to convert unloadable files after given timeout"
complete -c feh -l max-dimension -x -d "Only show images which are smaller then given size"
complete -c feh -l menu-font -s M -x -d "Use given font as menu font"
complete -c feh -l min-dimension -x -d "Only show image which are larger then given size"
complete -c feh -l montage -s m -d "Enable montage mode"
complete -c feh -l multiwindow -s w -d "Disable slideshow mode"
complete -c feh -l no-jump-on-resort -d "Don't jump to first image after resorting filelist"
complete -c feh -l no-menus -s N -d "Don't load or show any menus"
complete -c feh -l no-screen-clip -d "Don't limit window to screen size"
complete -c feh -l no-xinerama -d "Disable Xinerama support"
complete -c feh -l output-dir -s j -r -d "Save files to given directory"
complete -c feh -l preload -s p -d "Preload images"
complete -c feh -l quiet -s q -d "Don't report non-fatal errors"
complete -c feh -l randomize -s z -d "Randomize file list before displaying"
complete -c feh -l recursive -s r -d "Recursivly expand any directory"
complete -c feh -l no-recursive -d "Don't recursively expand any directory (default)"
complete -c feh -l reload -s R -x -d "Reload filelist after given time in second"
complete -c feh -l reverse -s n -d "Reverse sort order"
complete -c feh -l scale-down -s '.' -d "Scale image to fit window geometry"
complete -c feh -l scroll-step -x -d "Scroll given number of pixels when scrolling keys are pressed"
complete -c feh -l slideshow-delay -s D -x -d "Set delay in second between automatically changing slides"
complete -c feh -l sort -s S -x -a "name\tSort\ by\ name filename\tSort\ by\ filename dirname\tSort\ by\ directory\ name mtime\tSort\ by\ most\ recently\ modified width\tSort\ by\ width height\tSort\ by\ height pixels\tSort\ by\ number\ of\ pixels size\tSort\ by\ size format\tSort\ by\ format" -d "Sort file list with given parameter"
complete -c feh -l start-at -s l -x -d "Start the filelist at given filename"
complete -c feh -l theme -s T -x -d "Load options from given config file"
complete -c feh -l thumbnails -s t
complete -c feh -l thumb-title -s '~' -x -d "Set given title for window opended from thumbnail mode"
complete -c feh -l title -s '^' -x -d "Set window title"
complete -c feh -l unloadable -s u -d "Just print names of images that can't be loaded by imlib2"
complete -c feh -l verbose -s V -d "Verbose mode"
complete -c feh -l version -s v -d "Print version and exit"
complete -c feh -l xinerama-index -x
complete -c feh -l zoom -x -a "max fill" -d "Zoom images by given percent when in fullscreen"
# Montage Mode Options
complete -c feh -l alpha -s a -x -d "Set thumbnails' transparency to given level (0-255)"
complete -c feh -l bg -s b -r -a "trans" -d "Use given file as background for your montage"
complete -c feh -l ignore-aspect -s X -d "Don't retain thumbnails' aspect ratios"
complete -c feh -l limit-height -s W -x -d "Limit montage's height"
complete -c feh -l limit-width -s W -x -d "Limit montage's width"
complete -c feh -l output -s o -r -d "Save created montage to given file"
complete -c feh -l output-only -s O -r -d "Just save the created montage to given file"
complete -c feh -l stretch -s s -d "If image smaller then given thumbnail size, it will be enlarged"
complete -c feh -l thumb-height -s E -x -d "Set thumbnail height"
complete -c feh -l thumb-width -s y -x -d "Set thumbnail width"
complete -c feh -l thumb-redraw -s J -x -d "Redraw thumbnail window every n images"
# Index mode options
complete -c feh -l title-font -s '@' -x -d "Set font to print title on index"
# Background setting
complete -c feh -l bg-center -d "Center file on background"
complete -c feh -l bg-fill -d "Fit file into background by zooming until image fits"
complete -c feh -l bg-max -d "Fit file into backround by zooming with black borders on one side"
complete -c feh -l bg-scale -d "Fit file into background without repeating it, cutting off stuff or using borders"
complete -c feh -l bg-tile -d "Tile image if too small for screen"
complete -c feh -l no-fehbg -d "Do not write a ~/.fehbg file"

View File

@@ -3,3 +3,7 @@ complete -c fish_indent -s v -l version --description 'Display version and exit'
complete -c fish_indent -s i -l no-indent --description 'Do not indent output, only reformat into one job per line'
complete -c fish_indent -l ansi --description 'Colorize the output using ANSI escape sequences'
complete -c fish_indent -l html --description 'Output in HTML format'
complete -c fish_indent -s w -l write --description 'Write to file'
complete -c fish_indent -s d -l debug-level -x --description 'Enable debug at specified verbosity level'
complete -c fish_indent -s D -l debug-stack-frames -x --description 'Specify how many stack frames to display in debug messages'
complete -c fish_indent -l dump-parse-tree --description 'Dump information about parsed statements to stderr'

View File

@@ -3,13 +3,7 @@
#
# Find mount points, borrowed from umount.fish
#
complete -c fusermount --description "Mount point" -x -a '
(
cat /etc/mtab | __fish_sgrep "^sshfs" | cut -d " " -f 1-2|tr " " \n|sed -e "s/[0-9\.]*:\//\//"| __fish_sgrep "^/"
cat /etc/mtab | __fish_sgrep "^fuseiso" | cut -d " " -f 1-2|tr " " \n|sed -e "s/[0-9\.]*:\//\//"| __fish_sgrep "^/"
)
'
complete -c fusermount --description "Mount point" -x -a '(__fish_print_mounted)'
complete -c fusermount -s h --description "Display help and exit"
complete -c fusermount -s v --description "Display version and exit"
complete -c fusermount -s o -x --description "Mount options"

View File

@@ -48,8 +48,18 @@ function __fish_print_gpg_algo -d "Complete using all algorithms of the type spe
# will take effect again.
set -lx LC_ALL C
# XXX this misses certain ciphers in gpg --version - redo this entirely and use fish's annoying group printing as a feature finally!
gpg --version | __fish_sgrep "$argv:"| __fish_sgrep -v "Home:"|cut -d : -f 2 |tr , \n|tr -d " "
# sed script explained:
# in the line that matches "$argv:"
# define label 'loop'
# if the line ends with a ','
# add next line to buffer
# transliterate '\n' with ' '
# goto loop
# remove everything until the first ':' of the line
# remove all blanks
# transliterate ',' with '\n' (OSX apparently doesn't like '\n' on RHS of the s-command)
# print result
gpg --version | sed -ne "/$argv:/"'{:loop; /,$/{N; y!\n! !; b loop}; s!^[^:]*:!!; s![ ]*!!g; y!,!\n!; p}'
end

View File

@@ -25,7 +25,7 @@ end
complete -c journalctl -n "not __fish_journalctl_is_field" -a '(__fish_journalctl_fields)' -d "Journal field" -f
complete -c journalctl -n "not __fish_journalctl_is_field" -a '(command journalctl -F _EXE ^/dev/null)' -d "Executable"
complete -c journalctl -n "not __fish_journalctl_is_field" -a '+' -d "OR"
complete -c journalctl -n "__fish_journalctl_is_field" -a '(__fish_journalctl_field_values)' -f -r -A
complete -c journalctl -n "__fish_journalctl_is_field" -a '(__fish_journalctl_field_values)' -f -r
complete -c journalctl -f -s h -l help -d 'Prints a short help text and exits'
complete -c journalctl -f -l version -d 'Prints a short version string and exits'

View File

@@ -0,0 +1,45 @@
complete --command launchctl -n '__fish_use_subcommand' -xa 'bootstrap\t"'(_ "Bootstraps a domain or a service into a domain")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'bootout\t"'(_ "Tears down a domain or removes a service from a domain")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'enable\t"'(_ "Enables an existing service")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'disable\t"'(_ "Disables an existing service")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'uncache\t"'(_ "Removes the specified service name from the service cache")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'kickstart\t"'(_ "Forces an existing service to start")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'attach\t"'(_ "Attach the system's debugger to a service")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'debug\t"'(_ "Configures the next invocation of a service for debugging")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'kill\t"'(_ "Sends a signal to the service instance")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'blame\t"'(_ "Prints the reason a service is running")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'print\t"'(_ "Prints a description of a domain or service")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'print-cache\t"'(_ "Prints information about the service cache")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'print-disabled\t"'(_ "Prints which services are disabled")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'plist\t"'(_ "Prints a property list embedded in a binary (targets the Info.plist by default)")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'procinfo\t"'(_ "Prints port information about a process")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'hostinfo\t"'(_ "Prints port information about the host")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'resolveport\t"'(_ "Resolves a port name from a process to an endpoint in launchd")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'limit\t"'(_ "Reads or modifies launchd's resource limits")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'runstats\t"'(_ "Prints performance statistics for a service")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'examine\t"'(_ "Runs the specified analysis tool against launchd in a non-reentrant manner")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'config\t"'(_ "Modifies persistent configuration parameters for launchd domains")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'dumpstate\t"'(_ "Dumps launchd state to stdout")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'dumpjpcategory\t"'(_ "Dumps the jetsam properties category for all services")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'reboot\t"'(_ "Initiates a system reboot of the specified type")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'bootshell\t"'(_ "Brings the system up from single-user mode with a console shell")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'load\t"'(_ "Bootstraps a service or directory of services")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'unload\t"'(_ "Unloads a service or directory of services")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'remove\t"'(_ "Unloads the specified service name")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'list\t"'(_ "Lists information about services")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'start\t"'(_ "Starts the specified service")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'stop\t"'(_ "Stops the specified service if it is running")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'setenv\t"'(_ "Sets the specified environment variables for all services within the domain")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'unsetenv\t"'(_ "Unsets the specified environment variables for all services within the domain")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'getenv\t"'(_ "Gets the value of an environment variable from within launchd")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'bsexec\t"'(_ "Execute a program in another process' bootstrap context")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'asuser\t"'(_ "Execute a program in the bootstrap context of a given user")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'submit\t"'(_ "Submit a basic job from the command line")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'managerpid\t"'(_ "Prints the PID of the launchd controlling the session")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'manageruid\t"'(_ "Prints the UID of the current launchd session")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'managername\t"'(_ "Prints the name of the current launchd session")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'error\t"'(_ "Prints a description of an error")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'variant\t"'(_ "Prints the launchd variant")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'version\t"'(_ "Prints the launchd version")'"'
complete --command launchctl -n '__fish_use_subcommand' -xa 'help\t"'(_ "Prints the usage for a given subcommand")'"'

View File

@@ -0,0 +1,51 @@
function __fish_lxc_no_subcommand -d 'Test if lxc has yet to be given the command'
for i in (commandline --tokenize --cut-at-cursor --current-process)
if contains -- $i config copy delete exec file help image launch list move network profile publish remote restore restart snapshot start stop
return 1
end
end
return 0
end
function __fish_lxc_list_containers
lxc list -c n | string match -r '\| [a-zA-Z_-]+' | string replace -r '\| ' ''
end
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments config --description 'Manage configuration.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments copy --description 'Copy containers within or in between lxd instances.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments delete --description 'Delete containers or snapshots.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments exec --description 'Execute the specified command in a container.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments file --description 'Manage files on a container.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments finger --description 'Check if the LXD instance is up.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments help --description 'Print help.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments image --description 'Manipulate container images.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments info --description 'List information on LXD servers and containers.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments init --description 'Initialize a container from a particular image.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments launch --description 'Launch a container from a particular image.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments list --description 'Lists the available resources.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments manpage --description 'Prints all the subcommands help.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments monitor --description 'Monitor activity on the LXD server.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments move --description 'Move containers within or in between lxd instances.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments network --description 'Manage networks.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments pause --description 'Changes state of one or more containers to pause.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments profile --description 'Manage configuration profiles.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments publish --description 'Publish containers as images.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments remote --description 'Manage remote LXD servers.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments restart --description 'Changes state of one or more containers to restart.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments restore --description 'Set the current state of a container back to a snapshot.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments snapshot --description 'Create a read-only snapshot of a container.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments start --description 'Changes state of one or more containers to start.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments stop --description 'Changes state of one or more containers to stop.'
complete --condition '__fish_lxc_no_subcommand' --command lxc --no-files --arguments version --description 'Prints the version number of this client tool.'
# config
complete --condition '__fish_seen_subcommand_from config' --command lxc --no-files --arguments "device get set unset show edit trust"
# exec
complete --condition '__fish_seen_subcommand_from exec' --command lxc --no-files --arguments "(__fish_lxc_list_containers)"
# start
complete --condition '__fish_seen_subcommand_from start' --command lxc --no-files --arguments "(__fish_lxc_list_containers)"
# stop
complete --condition '__fish_seen_subcommand_from stop' --command lxc --no-files --arguments "(__fish_lxc_list_containers)"

View File

@@ -50,7 +50,7 @@ complete -f -c machinectl -n "__fish_seen_subcommand_from list-images" -s a -l a
complete -f -c machinectl -n "not __fish_seen_subcommand_from $commands" -a "status" -d "Show information about machine"
complete -f -c machinectl -n "__fish_seen_subcommand_from status" -s l -l full -d "Do not ellipsize process tree entries"
complete -x -c machinectl -n "__fish_seen_subcommand_from status" -s n -l lines -d "How many journal lines to show"
complete -x -A -c machinectl -n "__fish_seen_subcommand_from status" -s o -l output -d "Formatting of journal output" -a \
complete -x -c machinectl -n "__fish_seen_subcommand_from status" -s o -l output -d "Formatting of journal output" -a \
'short short-iso short-precise short-monotonic verbose export json json-pretty json-sse cat'
complete -f -c machinectl -n "not __fish_seen_subcommand_from $commands" -a "show" -d "Show properties of machines"
@@ -66,7 +66,7 @@ complete -f -c machinectl -n "not __fish_seen_subcommand_from $commands" -a "reb
complete -f -c machinectl -n "not __fish_seen_subcommand_from $commands" -a "terminate" -d "Terminate machine (without shutting down)"
complete -f -c machinectl -n "not __fish_seen_subcommand_from $commands" -a "kill" -d "Send signal to process in a machine"
complete -x -A -c machinectl -n "__fish_seen_subcommand_from kill" -l kill-who -d "Choose who to send the signal to" -a 'leader all'
complete -x -c machinectl -n "__fish_seen_subcommand_from kill" -l kill-who -d "Choose who to send the signal to" -a 'leader all'
__fish_make_completion_signals
complete -x -c machinectl -n "__fish_seen_subcommand_from kill" -s s -l signal -d "Signal to send" -a "$__kill_signals"
@@ -100,8 +100,8 @@ complete -f -c machinectl -n "not __fish_seen_subcommand_from $commands" -a "exp
complete -f -c machinectl -n "__fish_seen_subcommand_from export-tar export-raw" -l format -d "Specify compression format" -a 'uncompressed xz gzip bzip2'
complete -f -c machinectl -n "not __fish_seen_subcommand_from $commands" -a "list-transfers" -d "Show running downloads, imports and exports"
complete -f -c machinectl -n "not __fish_seen_subcommand_from $commands" -a "cancel-transfers" -d "Abort running downloads, imports or exports"
complete -x -A -c machinectl -n "__fish_seen_subcommand_from pull-{tar,raw}" -l verify -a 'no checksum signature' -d "Verify image with specified method"
complete -x -A -c machinectl -n "__fish_seen_subcommand_from pull-dkr" -l verify -a 'no' -d "Verify image (not available for dkr)"
complete -x -c machinectl -n "__fish_seen_subcommand_from pull-{tar,raw}" -l verify -a 'no checksum signature' -d "Verify image with specified method"
complete -x -c machinectl -n "__fish_seen_subcommand_from pull-dkr" -l verify -a 'no' -d "Verify image (not available for dkr)"
complete -x -c machinectl -n "__fish_seen_subcommand_from pull-dkr" -l dkr-index-url -d "Specify index server"
complete -f -c machinectl -n "__fish_seen_subcommand_from pull-{tar,raw,dkr}" -l force -d "Overwrite existing machine image"

View File

@@ -1,13 +1,21 @@
# Completions for make
function __fish_complete_make_targets
set directory (string replace -r '^make .*(-C ?|--directory[= ]?)([^ ]*) .*$' '$2' -- $argv)
if test $status -eq 0 -a -d $directory
__fish_print_make_targets $directory
else
__fish_print_make_targets
end
end
# This completion reenables file completion on
# assignments, so e.g. 'make foo FILES=<tab>' will receive standard
# filename completion.
complete -c make -n 'commandline -ct | string match "*=*"'
complete -x -c make -a "(__fish_print_make_targets)" --description "Target"
complete -x -c make -a "(__fish_complete_make_targets (commandline -c))" --description "Target"
complete -r -c make -s f --description "Use file as makefile" -r
complete -x -c make -s C -x -a "(__fish_complete_directories (commandline -ct))" --description "Change directory"
complete -x -c make -s C -l directory -x -a "(__fish_complete_directories (commandline -ct))" --description "Change directory"
complete -c make -s d --description "Debug mode"
complete -c make -s e --description "Environment before makefile"
complete -c make -s i --description "Ignore errors"

View File

@@ -0,0 +1,12 @@
# completion for mddiagnose (macOS)
complete -c mddiagnose -s h -f -d 'Display help'
complete -c mddiagnose -s d -f -d 'Ignore unknown options'
complete -c mddiagnose -s n -f -d 'Do not reveal the resulting package in the Finder'
complete -c mddiagnose -s r -f -d 'Avoid restricted operations such as heap'
complete -c mddiagnose -s s -f -d 'Skip gathering system.log'
complete -c mddiagnose -s v -f -d 'Prints version of mddiagnose'
complete -c mddiagnose -s m -f -d 'Minimal report'
complete -c mddiagnose -s e -r -d 'Evalute indexing information for path'
complete -c mddiagnose -s p -r -d 'Evalute permissions information for path'
complete -c mddiagnose -s f -r -d 'Write the diagnostic to the specified path'

View File

@@ -0,0 +1,12 @@
# completion for mdfind (macOS)
complete -c mdfind -o attr -x -d 'Fetches the value of the specified attribute'
complete -c mdfind -o count -f -d 'Query only reports matching items count'
complete -c mdfind -o onlyin -x -a '(__fish_complete_directories (commandline -ct))' -d 'Search only within given directory'
complete -c mdfind -o live -f -d 'Query should stay active'
complete -c mdfind -o name -x -d 'Search on file name only'
complete -c mdfind -o reprint -f -d 'Reprint results on live update'
complete -c mdfind -s s -x -d 'Show contents of smart folder'
complete -c mdfind -s 0 -f -d 'Use NUL (\0) as a path separator, for use with xargs -0'
complete -c mdfind -o literal -f -d 'Force the provided query string to be taken as a literal'
complete -c mdfind -o interpret -f -d 'Interprete query string as Spotlight query'

View File

@@ -0,0 +1,13 @@
# completion for mdimport (macOS)
complete -c mdimport -s g -r -d 'Import files using the listed plugin'
complete -c mdimport -s V -f -d 'Print timing information for this run'
complete -c mdimport -s A -f -d 'Print out the list of all of the attributes and exit'
complete -c mdimport -s X -f -d 'Print out the schema file and exit'
complete -c mdimport -s r -f -d 'Ask the server to reimport files for UTIs claimed by the listed plugin'
complete -c mdimport -s p -f -d 'Print out performance information gathered during the run'
complete -c mdimport -s L -f -d 'Print the list of installed importers and exit'
complete -c mdimport -s d -x -a '1 2 3 4' -d 'Print debugging information'
complete -c mdimport -s n -f -d 'Dont send the imported attributes to the data store'
complete -c mdimport -s w -x -d 'Wait for the specified interval between scanning files'
complete -c mdimport -s o -r -d 'Write the imported attributes to a file'

View File

@@ -0,0 +1,6 @@
# completion for mdls (macOS)
complete -c mdls -s n -o name -x -d 'Print only the matching metadata attribute value'
complete -c mdls -s r -o raw -f -d 'Print raw attribute data'
complete -c mdls -n '__fish_seen_subcommand_from -raw -r' -o nullMarker -x -d 'Sets a marker string to be used when a requested attribute is null'
complete -c mdls -s p -o plist -r -d 'Output attributes in XML format to file'

View File

@@ -0,0 +1,24 @@
# completion for mdutil (macOS)
function __fish_mdutil_volumes
command mdutil -a -s | while read -l line
if string match -q \t"*" -- $line
printf "%s\n" $line
else
# Use printf to not output a newline so indented lines are joined
# to non-indented ones
printf "%s" (string replace -r ':$' '' -- $line)
end
end
end
complete -c mdutil -s p -f -d 'Publish metadata'
complete -c mdutil -s i -f -a 'on off' -d 'Turn indexing on or off'
complete -c mdutil -s d -f -d 'Disable Spotlight activity for volume'
complete -c mdutil -s E -f -d 'Erase and rebuild index'
complete -c mdutil -s s -f -d 'Print indexing status'
complete -c mdutil -s t -x -a '(__fish_mdutil_volumes)' -d 'Resolve files from file id with an optional volume path or device id'
complete -c mdutil -s a -f -d 'Apply command to all volumes'
complete -c mdutil -s V -x -a '(__fish_mdutil_volumes)' -d 'Apply command to all stores on the specified volume'
complete -c mdutil -s v -f -d 'Display verbose information'
complete -c mdutil -x -a '(__fish_mdutil_volumes)'

View File

@@ -0,0 +1,82 @@
# Sample output of 'mkvmerge -i file.mkv'
#
# File 'file.mkv': container: Matroska
# Track ID 0: video (MPEG-4p10/AVC/h.264)
# Track ID 1: audio (AAC)
# Track ID 2: subtitles (SubStationAlpha)
# Attachment ID 1: type 'application/x-truetype-font', size 53532 bytes, file name 'some_font.ttf'
# Chapters: 7 entires
function __fish_mkvextract_find_matroska_in_args
set -l cmd (commandline -opc)
if not set -q cmd[3]
return 1
end
for c in $cmd[3..-1]
set -l skip_next 1
test $skip_next -eq 0; and set skip_next 1; and continue
switch $c
# General options with an argument we need to skip
case "--ui-language" "--command-line-charset" "--output-charset" "-r" "--redirect-output" "-c" "--blockadd" "--simple-language"
set skip_next 0
continue
# these behave like commands and everything after them is ignored
case "-h" "--help" "-V" "--version"
return 1
case "*"
if test -f "$c"
echo $c
return 0
end
continue
end
end
return 1
end
function __fish_mkvextract_print_attachments
if set -l matroska (__fish_mkvextract_find_matroska_in_args)
if set -l info (mkvmerge -i $matroska)
string match 'Attachment ID*' -- $info | string replace -r '.*?(\d+).*? type \'(.*?)\'.*?file name \'(.*?)\'' '$1:\t$3 ($2)'
end
end
end
function __fish_mkvextract_print_tracks
if set -l matroska (__fish_mkvextract_find_matroska_in_args)
if set -l info (mkvmerge -i $matroska)
string match 'Track ID*' -- $info | string replace -r '.*?(\d+): (.*)' '$1:\t$2'
end
end
end
# simple options
complete -f -c mkvextract -s V -l "version" -d "Show version information"
complete -f -c mkvextract -s h -l "help" -d "Show help"
# commands
complete -f -c mkvextract -n "test (count (commandline -opc)) -lt 2" -a "tracks" -d "Extract tracks to external files"
complete -f -c mkvextract -n "test (count (commandline -opc)) -lt 2" -a "tags" -d "Extract tags as XML"
complete -f -c mkvextract -n "test (count (commandline -opc)) -lt 2" -a "attachments" -d "Extract attachments"
complete -f -c mkvextract -n "test (count (commandline -opc)) -lt 2" -a "chapters" -d "Extract chapters as XML"
complete -f -c mkvextract -n "test (count (commandline -opc)) -lt 2" -a "cuesheet" -d "Extract chapters and tags as CUE sheet"
complete -f -c mkvextract -n "test (count (commandline -opc)) -lt 2" -a "timecodes_v2" -d "Extract timecodes of a track as timecode v2 file"
complete -f -c mkvextract -n "test (count (commandline -opc)) -lt 2" -a "cues" -d "Extract cue information as text file"
# dynamic tracks and attachments completions
complete -f -c mkvextract -n "__fish_seen_subcommand_from tracks timecodes_v2 cues" -a "(__fish_mkvextract_print_tracks)"
complete -f -c mkvextract -n "__fish_seen_subcommand_from attachments" -a "(__fish_mkvextract_print_attachments)"
# options common to all commands
complete -f -c mkvextract -n "test (count (commandline -opc)) -ge 2" -s f -l "parse-fully" -d "Parse the whole file instead of relying on the index"
complete -f -c mkvextract -n "test (count (commandline -opc)) -ge 2" -s v -l "verbose" -d "Increase verbosity"
complete -f -c mkvextract -n "test (count (commandline -opc)) -ge 2" -s q -l "quiet" -d "Suppress status output"
complete -f -c mkvextract -n "test (count (commandline -opc)) -ge 2" -r -l "ui-language" -d "Force the translations for 'code' to be used"
complete -f -c mkvextract -n "test (count (commandline -opc)) -ge 2" -r -l "command-line-charset" -d "Charset for strings on the command line"
complete -f -c mkvextract -n "test (count (commandline -opc)) -ge 2" -r -l "output-charset" -d "Outputs messages in specified charset"
complete -f -c mkvextract -n "test (count (commandline -opc)) -ge 2" -r -s r -l "redirect-output" -d "Redirect all messages into a file"
# command-specific options
complete -f -c mkvextract -n "__fish_seen_subcommand_from tracks" -r -s c -d "Convert text subtitles to a charset"
complete -f -c mkvextract -n "__fish_seen_subcommand_from tracks" -l "cuesheet" -d "Also try to extract the CUE sheet"
complete -f -c mkvextract -n "__fish_seen_subcommand_from tracks" -r -l "blockadd" -d "Keep only the BlockAdditions up to the specified level"
complete -f -c mkvextract -n "__fish_seen_subcommand_from tracks" -l "raw" -d "Extract the data to a raw file"
complete -f -c mkvextract -n "__fish_seen_subcommand_from tracks" -l "fullraw" -d "Extract the data to a raw file including the CodecPrivate as header"
complete -f -c mkvextract -n "__fish_seen_subcommand_from chapters" -s s -l "simple" -d "Exports the chapter information in a simple format"
complete -f -c mkvextract -n "__fish_seen_subcommand_from chapters" -r -l "simple-language" -d "Uses the chapter names of the specified language"

View File

@@ -21,6 +21,3 @@ complete -c mosh -f -l predict --description 'Controls use of speculative local
complete -c mosh -s a --description 'Synonym for --predict=always'
complete -c mosh -s n --description 'Synonym for --predict=never'
complete -c mosh -s p -l port --description 'Use a particular server-side UDP port or port range'
# Since mosh runs subcommands, it can accept any switches
complete -c mosh -u

View File

@@ -82,6 +82,4 @@ complete -c mplayer -o vfm -x --description "Video output" -a "
complete -c mplayer -l help --description "Display help and exit"
complete -c mplayer -l version --description "Display version and exit"
complete -c mplayer -u
set -e mplayer_lang

View File

@@ -443,7 +443,7 @@ complete -c mvn -a "jaxb2:schemagen" -d "Mojo that creates XML schema(s) from co
complete -c mvn -a "jaxb2:testSchemagen" -d "Mojo that creates XML schema(s) from test-scope Java testSources or binaries by invoking the JAXB SchemaGenerator. This implementation is tailored to use the JAXB Reference Implementation from project Kenai. Note that the TestSchemaGenerationMojo was completely re-implemented for the 2.x versions. Its configuration semantics and parameter set is not backwards compatible with the 1.x plugin versions. If you are upgrading from version 1.x of the plugin, read the documentation carefully. "
complete -c mvn -a "jaxb2:testXjc" -d "Mojo that creates test-scope Java source or binaries from XML schema(s) by invoking the JAXB XJC binding compiler. This implementation is tailored to use the JAXB Reference Implementation from project Kenai. Note that the TestXjcMojo was completely re-implemented for the 2.x versions. Its configuration semantics and parameter set is not necessarily backwards compatible with the 1.x plugin versions. If you are upgrading from version 1.x of the plugin, read the documentation carefully. "
complete -c mvn -a "jaxb2:xjc" -d "Mojo that creates compile-scope Java source or binaries from XML schema(s) by invoking the JAXB XJC binding compiler. This implementation is tailored to use the JAXB Reference Implementation from project Kenai. Note that the XjcMojo was completely re-implemented for the 2.x versions. Its configuration semantics and parameter set is not necessarily backwards compatible with the 1.x plugin versions. If you are upgrading from version 1.x of the plugin, read the documentation carefully. "
complete -c mvn -a "jpox:enhance" -d ""
complete -c mvn -a "jpox:enhance"
complete -c mvn -a "jpox:schema-create" -d "Generates the Schema from the JDO mappings and the enhanced class files."
complete -c mvn -a "jpox:schema-dbinfo" -d "Provides detailed information about the database - limits and datatypes support. Currently this seems to be printing out the information for each of available database datatypes twice. "
complete -c mvn -a "jpox:schema-delete" -d "Deletes all database tables required for a set of JDO MetaData files (and enhanced classes) from the database schema."
@@ -457,8 +457,8 @@ complete -c mvn -a "js-import:generate-html" -d "Main goal implementation of the
complete -c mvn -a "js-import:test-import-js" -d "Test goal implementation of the import mojo."
complete -c mvn -a "js-import:import-js" -d "Main goal implementation of the import mojo."
complete -c mvn -a "js-import:help" -d "Display help information on js-import-maven-plugin. Call mvn js-import:help -Ddetail=true -Dgoal=<goal-name> to display parameter details."
complete -c mvn -a "jspc:compile" -d ""
complete -c mvn -a "jspc:testCompile" -d ""
complete -c mvn -a "jspc:compile"
complete -c mvn -a "jspc:testCompile"
complete -c mvn -a "openjpa:test-enhance" -d "Processes Application model classes and enhances them by running Open JPA Enhancer tool."
complete -c mvn -a "openjpa:help" -d "Display help information on openjpa-maven-plugin. Call mvn openjpa:help -Ddetail=true -Dgoal=<goal-name> to display parameter details."
complete -c mvn -a "openjpa:enhance" -d "Processes Application model classes and enhances them by running Open JPA Enhancer tool. This basically only acts as a container for the xdoclet stuff since all the required functionality is already in the AbstratOpenJpaEnhancerMojo."
@@ -516,9 +516,9 @@ complete -c mvn -a "jdepend:help" -d "Display help information on jdepend-maven-
complete -c mvn -a "jdepend:generate" -d "Run JDepend and generate a site report. Goal which generate the JDepend metrics."
complete -c mvn -a "codenarc:codenarc" -d "Create a CodeNarc Report."
complete -c mvn -a "codenarc:help" -d "Display help information on codenarc-maven-plugin. Call mvn codenarc:help -Ddetail=true -Dgoal=<goal-name> to display parameter details."
complete -c mvn -a "findbugs:check" -d ""
complete -c mvn -a "findbugs:findbugs" -d ""
complete -c mvn -a "findbugs:gui" -d ""
complete -c mvn -a "findbugs:check"
complete -c mvn -a "findbugs:findbugs"
complete -c mvn -a "findbugs:gui" -d "Open the findbugs GUI to browse the report"
complete -c mvn -a "findbugs:help" -d "Display help information on findbugs-maven-plugin. Call mvn findbugs:help -Ddetail=true -Dgoal=<goal-name> to display parameter details."
complete -c mvn -a "fitnesse:remotecall" -d "This goal uses the fitnesse.runner.TestRunner class for getting result of a remote FitNesse web page execution. It's possible to define several pages and/or servers."
complete -c mvn -a "fitnesse:help" -d "Display help information on fitnesse-maven-plugin. Call mvn fitnesse:help -Ddetail=true -Dgoal=<goal-name> to display parameter details."
@@ -730,7 +730,7 @@ complete -c mvn -a "appengine:backends_stop" -d "Stop the specified backend."
complete -c mvn -a "android:aar" -d "Creates an Android Archive (aar) file. "
complete -c mvn -a "android:apk" -d "Creates the apk file. By default signs it with debug keystore. Change that by setting configuration parameter <sign><debug>false</debug></sign>."
complete -c mvn -a "android:apklib" -d "Creates the apklib file. apklib files do not generate deployable artifacts."
complete -c mvn -a "android:clean" -d ""
complete -c mvn -a "android:clean"
complete -c mvn -a "android:connect" -d "Connect external IP addresses to the ADB server."
complete -c mvn -a "android:deploy" -d "Deploys the apk(s) of the current project(s) to all attached devices and emulators. Automatically skips other projects in a multi-module build that do not use packaging apk without terminating. Deploymnet is automatically performed when running mvn integration-test (or mvn install) on a project with instrumentation tests."
complete -c mvn -a "android:deploy-apk" -d "Deploys a specified Android application apk to attached devices and emulators. By default it will deploy to all, but a subset or single one can be configured with the device and devices parameters.This goal can be used in non-android projects and as standalone execution on the command line. "
@@ -752,10 +752,10 @@ complete -c mvn -a "android:manifest-merger" -d "Manifest Merger V2 AndroidManif
complete -c mvn -a "android:manifest-update" -d "Updates various version attributes present in the AndroidManifest.xml file."
complete -c mvn -a "android:monkey" -d "Can execute tests using UI/Application Exerciser Monkey. Implements parsing parameters from pom or command line arguments and sets useful defaults as well. This goal will invoke Android Monkey exerciser. If the application crashes during the exercise, this goal can fail the build. A typical usage of this goal can be found at Quality tools for Android project."
complete -c mvn -a "android:monkeyrunner" -d "Can execute monkey runner programs. Implements parsing parameters from pom or command line arguments and sets useful defaults as well. This goal will invoke monkey runner scripts. If the application crashes during the exercise, this goal can fail the build. A typical usage of this goal can be found at Quality tools for Android project."
complete -c mvn -a "android:ndk-build" -d ""
complete -c mvn -a "android:ndk-build"
complete -c mvn -a "android:proguard" -d "Processes both application and dependency classes using the ProGuard byte code obfuscator, minimzer, and optimizer. For more information, see https://proguard.sourceforge.net."
complete -c mvn -a "android:publish-apk" -d ""
complete -c mvn -a "android:publish-listing" -d ""
complete -c mvn -a "android:publish-apk"
complete -c mvn -a "android:publish-listing"
complete -c mvn -a "android:pull" -d "Copy file or directory from all the attached (or specified) devices/emulators."
complete -c mvn -a "android:push" -d "Copy file to all the attached (or specified) devices/emulators."
complete -c mvn -a "android:redeploy" -d "Undeploys and the deploys (= redeploys) the apk(s) of the current project(s) to all attached devices and emulators. Automatically skips other projects in a multi-module build that do not use packaging apk without terminating. "
@@ -786,14 +786,14 @@ complete -c mvn -a "liquibase:diff" -d "Generates a diff between the specified d
complete -c mvn -a "liquibase:update" -d "Applies the DatabaseChangeLogs to the database. Useful as part of the build process."
complete -c mvn -a "liquibase:generateChangeLog" -d "Generates SQL that marks all unapplied changes as applied."
complete -c mvn -a "liquibase:migrateSQL" -d "Creates an SQL migration script using the provided DatabaseChangeLog(s) comparing what already exists in the database to what is defined in the DataBaseChangeLog(s)."
complete -c mvn -a "jgitflow:feature-deploy" -d ""
complete -c mvn -a "jgitflow:release-finish" -d ""
complete -c mvn -a "jgitflow:hotfix-start" -d ""
complete -c mvn -a "jgitflow:hotfix-finish" -d ""
complete -c mvn -a "jgitflow:feature-finish" -d ""
complete -c mvn -a "jgitflow:build-number" -d ""
complete -c mvn -a "jgitflow:release-start" -d ""
complete -c mvn -a "jgitflow:feature-start" -d ""
complete -c mvn -a "jgitflow:feature-deploy"
complete -c mvn -a "jgitflow:release-finish" -d "Finishes a release"
complete -c mvn -a "jgitflow:hotfix-start" -d "Starts a hotfix"
complete -c mvn -a "jgitflow:hotfix-finish" -d "Finishes a hotfix"
complete -c mvn -a "jgitflow:feature-finish" -d "Finishes a feature branch"
complete -c mvn -a "jgitflow:build-number" -d "Updates the pom versions in the current branch by adding a build number label"
complete -c mvn -a "jgitflow:release-start" -d "Starts a release"
complete -c mvn -a "jgitflow:feature-start" -d "Starts a feature branch"
complete -c mvn -a "spring-boot:help" -d "Display help information on spring-boot-maven-plugin. Call mvn spring-boot:help -Ddetail=true -Dgoal=<goal-name> to display parameter details."
complete -c mvn -a "spring-boot:repackage" -d "Repackages existing JAR and WAR archives so that they can be executed from the command line using java -jar. With layout=NONE can also be used simply to package a JAR with nested dependencies (and no main class, so not executable)."
complete -c mvn -a "spring-boot:run" -d "Run an executable archive application."

View File

@@ -1,4 +1,4 @@
set -l cmds list current start stop switch-to enable disable enable-all disable-all
set -l cmds list start stop switch-to enable disable enable-all disable-all is-active is-enabled
# Helper function that prints network profiles managed by netctl-auto.
# If no argument is given, it prints all profiles.
@@ -52,7 +52,6 @@ end
complete -c netctl-auto -n "not __fish_seen_subcommand_from $cmds" -l help -d "Show help"
complete -c netctl-auto -n "not __fish_seen_subcommand_from $cmds" -l version -d "Show version"
complete -c netctl-auto -n "not __fish_seen_subcommand_from $cmds" -a list -f -d "List all available profiles for automatic selection"
complete -c netctl-auto -n "not __fish_seen_subcommand_from $cmds" -a current -d "Report currently active profiles"
complete -c netctl-auto -n "not __fish_seen_subcommand_from $cmds" -a start -f -d "Start automatic profile selection on interface"
complete -c netctl-auto -n "not __fish_seen_subcommand_from $cmds" -a stop -f -d "Stop automatic profile selection on interface"
complete -c netctl-auto -n "not __fish_seen_subcommand_from $cmds" -a switch-to -f -d "Switch to the given network profile"
@@ -60,9 +59,11 @@ complete -c netctl-auto -n "not __fish_seen_subcommand_from $cmds" -a enable -f
complete -c netctl-auto -n "not __fish_seen_subcommand_from $cmds" -a disable -f -d "Disable network profile for automatic selection"
complete -c netctl-auto -n "not __fish_seen_subcommand_from $cmds" -a enable-all -f -d "Enable all profiles for automatic selection"
complete -c netctl-auto -n "not __fish_seen_subcommand_from $cmds" -a disable-all -f -d "Disable all profiles for automatic selection"
complete -c netctl-auto -n "not __fish_seen_subcommand_from $cmds" -a is-active -f -d "Check whether specified profile is active"
complete -c netctl-auto -n "not __fish_seen_subcommand_from $cmds" -a is-enabled -f -d "Check whether specified profile is enabled"
complete -c netctl-auto -n "__fish_seen_subcommand_from switch-to" -f -a "(__fish_print_netctl-auto_profile other disabled)" -d "Profile"
complete -c netctl-auto -n "__fish_seen_subcommand_from enable" -f -a "(__fish_print_netctl-auto_profile disabled)" -d "Profile"
complete -c netctl-auto -n "__fish_seen_subcommand_from disable" -f -a "(__fish_print_netctl-auto_profile active other)" -d "Profile"
complete -c netctl-auto -n "__fish_seen_subcommand_from start stop" -f -a "(__fish_print_interfaces)"
complete -c netctl-auto -n "__fish_seen_subcommand_from is-enabled is-active" -x -a "(__fish_print_netctl-auto_profile active disabled other)"

View File

@@ -1,31 +1,81 @@
complete -c nmcli -s t -l terse -d 'Output is terse'
complete -c nmcli -s p -l pretty -d 'Output is pretty'
complete -c nmcli -s m -l mode -xa 'tabular multiline' -d 'Switch between tabular and multiline mode'
complete -c nmcli -s f -l fields -xa 'all common' -d 'Specify the output fields'
complete -c nmcli -s e -l escape -xa 'yes no' -d 'Whether to escape ":" and "\\" characters'
complete -c nmcli -s v -l version -d 'Show nmcli version'
complete -c nmcli -s h -l help -d 'Print help information'
complete -c nmcli -d 'Command-line tool to control NetworkManager' -x
set -l nmcli_commands general networking radio connection device agent monitor help
set -l nmcli_general status hostname permissions logging help
set -l nmcli_networking on off connectivity help
set -l nmcli_radio all wifi wwan help
set -l nmcli_connection show up down add modify clone edit delete monitor reload load import export help
set -l nmcli_device status show set connect reapply modify disconnect delete monitor wifi lldp help
set -l nmcli_agent secret polkit all help
complete -c nmcli -xa nm -n '__fish_use_subcommand' -d 'Inquiry and change the state of NM' -x
complete -c nmcli -n '__fish_seen_subcommand_from nm; and not __fish_seen_subcommand_from status enable sleep wifi wwan' -xa 'status enable sleep wifi wwan'
complete -c nmcli -n '__fish_seen_subcommand_from nm; and __fish_seen_subcommand_from enable sleep' -xa 'true false'
complete -c nmcli -n '__fish_seen_subcommand_from nm; and __fish_seen_subcommand_from wifi wwan' -xa 'on off'
complete -c nmcli -s t -l terse -d 'Output is terse' -n "not __fish_seen_subcommand_from $nmcli_commands"
complete -c nmcli -s p -l pretty -d 'Output is pretty' -n "not __fish_seen_subcommand_from $nmcli_commands"
complete -c nmcli -s m -l mode -d 'Switch between tabular and multiline mode' -xa 'tabular multiline' -n "not __fish_seen_subcommand_from $nmcli_commands"
complete -c nmcli -s c -l color -d 'Whether to use colors in output' -xa 'auto yes no' -n "not __fish_seen_subcommand_from $nmcli_commands"
complete -c nmcli -s f -l fields -d 'Specify the output fields' -xa 'all common' -n "not __fish_seen_subcommand_from $nmcli_commands"
complete -c nmcli -s e -l escape -d 'Whether to escape ":" and "\\" characters' -xa 'yes no' -n "not __fish_seen_subcommand_from $nmcli_commands"
complete -c nmcli -s a -l ask -d 'Ask for missing parameters' -n "not __fish_seen_subcommand_from $nmcli_commands"
complete -c nmcli -s s -l show-secrets -d 'Allow displaying passwords' -n "not __fish_seen_subcommand_from $nmcli_commands"
complete -c nmcli -s w -l wait -d 'Set timeout (seconds) waiting for finishing operations' -x -n "not __fish_seen_subcommand_from $nmcli_commands"
complete -c nmcli -s v -l version -d 'Show nmcli version' -x -n "not __fish_seen_subcommand_from $nmcli_commands"
complete -c nmcli -s h -l help -d 'Print help information' -x
complete -c nmcli -d 'Command-line tool to control NetworkManager'
complete -c nmcli -xa con -n '__fish_use_subcommand' -d "Get information about NM's connections" -x
complete -c nmcli -n '__fish_seen_subcommand_from con; and not __fish_seen_subcommand_from list status up down delete' -xa 'list status up down delete'
complete -c nmcli -n '__fish_seen_subcommand_from con; and __fish_seen_subcommand_from list up down delete' -xa 'id uuid'
complete -c nmcli -n 'contains_seq con up -- (commandline -op)' -xa 'iface ap'
complete -c nmcli -n 'contains_seq con up iface -- (commandline -op)' -xa '(__fish_print_interfaces)'
complete -c nmcli -n 'contains_seq con up -- (commandline -op)' -l nowait -d 'Exit immediately'
complete -c nmcli -n 'contains_seq con up -- (commandline -op)' -l timeout -d 'How long to wait for operation completion' -x
complete -c nmcli -n "not __fish_seen_subcommand_from $nmcli_commands" -xa "$nmcli_commands"
complete -c nmcli -xa dev -n '__fish_use_subcommand' -d 'Get information about devices' -x
complete -c nmcli -n '__fish_seen_subcommand_from dev; and not __fish_seen_subcommand_from status list disconnect wifi' -xa 'status list disconnect wifi'
complete -c nmcli -n 'contains_seq dev disconnect -- (commandline -op)' -l nowait -d 'Exit immediately'
complete -c nmcli -n 'contains_seq dev list -- (commandline -op)' -xa 'iface'
complete -c nmcli -n '__fish_seen_subcommand_from dev; and __fish_seen_subcommand_from iface' -xa '(__fish_print_interfaces)'
complete -c nmcli -n 'contains_seq dev wifi -- (commandline -op)' -xa 'list iface'
complete -c nmcli -n 'contains_seq dev wifi list -- (commandline -op)' -xa 'essid bssid'
complete -c nmcli -n "__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general" -xa 'status' -d 'Show overall status of NetworkManager'
complete -c nmcli -n "__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general" -xa 'hostname' -d 'Get or change persistent system hostname'
complete -c nmcli -n "__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general" -xa 'permissions' -d 'Show caller permissions for authenticated operations'
complete -c nmcli -n "__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general" -xa 'logging' -d 'Get or change NetworkManager logging level and domains'
complete -c nmcli -n "__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general" -xa 'help'
complete -c nmcli -n "contains_seq general logging -- (commandline -op)" -xa 'level domains help'
complete -c nmcli -n "__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking" -xa 'on' -d 'Switch networking on'
complete -c nmcli -n "__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking" -xa 'off' -d 'Switch networking off'
complete -c nmcli -n "__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking" -xa 'connectivity' -d 'Get network connectivity state'
complete -c nmcli -n "__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking" -xa 'help'
complete -c nmcli -n "contains_seq networking connectivity -- (commandline -op)" -xa 'check' -d 'Re-check the connectivity'
complete -c nmcli -n "__fish_seen_subcommand_from radio; and not __fish_seen_subcommand_from $nmcli_radio" -xa 'all' -d 'Get status of all radio switches; turn them on/off'
complete -c nmcli -n "contains_seq radio all -- (commandline -op)" -xa 'on off help'
complete -c nmcli -n "__fish_seen_subcommand_from radio; and not __fish_seen_subcommand_from $nmcli_radio" -xa 'wifi' -d 'Get status of Wi-Fi radio switch; turn it on/off'
complete -c nmcli -n "contains_seq radio wifi -- (commandline -op)" -xa 'on off help'
complete -c nmcli -n "__fish_seen_subcommand_from radio; and not __fish_seen_subcommand_from $nmcli_radio" -xa 'wwan' -d 'Get status of mobile broadband radio switch; turn it on/off'
complete -c nmcli -n "contains_seq radio wwan -- (commandline -op)" -xa 'on off help'
complete -c nmcli -n "__fish_seen_subcommand_from connection; and not __fish_seen_subcommand_from $nmcli_connection" -xa "$nmcli_connection"
# Connection subcommands are self-explanatory, I'm just highlighting a difference between edit and modify
complete -c nmcli -n "__fish_seen_subcommand_from connection; and not __fish_seen_subcommand_from $nmcli_connection" -xa "modify" -d "Modify one or more properties"
complete -c nmcli -n "__fish_seen_subcommand_from connection; and not __fish_seen_subcommand_from $nmcli_connection" -xa "edit" -d "Interactive edit"
complete -c nmcli -n "contains_seq connection show -- (commandline -op)" -l active -d 'List only active profiles'
complete -c nmcli -n "contains_seq connection show -- (commandline -op)" -l order -d 'Custom connection ordering'
complete -c nmcli -n "contains_seq connection show -- (commandline -op)" -xa 'id uuid path apath help'
complete -c nmcli -n "contains_seq connection up -- (commandline -op)" -xa 'id uuid path ifname help'
complete -c nmcli -n "contains_seq connection up -- (commandline -op)" -xa 'ap' -d 'Specify AP to connect to (only for Wi-Fi)'
complete -c nmcli -n "contains_seq connection up -- (commandline -op)" -xa 'nsp' -d 'Specify NSP to connect to (only for WiMAX)'
complete -c nmcli -n "contains_seq connection up -- (commandline -op)" -xa 'passwd-file' -d 'password file to activate the connection'
complete -c nmcli -n "contains_seq connection down -- (commandline -op)" -xa 'id uuid path apath help'
complete -c nmcli -n "contains_seq connection add -- (commandline -op)" -xa 'type ifname con-name autoconnect save master slave-type help'
complete -c nmcli -n "contains_seq connection modify -- (commandline -op)" -l temporary
complete -c nmcli -n "contains_seq connection modify -- (commandline -op)" -xa 'id uuid path help'
complete -c nmcli -n "contains_seq connection clone -- (commandline -op)" -l temporary
complete -c nmcli -n "contains_seq connection clone -- (commandline -op)" -xa 'id uuid path help'
complete -c nmcli -n "contains_seq connection edit -- (commandline -op)" -xa 'id uuid path type help'
complete -c nmcli -n "contains_seq connection edit type -- (commandline -op)" -xa 'con-name'
complete -c nmcli -n "contains_seq connection delete -- (commandline -op)" -xa 'id uuid path help'
complete -c nmcli -n "contains_seq connection monitor -- (commandline -op)" -xa 'id uuid path help'
complete -c nmcli -n "contains_seq connection import -- (commandline -op)" -l temporary
complete -c nmcli -n "contains_seq connection import -- (commandline -op)" -xa 'type file help'
complete -c nmcli -n "contains_seq connection export -- (commandline -op)" -xa 'id uuid path help'
set -l wifi_commands list connect hotspot rescan help
complete -c nmcli -n "__fish_seen_subcommand_from device; and not __fish_seen_subcommand_from $nmcli_device" -xa "$nmcli_device"
complete -c nmcli -n "contains_seq device set -- (commandline -op)" -xa 'ifname autoconnect managed'
complete -c nmcli -n "contains_seq device wifi -- (commandline -op); and not __fish_seen_subcommand_from $wifi_commands" -xa "$wifi_commands"
complete -c nmcli -n "contains_seq device wifi list -- (commandline -op)" -xa 'ifname bssid'
complete -c nmcli -n "contains_seq device wifi connect -- (commandline -op)" -xa 'password wep-key-type ifname bssid name private hidden'
complete -c nmcli -n "contains_seq device wifi hotspot -- (commandline -op)" -xa 'ifname con-name ssid band channel password'
complete -c nmcli -n "contains_seq device wifi rescan -- (commandline -op)" -xa 'ifname ssid'
complete -c nmcli -n "contains_seq device lldp -- (commandline -op)" -xa 'list'
complete -c nmcli -n "__fish_seen_subcommand_from agent; and not __fish_seen_subcommand_from $nmcli_agent" -xa "secret" -d "Register nmcli as NM secret agent"
complete -c nmcli -n "__fish_seen_subcommand_from agent; and not __fish_seen_subcommand_from $nmcli_agent" -xa "polkit" -d "Register nmcli as a polkit agent for user session"
complete -c nmcli -n "__fish_seen_subcommand_from agent; and not __fish_seen_subcommand_from $nmcli_agent" -xa "all" -d "Run nmcli as secret and polkit agent"

View File

@@ -0,0 +1,12 @@
# completion for nvram (macOS)
function __fish_nvram_variables
command nvram -p
end
complete -c nvram -s x -f -d 'Use XML format for reading and writing variables'
complete -c nvram -s p -f -d 'Print all of the firmware variables'
complete -c nvram -s f -r -d 'Set firmware variables from a text file'
complete -c nvram -s d -x -a '(__fish_nvram_variables)' -d 'Deletes the named firmware variable'
complete -c nvram -s c -f -d 'Delete all of the firmware variable'
complete -c nvram -x -a '(__fish_nvram_variables)'

View File

@@ -0,0 +1,49 @@
complete -c objdump -l archive-headers -s a -d "Display archive header information"
complete -c objdump -l file-headers -s f -d "Display contents of the overall file header"
complete -c objdump -l private-headers -s p -d "Display object format specific file header contents"
complete -c objdump -l private -s P -d "Display object format specific contents" -x
complete -c objdump -l header -s h -d "Display contents of section headers"
complete -c objdump -l section-header -s h -d "Display content of section headers"
complete -c objdump -l all-headers -s x -d "Display the contents of all headers"
complete -c objdump -l disassemble -s d -d "Display assembler contents of executable sections"
complete -c objdump -l disassemble-all -s D -d "Display assembler contents of all sections"
complete -c objdump -l source -s S -d "Intermix source code with disassembly"
complete -c objdump -l full-contents -s s -d "Display full contents of all sections requested"
complete -c objdump -l debugging -s g -d "Display debug information in object file"
complete -c objdump -l debugging-tags -s e -d "Display debug information using ctags style"
complete -c objdump -l stabs -s G -d "Display (in raw form) any STABS info in file"
complete -c objdump -l dwarf -x -d "Display DWARF info in file" -a "rawline decodedline info abbrev pubnames aranges macro frames frames-interp str loc Ranges pubtypes gdb_index trace_info trace_abbrev trace_aranges addr cu_index"
complete -c objdump -l syms -s t -d "Display contents of symbol table(s)"
complete -c objdump -l dynamic-syms -s T -d "Display contents of dynamic symbol table"
complete -c objdump -l reloc -s r -d "Display relocation entries in file"
complete -c objdump -l dynamic-reloc -s R -d "Display dynamic relocation entries in file"
complete -c objdump -l version -s v -d "Display version number"
complete -c objdump -l info -s i -d "List object formats and architectures supported"
complete -c objdump -l help -s H -d "Display help"
complete -c objdump -l target -s b -d "Specify target object format" -x -a "elf64-x86-64 elf32-i386 elf32-iamcu elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex"
complete -c objdump -l architecture -s m -d "Specify target architecture" -x -a "i386 i386:x86-64 i386:x64-32 i8086 i386:intel i386:x86-64:intel i386:x64-32:intel i386:nacl i386:x86-64:nacl i386:x64-32:nacl iamcu iamcu:intel l1om l1om:intel k1om k1om:intel plugin"
complete -c objdump -l section -s j -d "Only display information for given section" -x
complete -c objdump -l disassembler-options -s M -d "Pass given options on to disassembler" -x
complete -c objdump -l endian -x -d "Set format endianness when disassembling" -a "big little"
complete -c objdump -o EB -d "Assume big endian format when disassembling"
complete -c objdump -o EL -d "Assume little endian format when disassembling"
complete -c objdump -l file-start-context -d "Include context from start of file (with -S)"
complete -c objdump -l include -s I -f -d "Add given directory to search list from source files" -x
complete -c objdump -l line-numbers -s l -d "Include line numbers and filenames in output"
complete -c objdump -l file-offsets -s F -d "Include file offsets when displaying information"
complete -c objdump -l demangle -s C -d "Decode mangled/processed symbol names" -x -a "auto gnu lucid arm hp edg gnu-v3 java gnat"
complete -c objdump -l wide -s w -d "Format output for more than 80 columns"
complete -c objdump -l disassemble-zeroes -s z -d "Do not skip blocks of zeroes when disassembling"
complete -c objdump -l start-address -d "Only process data whose address is >= given address" -x
complete -c objdump -l stop-address -d "Only process data whose address is <= given address" -x
complete -c objdump -l prefix-addresses -d "Print complete address alongside disassembly"
complete -c objdump -l show-raw-insn -d "Display hex alongside symbolic disassembly"
complete -c objdump -l no-show-raw-insn -d "Don't display hex alongside symbolic disassembly"
complete -c objdump -l insn-width -x -d "Display specified number of bytes on single line for -d"
complete -c objdump -l adjust-vma -x -d "Add offset to all displayed section address"
complete -c objdump -l special-syms -d "Include special symbols in symbol dumps"
complete -c objdump -l prefix -x -d "Add given prefix to absolute paths for -S"
complete -c objdump -l prefix-strip -x -d "Strip initial directory names for -S"
complete -c objdump -l dwarf-depth -x -d "Do not display DIEs at given depth or greater"
complete -c objdump -l dwarf-start -x -d "Display DIEs starting with given number"
complete -c objdump -l dwarf-check -d "Make additional dwarf internal consistency checks"

View File

@@ -2,7 +2,7 @@ begin
set -l unicode 'commandline | __fish_sgrep -qe "-[a-zA-Z]*C[a-zA-Z]*\$"'
set -l noopt 'commandline | not __fish_sgrep -qe "-[a-zA-Z]*C[a-zA-Z]*\$"'
set -l modules "(find (perl -lE'print for @INC') -name '*.pm' -printf '%P\n' ^/dev/null \
| awk '{ gsub(\"/\", \"::\") } /[^-.]/' RS='\\\\\\\\.pm'\n | sort | uniq)"
| sed -e 's,/,::,g; s,\.pm$,,' | sort -u)"
complete -c perl -s 0 -n $noopt --description 'Specify record separator'
complete -c perl -s a -n $noopt --description 'Turn on autosplit mode'
complete -c perl -s c -n $noopt --description 'Check syntax'

View File

@@ -1,8 +1,12 @@
function __fish_print_pygmentize
set -l lines (pygmentize -L $argv[1] | string match -r '^(?:\* | ).*(?:)$' | string replace -r '\* (.*):$' '$1' | string replace -r '^(.*).$' '$1' | string trim)
set -l lines (pygmentize -L $argv[1] | string match -r '^(?:\* | ).*(?:)$' | string replace -r '\* (.*):$' '$1' | string replace -r '^(.*)\.$' '$1' | string trim)
while set -q lines[2]
printf '%s\t%s\n' $lines[1] $lines[2]
set -l names (string split ", " $lines[1])
for name in $names
printf '%s\t%s\n' $name $lines[2]
end
set -e lines[1]
set -e lines[1]
end

View File

@@ -9,11 +9,11 @@
# -F, --from FORMAT The format to convert from. Can be css, scss, sass.
# By default, this is inferred from the input filename.
# If there is none, defaults to css.
complete -c sass-convert -s F -l from -x -a "css scss sass" -A -d "The format to convert from. Can be css, scss, sass. By default, this is inferred from the input filename. If there is none, defaults to css."
complete -c sass-convert -s F -l from -x -a "css scss sass" -d "The format to convert from. Can be css, scss, sass. By default, this is inferred from the input filename. If there is none, defaults to css."
# -T, --to FORMAT The format to convert to. Can be scss or sass.
# By default, this is inferred from the output filename.
# If there is none, defaults to sass.
complete -c sass-convert -s T -l to -x -a "scss sass" -A -d "The format to convert to. Can be scss or sass. By default, this is inferred from the output filename. If there is none, defaults to sass."
complete -c sass-convert -s T -l to -x -a "scss sass" -d "The format to convert to. Can be scss or sass. By default, this is inferred from the output filename. If there is none, defaults to sass."
# -i, --in-place Convert a file to its own syntax.
# This can be used to update some deprecated syntax.
complete -c sass-convert -s i -l in-place -d "Convert a file to its own syntax. This can be used to update some deprecated syntax."

View File

@@ -11,7 +11,7 @@ complete -c sass -s r -l require -x -d "Require a Ruby library before running Sa
# --compass Make Compass imports available and load project configuration.
complete -c sass -l compass -d "Make Compass imports available and load project configuration."
# -t, --style NAME Output style. Can be nested (default), compact, compressed, or expanded.
complete -c sass -s t -l style -x -A -a "nested compact compressed expanded" -d "Output style. Can be nested (default), compact, compressed, or expanded."
complete -c sass -s t -l style -x -a "nested compact compressed expanded" -d "Output style. Can be nested (default), compact, compressed, or expanded."
# -?, -h, --help Show this help message.
complete -c sass -s '?' -s h -l help -f -d "Show help message."
# -v, --version Print the Sass version.
@@ -44,7 +44,7 @@ complete -c sass -l scss -d "Use the CSS-superset SCSS syntax."
# file: always absolute file URIs
# inline: include the source text in the sourcemap
# none: no sourcemaps
complete -c sass -l sourcemap -x -A -a "auto\t'(default) relative paths where possible, file URIs elsewhere'
complete -c sass -l sourcemap -x -a "auto\t'(default) relative paths where possible, file URIs elsewhere'
sfile\t'always absolute file URIs'
inline\t'include the source text in the sourcemap'
none\t'no sourcemaps'" -d "How to link generated output to the source files."

View File

@@ -11,7 +11,7 @@ complete -c scss -s r -l require -r -d "Require a Ruby library before running Sa
# --compass Make Compass imports available and load project configuration.
complete -c scss -l compass -d "Make Compass imports available and load project configuration."
# -t, --style NAME Output style. Can be nested (default), compact, compressed, or expanded.
complete -c scss -s t -l style -x -a "nested compact compressed expanded" -A -d "Output style. Can be nested (default), compact, compressed, or expanded."
complete -c scss -s t -l style -x -a "nested compact compressed expanded" -d "Output style. Can be nested (default), compact, compressed, or expanded."
# -?, -h, --help Show this help message.
complete -c scss -s '?' -s h -l help -f -d "Show help message."
# -v, --version Print the Sass version.
@@ -44,7 +44,7 @@ complete -c scss -l sass -d "Use the indented Sass syntax."
# file: always absolute file URIs
# inline: include the source text in the sourcemap
# none: no sourcemaps
complete -c scss -l sourcemap -x -A -d "How to link generated output to the source files." -a \
complete -c scss -l sourcemap -x -d "How to link generated output to the source files." -a \
"auto\t'(default) relative paths where possible, file URIs elsewhere'
file\t'always absolute file URIs'
inline\t'include the source text in the sourcemap'

View File

@@ -78,5 +78,3 @@ complete -c set -n '__fish_set_is_color' -s o -l bold --description 'Make font b
complete -c set -n '__fish_is_first_token' -x -a '$__fish_locale_vars' -d 'Locale variable'
complete -c set -n '__fish_set_is_locale' -x -a '(locale -a)' -d (_ Locale)
complete -c set -s L -l long -d 'Do not truncate long lines'
complete -c set -u

View File

@@ -1,6 +1,9 @@
complete -c set_color -x --description "Color" -a '(set_color --print-colors)'
complete -c set_color -s b -l background -x -a '(set_color --print-colors)' --description "Change background color"
complete -c set_color -s o -l bold --description 'Make font bold'
complete -c set_color -s i -l italics --description 'Italicise'
complete -c set_color -s d -l dim --description 'Dim text'
complete -c set_color -s r -l reverse --description 'Reverse color text'
complete -c set_color -s u -l underline --description 'Underline text'
complete -c set_color -s h -l help --description 'Display help and exit'
complete -c set_color -s c -l print-colors --description 'Print a list of all accepted color names'

View File

@@ -2,23 +2,23 @@
set -l filter '"s/\S+\s\S+\s(.+)\((.+)\)/\1\t\2/;"'
complete -c setxkbmap -o '?' -o help -d 'Print this message'
complete -c setxkbmap -o compat -d 'Specifies compatibility map component name' -xa "(cat /usr/share/X11/xkb/compat.dir | sed -r $filter)"
complete -c setxkbmap -o compat -d 'Specifies compatibility map component name' -xa "(sed -r $filter /usr/share/X11/xkb/compat.dir)"
complete -c setxkbmap -o config -d 'Specifies configuration file to use' -r
complete -c setxkbmap -o device -d 'Specifies the device ID to use' -x
complete -c setxkbmap -o display -d 'Specifies display to use' -x
complete -c setxkbmap -o geometry -d 'Specifies geometry component name' -xa "(cat /usr/share/X11/xkb/geometry.dir | sed -r $filter)"
complete -c setxkbmap -o geometry -d 'Specifies geometry component name' -xa "(sed -r $filter /usr/share/X11/xkb/geometry.dir)"
complete -c setxkbmap -o I -d 'Add <dir> to list of directories to be used' -xa '(__fish_complete_directories)'
complete -c setxkbmap -o keycodes -d 'Specifies keycodes component name' -xa "(cat /usr/share/X11/xkb/keycodes.dir | sed -r $filter)"
complete -c setxkbmap -o keymap -d 'Specifies name of keymap to load' -xa "(cat /usr/share/X11/xkb/keymap.dir | sed -r $filter)"
complete -c setxkbmap -o keycodes -d 'Specifies keycodes component name' -xa "(sed -r $filter /usr/share/X11/xkb/keycodes.dir)"
complete -c setxkbmap -o keymap -d 'Specifies name of keymap to load' -xa "(sed -r $filter /usr/share/X11/xkb/keymap.dir)"
complete -c setxkbmap -o layout -d 'Specifies layout used to choose component names' -xa "(__fish_complete_setxkbmap layout)"
complete -c setxkbmap -o model -d 'Specifies model used to choose component names' -xa "(__fish_complete_setxkbmap model)"
complete -c setxkbmap -o option -d 'Adds an option used to choose component names' -xa "(__fish_complete_list , '__fish_complete_setxkbmap option')"
complete -c setxkbmap -o print -d 'Print a complete xkb_keymap description and exit'
complete -c setxkbmap -o query -d 'Print the current layout settings and exit'
complete -c setxkbmap -o rules -d 'Name of rules file to use' -x
complete -c setxkbmap -o symbols -d 'Specifies symbols component name' -xa "(cat /usr/share/X11/xkb/symbols.dir | sed -r $filter)"
complete -c setxkbmap -o symbols -d 'Specifies symbols component name' -xa "(sed -r $filter /usr/share/X11/xkb/symbols.dir)"
complete -c setxkbmap -o synch -d 'Synchronize request w/X server'
complete -c setxkbmap -o types -d 'Specifies types component name' -xa "(cat /usr/share/X11/xkb/types.dir | sed -r $filter)"
complete -c setxkbmap -o types -d 'Specifies types component name' -xa "(sed -r $filter /usr/share/X11/xkb/types.dir)"
complete -c setxkbmap -o v -o verbose -d 'Sets verbosity (1..10). Higher values yield more messages' -xa '(seq 1 10)'
complete -c setxkbmap -o variant -d 'Specifies layout variant used to choose component names' -xa "(__fish_complete_setxkbmap variant)"

View File

@@ -23,7 +23,8 @@ complete -c ssh -s a --description "Disables forwarding of the authentication ag
complete -c ssh -s A --description "Enables forwarding of the authentication agent"
complete -x -c ssh -s b --description "Interface to transmit from" -a "
(
cat /proc/net/arp ^/dev/null| string match -r -v '^IP'|cut -d ' ' -f 1 ^/dev/null
# TODO /proc/net/arp is not POSIX compliant
cut -d ' ' -f 1 /proc/net/arp ^/dev/null | string match -r -v '^IP'
)
"
@@ -46,6 +47,3 @@ complete -c ssh -s X --description "Enable X11 forwarding"
complete -c ssh -s L --description "Locally forwarded ports"
complete -c ssh -s R --description "Remotely forwarded ports"
complete -c ssh -s D --description "Dynamic port forwarding"
# Since ssh runs subcommands, it can accept any switches
complete -c ssh -u

View File

@@ -1,14 +1,25 @@
# Note that when a completion file is sourced a new block scope is created so `set -l` works.
set -l __fish_status_all_commands is-login is-interactive is-block is-command-substitution is-no-job-control is-interactive-job-control is-full-job-control current-filename current-line-number print-stack-trace job-control
# These are the recognized flags.
complete -c status -s h -l help --description "Display help and exit"
complete -c status -l is-command-substitution --description "Test if a command substitution is currently evaluated"
complete -c status -l is-block --description "Test if a code block is currently evaluated"
complete -c status -l is-interactive --description "Test if this is an interactive shell"
complete -c status -l is-login --description "Test if this is a login shell"
complete -c status -l is-full-job-control --description "Test if all new jobs are put under job control"
complete -c status -l is-interactive-job-control --description "Test if only interactive new jobs are put under job control"
complete -c status -l is-no-job-control --description "Test if new jobs are never put under job control"
complete -c status -s j -l job-control -xa "full interactive none" --description "Set which jobs are out under job control"
complete -c status -s t -l print-stack-trace --description "Print a list of all function calls leading up to running the current command"
complete -c status -s f -l current-filename --description "Print the filename of the currently running script"
complete -c status -s n -l current-line-number --description "Print the line number of the currently running script"
complete -c status -s t -l print-stack-trace --description "Prints a trace of all function calls on the stack"
# The "is-something" subcommands.
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-login -d "Test if this is a login shell"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-interactive -d "Test if this is an interactive shell"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-command-substitution -d "Test if a command substitution is currently evaluated"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-block -d "Test if a code block is currently evaluated"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-no-job-control -d "Test if new jobs are never put under job control"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-interactive-job-control -d "Test if only interactive new jobs are put under job control"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-full-job-control -d "Test if all new jobs are put under job control"
# The subcommands that are not "is-something" which don't change the fish state.
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a current-filename -d "Print the filename of the currently running script"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a current-line-number -d "Print the line number of the currently running script"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a print-stack-trace -d "Print a list of all function calls leading up to running the current command"
# The job-control command changes fish state.
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a job-control -d "Set which jobs are under job control"
complete -f -c status -n "__fish_seen_subcommand_from job-control" -a full -d "Set all jobs under job control"
complete -f -c status -n "__fish_seen_subcommand_from job-control" -a interactive -d "Set only interactive jobs under job control"
complete -f -c status -n "__fish_seen_subcommand_from job-control" -a none -d "Set no jobs under job control"

View File

@@ -24,5 +24,3 @@ complete -c sudo -s u -a "(__fish_complete_users)" -x -d "Run command as user"
complete -c sudo -s v -n "__fish_no_arguments" -d "Validate the credentials, extending timeout"
complete -c sudo -d "Command to run" -x -a "(__fish_complete_subcommand_root -u -g)"
# Since sudo runs subcommands, it can accept any switches
complete -c sudo -u

Some files were not shown because too many files have changed in this diff Show More