mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-12 20:21:15 -03:00
Compare commits
202 Commits
LastC++03
...
Integratio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
708d6b6911 | ||
|
|
c3dddee804 | ||
|
|
e468b71459 | ||
|
|
41f87e82a8 | ||
|
|
c9a409dcf3 | ||
|
|
0297e5a105 | ||
|
|
5996962749 | ||
|
|
8d32eb62ae | ||
|
|
446f5d6134 | ||
|
|
1f77c2d09d | ||
|
|
6c906b365b | ||
|
|
509ce38375 | ||
|
|
6580ba8d8e | ||
|
|
1baaeee17e | ||
|
|
6f9f7632f3 | ||
|
|
dcf3d03e54 | ||
|
|
81a41e26f8 | ||
|
|
41a41b1591 | ||
|
|
4bc220f349 | ||
|
|
5eaccf91e2 | ||
|
|
12ea04580a | ||
|
|
11dccccdcc | ||
|
|
e9de674bbd | ||
|
|
4bed9ea56d | ||
|
|
c28bd74ca7 | ||
|
|
bf274f4fb5 | ||
|
|
f365f720da | ||
|
|
4223b3da68 | ||
|
|
e5bfdb99b6 | ||
|
|
6eb88dc13f | ||
|
|
48392517d4 | ||
|
|
c5a6d87c5e | ||
|
|
e1b445f934 | ||
|
|
19c038d1ef | ||
|
|
6daa8d7e12 | ||
|
|
177e06808c | ||
|
|
69005f8c60 | ||
|
|
fcd53af89d | ||
|
|
6c3f12fe24 | ||
|
|
6f8775499f | ||
|
|
430d82bd4f | ||
|
|
573916e5e2 | ||
|
|
7a3e0924e0 | ||
|
|
fc81fa6abf | ||
|
|
af022728bd | ||
|
|
5ca63c4956 | ||
|
|
a070dffc4e | ||
|
|
f0515d0caa | ||
|
|
1f836f72b3 | ||
|
|
89e48ba0b3 | ||
|
|
b118ed69d3 | ||
|
|
dddbdddcff | ||
|
|
05f19ad09c | ||
|
|
7211802fc0 | ||
|
|
7b906134e2 | ||
|
|
1fb92b6f8c | ||
|
|
b22842a52f | ||
|
|
834fdf8666 | ||
|
|
1621fa43d8 | ||
|
|
3da3558e35 | ||
|
|
b29b026106 | ||
|
|
7ffcb828fe | ||
|
|
11f4e64e45 | ||
|
|
bd93a9e6ff | ||
|
|
aed5267fd1 | ||
|
|
26e781ef5a | ||
|
|
ee6691458e | ||
|
|
4cd34816cf | ||
|
|
f9835b5077 | ||
|
|
52c7ebe502 | ||
|
|
6b536922af | ||
|
|
574424dc5a | ||
|
|
aedee4e1a4 | ||
|
|
f31f53f61f | ||
|
|
7c40abe4a6 | ||
|
|
58347d494a | ||
|
|
01dbfb0a3f | ||
|
|
2740cc80d2 | ||
|
|
8ba2a4cfd4 | ||
|
|
1f2432d63a | ||
|
|
a70ed0282b | ||
|
|
a7e3678d3e | ||
|
|
dce9453d25 | ||
|
|
fa7682ec3c | ||
|
|
28cde83c33 | ||
|
|
96157a05f6 | ||
|
|
b9f0842d7e | ||
|
|
77d4d21caa | ||
|
|
48aa929008 | ||
|
|
291a28e79c | ||
|
|
6ab97227de | ||
|
|
6dec6ddc26 | ||
|
|
0785260365 | ||
|
|
885de80a0e | ||
|
|
8204d3103b | ||
|
|
0814797444 | ||
|
|
e8bed9e038 | ||
|
|
a927efa015 | ||
|
|
05ab849b72 | ||
|
|
d8a9e11c32 | ||
|
|
fe8fb2dccf | ||
|
|
720c0ddb35 | ||
|
|
2900352e04 | ||
|
|
dc96c01c93 | ||
|
|
1ace742b6c | ||
|
|
7996e15ad1 | ||
|
|
3b50fe8b68 | ||
|
|
9870cf838a | ||
|
|
8d27f81a7b | ||
|
|
9f8d854c2a | ||
|
|
40fa0d5c83 | ||
|
|
e8c18386c8 | ||
|
|
745bceb9d8 | ||
|
|
483e9fdea2 | ||
|
|
c6e3dd7965 | ||
|
|
c2c3813555 | ||
|
|
1a1a9b9927 | ||
|
|
47b78b9eeb | ||
|
|
396bf1235d | ||
|
|
d885f00941 | ||
|
|
0ba02ee3d1 | ||
|
|
5a5b51c909 | ||
|
|
07ef1e7c4b | ||
|
|
896b9ecc70 | ||
|
|
4c7baa37a3 | ||
|
|
599089de80 | ||
|
|
eb3ed2680b | ||
|
|
90f7d4b081 | ||
|
|
05a640b027 | ||
|
|
a8a10d634b | ||
|
|
029d88e962 | ||
|
|
59fa04bd91 | ||
|
|
0019c12af3 | ||
|
|
8e1661cd22 | ||
|
|
b48b2ddfb2 | ||
|
|
d0077d0910 | ||
|
|
e79d42aa52 | ||
|
|
7bb3bf7c74 | ||
|
|
41acaced3f | ||
|
|
42eaacd3a1 | ||
|
|
9443a415bf | ||
|
|
45d3a705be | ||
|
|
4288db9d39 | ||
|
|
8324893565 | ||
|
|
41d4058156 | ||
|
|
ed85393611 | ||
|
|
ffd4754cb2 | ||
|
|
54dd4b7ed6 | ||
|
|
8041913e7a | ||
|
|
2d5ce72cb4 | ||
|
|
d058d290be | ||
|
|
85d697f13d | ||
|
|
754b78a748 | ||
|
|
254762f30f | ||
|
|
bf53f39cdd | ||
|
|
2b0bad889a | ||
|
|
ee15f1b987 | ||
|
|
3289797248 | ||
|
|
2b7dddf342 | ||
|
|
1293cd8b6a | ||
|
|
417255fc55 | ||
|
|
d73ff39393 | ||
|
|
227ba10628 | ||
|
|
15921d37c4 | ||
|
|
eaa3741336 | ||
|
|
422ff0f173 | ||
|
|
e2ed561264 | ||
|
|
1fbcb1ee9d | ||
|
|
a0d9db94cb | ||
|
|
6a5a1a8964 | ||
|
|
a8b2da8405 | ||
|
|
7cfe028b9d | ||
|
|
1ca1667786 | ||
|
|
c8d2e6d972 | ||
|
|
ca33bbd4e0 | ||
|
|
f47ebc4b1c | ||
|
|
682af2f83f | ||
|
|
7c6527e9cf | ||
|
|
121109ee4d | ||
|
|
11a60c8374 | ||
|
|
54a76bb9e5 | ||
|
|
2f33c24a07 | ||
|
|
d0146d7b6f | ||
|
|
9ad1b86e4e | ||
|
|
f63c8a703e | ||
|
|
4f6ac06b21 | ||
|
|
18cc06b38f | ||
|
|
c1d4c07548 | ||
|
|
e97c5b552c | ||
|
|
9588c9a811 | ||
|
|
94ef40fb19 | ||
|
|
87b0d1b828 | ||
|
|
38ea6e088e | ||
|
|
0eda4020a2 | ||
|
|
ded6e726e5 | ||
|
|
df55991806 | ||
|
|
73bd7c51cf | ||
|
|
df12ac24b2 | ||
|
|
fb63bee322 | ||
|
|
c7a016a137 | ||
|
|
3a03d5df53 | ||
|
|
f0ba37b73a |
@@ -1,5 +1,6 @@
|
||||
<?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
|
||||
@@ -22,3 +23,13 @@
|
||||
</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>
|
||||
|
||||
@@ -8,3 +8,7 @@ varFuncNullUB
|
||||
// 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
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -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
|
||||
|
||||
95
CHANGELOG.md
95
CHANGELOG.md
@@ -1,4 +1,95 @@
|
||||
# fish next-2.x (released ???)
|
||||
# fish 2.5.0 (released February 3, 2017)
|
||||
|
||||
There are no major changes between 2.5b1 and 2.5.0. If you are upgrading from version 2.4.0 or before, please also review the release notes for 2.5b1 (included below).
|
||||
|
||||
## Notable fixes and improvements
|
||||
|
||||
- The Home, End, Insert, Delete, Page Up and Page Down keys work in Vi-style key bindings (#3731).
|
||||
|
||||
# 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)
|
||||
|
||||
---
|
||||
|
||||
@@ -53,7 +144,7 @@ There are no major changes between 2.4b1 and 2.4.0.
|
||||
- `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 .
|
||||
|
||||
|
||||
2
COPYING
2
COPYING
@@ -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.
|
||||
|
||||
|
||||
29
Makefile.in
29
Makefile.in
@@ -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
|
||||
@@ -675,7 +686,7 @@ install-force: all install-translations | show-datadir show-sysconfdir show-extr
|
||||
done;
|
||||
@echo "Installing $(bo)man pages$(sgr0)";
|
||||
$v $(INSTALL) -m 644 share/groff/* $(DESTDIR)$(datadir)/fish/groff/
|
||||
$v for i in $(wildcard share/man/man1/*.1); do \
|
||||
$v for i in $(HELP_MANPAGES); do \
|
||||
$(INSTALL) -m 644 $$i $(DESTDIR)$(datadir)/fish/man/man1/; \
|
||||
done;
|
||||
@echo "Installing helper tools";
|
||||
@@ -870,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
|
||||
|
||||
#
|
||||
@@ -889,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
|
||||
|
||||
#
|
||||
@@ -906,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -106,7 +106,7 @@ if set -q c_files[1]
|
||||
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=posix --language=c++ --template $template \
|
||||
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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
126
configure.ac
126
configure.ac
@@ -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
2
debian/compat
vendored
@@ -1 +1 @@
|
||||
8
|
||||
9
|
||||
|
||||
2
debian/control
vendored
2
debian/control
vendored
@@ -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/
|
||||
|
||||
7
debian/rules
vendored
7
debian/rules
vendored
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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`.
|
||||
|
||||
|
||||
@@ -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`').
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -989,15 +995,19 @@ Some bindings are shared between emacs- and vi-mode because they aren't text edi
|
||||
|
||||
- @key{Control,X} copies the current buffer to the system's clipboard, @key{Control,V} inserts the clipboard contents.
|
||||
|
||||
- @key{Alt,D} moves the next word to the <a href="#killring">killring</a>.
|
||||
- @key{Alt,d} moves the next word to the <a href="#killring">killring</a>.
|
||||
|
||||
- @key{Alt,H} (or @key{F1}) shows the manual page for the current command, if one exists.
|
||||
- @key{Alt,h} (or @key{F1}) shows the manual page for the current command, if one exists.
|
||||
|
||||
- @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,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,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,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,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
|
||||
|
||||
@@ -1011,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
|
||||
|
||||
@@ -1040,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
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
16
fish.spec.in
16
fish.spec.in
@@ -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
|
||||
|
||||
@@ -1138,7 +1138,7 @@
|
||||
D0A084F213B3AC130099B651 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0800;
|
||||
LastUpgradeCheck = 0820;
|
||||
TargetAttributes = {
|
||||
D008D0C41BC58F8800841177 = {
|
||||
CreatedOnToolsVersion = 7.0.1;
|
||||
@@ -1751,18 +1751,6 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
9C7A55711DCD71330049C25D /* 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;
|
||||
LLVM_LTO = YES_THIN;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = "Release_C++11";
|
||||
};
|
||||
D007693F1990137800CA4627 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@@ -1789,139 +1777,6 @@
|
||||
};
|
||||
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;
|
||||
LLVM_LTO = YES_THIN;
|
||||
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;
|
||||
LLVM_LTO = YES_THIN;
|
||||
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;
|
||||
LLVM_LTO = YES_THIN;
|
||||
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;
|
||||
LLVM_LTO = YES_THIN;
|
||||
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 = {
|
||||
@@ -1936,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 = {
|
||||
@@ -1965,7 +1813,7 @@
|
||||
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;
|
||||
};
|
||||
@@ -1991,36 +1839,10 @@
|
||||
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;
|
||||
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 = "";
|
||||
};
|
||||
name = "Release_C++11";
|
||||
};
|
||||
D07D267015E33B86009E43F6 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@@ -2045,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;
|
||||
@@ -2080,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)";
|
||||
@@ -2095,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;
|
||||
@@ -2128,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 = (
|
||||
@@ -2276,7 +2102,6 @@
|
||||
buildConfigurations = (
|
||||
9C7A556F1DCD71330049C25D /* Debug */,
|
||||
9C7A55701DCD71330049C25D /* Release */,
|
||||
9C7A55711DCD71330049C25D /* Release_C++11 */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2286,7 +2111,6 @@
|
||||
buildConfigurations = (
|
||||
D007693F1990137800CA4627 /* Debug */,
|
||||
D00769401990137800CA4627 /* Release */,
|
||||
D00769411990137800CA4627 /* Release_C++11 */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2296,7 +2120,6 @@
|
||||
buildConfigurations = (
|
||||
D008D0C51BC58F8800841177 /* Debug */,
|
||||
D008D0C61BC58F8800841177 /* Release */,
|
||||
D008D0C71BC58F8800841177 /* Release_C++11 */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2306,7 +2129,6 @@
|
||||
buildConfigurations = (
|
||||
D04F7FD21BA4E29300B0F227 /* Debug */,
|
||||
D04F7FD31BA4E29300B0F227 /* Release */,
|
||||
D04F7FD41BA4E29300B0F227 /* Release_C++11 */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2316,7 +2138,6 @@
|
||||
buildConfigurations = (
|
||||
D07D267015E33B86009E43F6 /* Debug */,
|
||||
D07D267115E33B86009E43F6 /* Release */,
|
||||
D007FDDB17136EAA00A52BE6 /* Release_C++11 */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2326,7 +2147,6 @@
|
||||
buildConfigurations = (
|
||||
D0A084F813B3AC130099B651 /* Debug */,
|
||||
D0A084F913B3AC130099B651 /* Release */,
|
||||
D007FDDA17136EAA00A52BE6 /* Release_C++11 */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2336,7 +2156,6 @@
|
||||
buildConfigurations = (
|
||||
D0A564E7168CFDD800AF6161 /* Debug */,
|
||||
D0A564E8168CFDD800AF6161 /* Release */,
|
||||
D007FDE217136EAA00A52BE6 /* Release_C++11 */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2346,7 +2165,6 @@
|
||||
buildConfigurations = (
|
||||
D0D02AA515985A75008E62BD /* Debug */,
|
||||
D0D02AA615985A75008E62BD /* Release */,
|
||||
D007FDDD17136EAA00A52BE6 /* Release_C++11 */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2356,7 +2174,6 @@
|
||||
buildConfigurations = (
|
||||
D0D02AD41598642A008E62BD /* Debug */,
|
||||
D0D02AD51598642A008E62BD /* Release */,
|
||||
D007FDE017136EAA00A52BE6 /* Release_C++11 */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2366,7 +2183,6 @@
|
||||
buildConfigurations = (
|
||||
D0D26944159835CA005D9B9C /* Debug */,
|
||||
D0D26945159835CA005D9B9C /* Release */,
|
||||
D007FDDE17136EAA00A52BE6 /* Release_C++11 */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -2376,7 +2192,6 @@
|
||||
buildConfigurations = (
|
||||
D0F019EE15A976F30034B3B1 /* Debug */,
|
||||
D0F019EF15A976F30034B3B1 /* Release */,
|
||||
D007FDDC17136EAA00A52BE6 /* Release_C++11 */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0800"
|
||||
LastUpgradeVersion = "0820"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0800"
|
||||
LastUpgradeVersion = "0820"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0800"
|
||||
LastUpgradeVersion = "0820"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0800"
|
||||
LastUpgradeVersion = "0820"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -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
562
m4/ax_cxx_compile_stdcxx.m4
Normal 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
|
||||
|
||||
]])
|
||||
39
m4/ax_cxx_compile_stdcxx_11.m4
Normal file
39
m4/ax_cxx_compile_stdcxx_11.m4
Normal 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])])
|
||||
@@ -17,7 +17,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.4.500</string>
|
||||
<string>2.5.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.1</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
|
||||
38
osx/config.h
38
osx/config.h
@@ -5,18 +5,27 @@
|
||||
#define HAVE_BACKTRACE_SYMBOLS 1
|
||||
|
||||
/* Define to 1 if you have the `clock_gettime' function. */
|
||||
#define HAVE_CLOCK_GETTIME 1
|
||||
/* #undef HAVE_CLOCK_GETTIME */
|
||||
|
||||
/* 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 */
|
||||
|
||||
@@ -51,7 +60,7 @@
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `mkostemp' function. */
|
||||
#define HAVE_MKOSTEMP 1
|
||||
/* #undef HAVE_MKOSTEMP */
|
||||
|
||||
/* Define to 1 if you have the <ncurses/curses.h> header file. */
|
||||
/* #undef HAVE_NCURSES_CURSES_H */
|
||||
@@ -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.4.0-git"
|
||||
#define PACKAGE_STRING "fish 2.5.0"
|
||||
|
||||
/* 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.4.0-git"
|
||||
#define PACKAGE_VERSION "2.5.0"
|
||||
|
||||
/* The size of `wchar_t', as computed by sizeof. */
|
||||
#define SIZEOF_WCHAR_T 4
|
||||
|
||||
12
share/completions/VBoxHeadless.fish
Normal file
12
share/completions/VBoxHeadless.fish
Normal 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"
|
||||
34
share/completions/VBoxSDL.fish
Normal file
34
share/completions/VBoxSDL.fish
Normal 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"
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
5
share/completions/base64.fish
Normal file
5
share/completions/base64.fish
Normal 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"
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
44
share/completions/dconf.fish
Normal file
44
share/completions/dconf.fish
Normal 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"
|
||||
@@ -8,7 +8,7 @@ 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 default 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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
89
share/completions/feh.fish
Normal file
89
share/completions/feh.fish
Normal 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"
|
||||
@@ -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'
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
45
share/completions/launchctl.fish
Normal file
45
share/completions/launchctl.fish
Normal 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")'"'
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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)"
|
||||
|
||||
@@ -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"
|
||||
|
||||
49
share/completions/objdump.fish
Normal file
49
share/completions/objdump.fish
Normal 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"
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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)"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -21,7 +21,7 @@ complete -c systemd-nspawn -s L -l selinux-apifs-context -d 'Sets the SELinux se
|
||||
complete -c systemd-nspawn -l capability -d 'Grant additional capabilities to the container'
|
||||
complete -c systemd-nspawn -l drop-capability -d 'Drop capabilities from the container'
|
||||
complete -c systemd-nspawn -l kill-signal -d "Signal to send to the container's PID1 when nspawn receives SIGTERM"
|
||||
complete -c systemd-nspawn -l link-journal -d 'Set container journal visibility' -a 'no host try-host guest try-guest auto' -r -A
|
||||
complete -c systemd-nspawn -l link-journal -d 'Set container journal visibility' -a 'no host try-host guest try-guest auto' -r
|
||||
complete -c systemd-nspawn -s j -d 'Equivalent to --link-journal=try-guest'
|
||||
complete -c systemd-nspawn -l read-only -d 'Mount the root file system read-only for the container'
|
||||
complete -c systemd-nspawn -l bind -l bind-ro -d 'Bind mount a file or directory from the host in the container' -r
|
||||
|
||||
@@ -63,4 +63,4 @@ complete -c tar -l uncompress --description "Filter through compress"
|
||||
complete -c tar -s z -l gzip --description "Filter through gzip"
|
||||
complete -c tar -l gunzip --description "Filter through gzip"
|
||||
complete -c tar -l use-compress-program -r --description "Filter through specified program"
|
||||
|
||||
complete -c tar -s J -l xz --description "Filter through xz"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
complete -c test -l help --description "Display help and exit"
|
||||
complete -c test -l version --description "Display version and exit"
|
||||
#complete -c test -l version --description "Display version and exit"
|
||||
complete -c test -a ! --description "Negate expression"
|
||||
complete -c test -s a --description "Logical and"
|
||||
complete -c test -s o --description "Logical or"
|
||||
complete -c test -s a --description "Logical AND"
|
||||
complete -c test -s o --description "Logical OR"
|
||||
complete -c test -s n --description "String length is non-zero"
|
||||
complete -c test -s z --description "String length is zero"
|
||||
complete -c test -a = --description "Strings are equal"
|
||||
@@ -14,23 +14,24 @@ complete -c test -o gt --description "Left integer larger than right integer"
|
||||
complete -c test -o le --description "Left integer less than or equal to right integer"
|
||||
complete -c test -o lt --description "Left integer less than right integer"
|
||||
complete -c test -o ne --description "Left integer not equal to right integer"
|
||||
complete -c test -o ef --description "Left file equal to right file"
|
||||
complete -c test -o nt --description "Left file newer than right file"
|
||||
complete -c test -o ot --description "Left file older than right file"
|
||||
# builtin test does not do these
|
||||
#complete -c test -o ef --description "Left file equal to right file"
|
||||
#complete -c test -o nt --description "Left file newer than right file"
|
||||
#complete -c test -o ot --description "Left file older than right file"
|
||||
complete -c test -s b --description "File is block device"
|
||||
complete -c test -s c --description "File is character device"
|
||||
complete -c test -s d --description "File is directory"
|
||||
complete -c test -s e --description "File exists"
|
||||
complete -c test -s f --description "File is regular"
|
||||
complete -c test -s g --description "File is set-group-ID"
|
||||
complete -c test -s G --description "File owned by effective group ID"
|
||||
complete -c test -s L --description "File is symlink"
|
||||
complete -c test -s O --description "File owned by effective user ID"
|
||||
complete -c test -s p --description "File is named pipe"
|
||||
complete -c test -s G --description "File owned by our effective group ID"
|
||||
complete -c test -s L --description "File is a symlink"
|
||||
complete -c test -s O --description "File owned by our effective user ID"
|
||||
complete -c test -s p --description "File is a named pipe"
|
||||
complete -c test -s r --description "File is readable"
|
||||
complete -c test -s s --description "File size is non-zero"
|
||||
complete -c test -s S --description "File is socket"
|
||||
complete -c test -s t --description "FD is terminal"
|
||||
complete -c test -s S --description "File is a socket"
|
||||
complete -c test -s t --description "FD is a terminal"
|
||||
complete -c test -s u --description "File set-user-ID bit is set"
|
||||
complete -c test -s w --description "File is writable"
|
||||
complete -c test -s x --description "File is executable"
|
||||
|
||||
@@ -8,6 +8,3 @@ complete -c time -s a -l append -n "__fish_no_arguments" --description "(Used to
|
||||
complete -c time -s v -l verbose -n "__fish_no_arguments" --description "Verbose mode"
|
||||
complete -c time -l help -n "__fish_no_arguments" --description "Display help and exit"
|
||||
complete -c time -s V -l version -n "__fish_no_arguments" --description "Display version and exit"
|
||||
|
||||
# Since time runs subcommands, it can accept any switches
|
||||
complete -c time -u
|
||||
|
||||
@@ -16,7 +16,7 @@ complete -c umount -s d --description "In case the unmounted device was a loop d
|
||||
complete -c umount -s i --description "Don't call the /sbin/umount.<filesystem> helper even if it exists"
|
||||
complete -c umount -s a --description "Unmount all of the file systems described in /etc/mtab"
|
||||
complete -c umount -s t --description "Actions should only be taken on file systems of the specified type" -xa "(__fish_print_filesystems)"
|
||||
complete -c umount -s O --description "Actions should only be taken on file systems with the specified options in /etc/fstab" -xa '(cat /etc/mtab | cut -d " " -f 4)\t"Mount option"'
|
||||
complete -c umount -s O --description "Actions should only be taken on file systems with the specified options in /etc/fstab" -xa '(cut -d " " -f 4 /etc/mtab)\t"Mount option"'
|
||||
complete -c umount -s f --description "Force unmount (in case of an unreachable NFS system)"
|
||||
complete -c umount -s l --description "Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
complete -c useradd -s c -l comment --description 'A comment about this user' -r
|
||||
complete -c useradd -s d -l home --description 'Home directory for the new user' -x -a '(__fish_complete_directories)'
|
||||
complete -c useradd -s G -l groups --description 'Supplementary groups' -xa '(__fish_append , (cat /etc/group|cut -d : -f 1))'
|
||||
complete -c useradd -s G -l groups --description 'Supplementary groups' -xa '(__fish_append , (cut -d : -f 1 /etc/group))'
|
||||
complete -c useradd -s h -l help --description 'Display help message and exit'
|
||||
complete -c useradd -s m -l create-home --description 'The user\'s home directory will be created if it does not exist'
|
||||
complete -c useradd -s n --description 'A group having the same name as the user being added to the system will be created by default (when -g is not specified)'
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
function __fish_xprop_list_properties
|
||||
# TODO search commandline for a target window ("-root" or "-name foo")
|
||||
xprop -root | cut -d'(' -f 1
|
||||
end
|
||||
|
||||
complete -c xprop -o help --description "Display help and exit"
|
||||
complete -c xprop -o grammar --description "Display grammar and exit"
|
||||
@@ -10,23 +14,9 @@ complete -c xprop -o len -x --description "Maximum display length"
|
||||
complete -c xprop -o notype --description "Do not show property type"
|
||||
complete -c xprop -o fs -r --description "Set format file"
|
||||
complete -c xprop -o frame --description "Select a window by clicking on its frame"
|
||||
complete -c xprop -o remove --description "Remove property" -x -a "
|
||||
(
|
||||
xprop -root -notype|cut -d ' ' -f 1|cut -d \t -f 1
|
||||
)
|
||||
"
|
||||
|
||||
complete -c xprop -o set --description "Set property" -x -a "
|
||||
(
|
||||
xprop -root -notype|cut -d ' ' -f 1|cut -d \t -f 1
|
||||
)
|
||||
"
|
||||
|
||||
complete -c xprop -o remove --description "Remove property" -x -a "( __fish_xprop_list_properties)"
|
||||
complete -c xprop -o set --description "Set property" -x -a " (__fish_xprop_list_properties)"
|
||||
complete -c xprop -o spy --description "Examine property updates forever"
|
||||
complete -c xprop -o f --description "Set format"
|
||||
complete -c xprop -d Property -x -a "
|
||||
(
|
||||
xprop -root -notype|cut -d ' ' -f 1|cut -d \t -f 1
|
||||
)
|
||||
"
|
||||
complete -c xprop -d Property -x -a "( __fish_xprop_list_properties)"
|
||||
|
||||
|
||||
@@ -10,51 +10,52 @@ set -g IFS \n\ \t
|
||||
# Create the default command_not_found handler
|
||||
#
|
||||
function __fish_default_command_not_found_handler
|
||||
echo "fish: Unknown command '$argv'" >&2
|
||||
echo "fish: Unknown command '$argv'" >&2
|
||||
end
|
||||
|
||||
set -g version $FISH_VERSION
|
||||
|
||||
if status --is-interactive
|
||||
# The user has seemingly explicitly launched an old fish with too-new scripts installed.
|
||||
if not contains -- "string" (builtin -n)
|
||||
set -g __is_launched_without_string 1
|
||||
# XXX nostring - fix old fish binaries with no `string' builtin.
|
||||
# When executed on fish 2.2.0, the `else' block after this would
|
||||
# force on 24-bit mode due to changes to in test behavior.
|
||||
# These "XXX nostring" hacks were added for 2.3.1
|
||||
set_color --bold
|
||||
echo "You appear to be trying to launch an old fish binary with newer scripts "
|
||||
echo "installed into" (set_color --underline)"$__fish_datadir"
|
||||
set_color normal
|
||||
echo -e "\nThis is an unsupported configuration.\n"
|
||||
set_color yellow
|
||||
echo "You may need to uninstall and reinstall fish!"
|
||||
set_color normal
|
||||
# Remove this code when we've made it safer to upgrade fish.
|
||||
else
|
||||
# Enable truecolor/24-bit support for select terminals
|
||||
# Ignore Neovim (in 0.1.4 at least), Screen and emacs' ansi-term as they swallow the sequences, rendering the text white.
|
||||
if not set -q NVIM_LISTEN_ADDRESS
|
||||
and not set -q STY
|
||||
and not string match -q -- 'eterm*' $TERM
|
||||
and begin
|
||||
set -q KONSOLE_PROFILE_NAME # KDE's konsole
|
||||
or string match -q -- "*:*" $ITERM_SESSION_ID # Supporting versions of iTerm2 will include a colon here
|
||||
or string match -q -- "st-*" $TERM # suckless' st
|
||||
or test "$VTE_VERSION" -ge 3600 # Should be all gtk3-vte-based terms after version 3.6.0.0
|
||||
or test "$COLORTERM" = truecolor -o "$COLORTERM" = 24bit # slang expects this
|
||||
end
|
||||
# Only set it if it isn't to allow override by setting to 0
|
||||
set -q fish_term24bit; or set -g fish_term24bit 1
|
||||
end
|
||||
end
|
||||
# The user has seemingly explicitly launched an old fish with too-new scripts installed.
|
||||
if not contains -- "string" (builtin -n)
|
||||
set -g __is_launched_without_string 1
|
||||
# XXX nostring - fix old fish binaries with no `string' builtin.
|
||||
# When executed on fish 2.2.0, the `else' block after this would
|
||||
# force on 24-bit mode due to changes to in test behavior.
|
||||
# These "XXX nostring" hacks were added for 2.3.1
|
||||
set_color --bold
|
||||
echo "You appear to be trying to launch an old fish binary with newer scripts "
|
||||
echo "installed into" (set_color --underline)"$__fish_datadir"
|
||||
set_color normal
|
||||
echo -e "\nThis is an unsupported configuration.\n"
|
||||
set_color yellow
|
||||
echo "You may need to uninstall and reinstall fish!"
|
||||
set_color normal
|
||||
# Remove this code when we've made it safer to upgrade fish.
|
||||
else
|
||||
# Enable truecolor/24-bit support for select terminals
|
||||
# Ignore Neovim (in 0.1.4 at least), Screen and emacs' ansi-term as they swallow the sequences, rendering the text white.
|
||||
if not set -q NVIM_LISTEN_ADDRESS
|
||||
and not set -q STY
|
||||
and not string match -q -- 'eterm*' $TERM
|
||||
and begin
|
||||
set -q KONSOLE_PROFILE_NAME # KDE's konsole
|
||||
or string match -q -- "*:*" $ITERM_SESSION_ID # Supporting versions of iTerm2 will include a colon here
|
||||
or string match -q -- "st-*" $TERM # suckless' st
|
||||
or test -n "$VTE_VERSION" -a "$VTE_VERSION" -ge 3600 # Should be all gtk3-vte-based terms after version 3.6.0.0
|
||||
or test "$COLORTERM" = truecolor -o "$COLORTERM" = 24bit # slang expects this
|
||||
end
|
||||
# Only set it if it isn't to allow override by setting to 0
|
||||
set -q fish_term24bit
|
||||
or set -g fish_term24bit 1
|
||||
end
|
||||
end
|
||||
else
|
||||
# Hook up the default as the principal command_not_found handler
|
||||
# in case we are not interactive
|
||||
function __fish_command_not_found_handler --on-event fish_command_not_found
|
||||
__fish_default_command_not_found_handler $argv
|
||||
end
|
||||
# Hook up the default as the principal command_not_found handler
|
||||
# in case we are not interactive
|
||||
function __fish_command_not_found_handler --on-event fish_command_not_found
|
||||
__fish_default_command_not_found_handler $argv
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
@@ -65,13 +66,13 @@ end
|
||||
set -l configdir ~/.config
|
||||
|
||||
if set -q XDG_CONFIG_HOME
|
||||
set configdir $XDG_CONFIG_HOME
|
||||
set configdir $XDG_CONFIG_HOME
|
||||
end
|
||||
|
||||
set -l userdatadir ~/.local/share
|
||||
|
||||
if set -q XDG_DATA_HOME
|
||||
set userdatadir $XDG_DATA_HOME
|
||||
set userdatadir $XDG_DATA_HOME
|
||||
end
|
||||
|
||||
# __fish_datadir, __fish_sysconfdir, __fish_help_dir, __fish_bin_dir
|
||||
@@ -90,19 +91,19 @@ end
|
||||
# default functions/completions are included in the respective path.
|
||||
|
||||
if not set -q fish_function_path
|
||||
set fish_function_path $configdir/fish/functions $__fish_sysconfdir/functions $__extra_functionsdir $__fish_datadir/functions
|
||||
set fish_function_path $configdir/fish/functions $__fish_sysconfdir/functions $__extra_functionsdir $__fish_datadir/functions
|
||||
end
|
||||
|
||||
if not contains -- $__fish_datadir/functions $fish_function_path
|
||||
set fish_function_path $fish_function_path $__fish_datadir/functions
|
||||
set fish_function_path $fish_function_path $__fish_datadir/functions
|
||||
end
|
||||
|
||||
if not set -q fish_complete_path
|
||||
set fish_complete_path $configdir/fish/completions $__fish_sysconfdir/completions $__extra_completionsdir $__fish_datadir/completions $userdatadir/fish/generated_completions
|
||||
set fish_complete_path $configdir/fish/completions $__fish_sysconfdir/completions $__extra_completionsdir $__fish_datadir/completions $userdatadir/fish/generated_completions
|
||||
end
|
||||
|
||||
if not contains -- $__fish_datadir/completions $fish_complete_path
|
||||
set fish_complete_path $fish_complete_path $__fish_datadir/completions
|
||||
set fish_complete_path $fish_complete_path $__fish_datadir/completions
|
||||
end
|
||||
|
||||
#
|
||||
@@ -114,53 +115,79 @@ end
|
||||
#
|
||||
|
||||
if test -d /usr/xpg4/bin
|
||||
if not contains -- /usr/xpg4/bin $PATH
|
||||
set PATH /usr/xpg4/bin $PATH
|
||||
end
|
||||
if not contains -- /usr/xpg4/bin $PATH
|
||||
set PATH /usr/xpg4/bin $PATH
|
||||
end
|
||||
end
|
||||
|
||||
# OS X-ism: Load the path files out of /etc/paths and /etc/paths.d/*
|
||||
set -g __fish_tmp_path $PATH
|
||||
function __fish_load_path_helper_paths
|
||||
# We want to rearrange the path to reflect this order. Delete that path component if it exists and then prepend it.
|
||||
# Since we are prepending but want to preserve the order of the input file, we reverse the array, append, and then reverse it again
|
||||
set __fish_tmp_path $__fish_tmp_path[-1..1]
|
||||
while read -l new_path_comp
|
||||
if test -d $new_path_comp
|
||||
set -l where (contains -i -- $new_path_comp $__fish_tmp_path)
|
||||
and set -e __fish_tmp_path[$where]
|
||||
set __fish_tmp_path $new_path_comp $__fish_tmp_path
|
||||
end
|
||||
end
|
||||
set __fish_tmp_path $__fish_tmp_path[-1..1]
|
||||
# We want to rearrange the path to reflect this order. Delete that path component if it exists and then prepend it.
|
||||
# Since we are prepending but want to preserve the order of the input file, we reverse the array, append, and then reverse it again
|
||||
set __fish_tmp_path $__fish_tmp_path[-1..1]
|
||||
while read -l new_path_comp
|
||||
if test -d $new_path_comp
|
||||
set -l where (contains -i -- $new_path_comp $__fish_tmp_path)
|
||||
and set -e __fish_tmp_path[$where]
|
||||
set __fish_tmp_path $new_path_comp $__fish_tmp_path
|
||||
end
|
||||
end
|
||||
set __fish_tmp_path $__fish_tmp_path[-1..1]
|
||||
end
|
||||
test -r /etc/paths
|
||||
and __fish_load_path_helper_paths </etc/paths
|
||||
for pathfile in /etc/paths.d/*
|
||||
__fish_load_path_helper_paths <$pathfile
|
||||
end
|
||||
test -r /etc/paths ; and __fish_load_path_helper_paths < /etc/paths
|
||||
for pathfile in /etc/paths.d/* ; __fish_load_path_helper_paths < $pathfile ; end
|
||||
set -xg PATH $__fish_tmp_path
|
||||
set -e __fish_tmp_path
|
||||
functions -e __fish_load_path_helper_paths
|
||||
|
||||
# OS X-ism: Load the manpath files out of /etc/manpaths and /etc/manpaths.d/*
|
||||
if set -q MANPATH
|
||||
set -g __fish_tmp_manpath $MANPATH
|
||||
function __fish_load_manpath_helper_manpaths
|
||||
# We want to rearrange the manpath to reflect this order. Delete that manpath component if it exists and then prepend it.
|
||||
# Since we are prepending but want to preserve the order of the input file, we reverse the array, append, and then reverse it again
|
||||
set __fish_tmp_manpath $__fish_tmp_manpath[-1..1]
|
||||
while read -l new_manpath_comp
|
||||
if test -d $new_manpath_comp
|
||||
set -l where (contains -i -- $new_manpath_comp $__fish_tmp_manpath)
|
||||
and set -e __fish_tmp_manpath[$where]
|
||||
set __fish_tmp_manpath $new_manpath_comp $__fish_tmp_manpath
|
||||
end
|
||||
end
|
||||
set __fish_tmp_manpath $__fish_tmp_manpath[-1..1]
|
||||
end
|
||||
test -r /etc/manpaths ; and __fish_load_manpath_helper_manpaths < /etc/manpaths
|
||||
for manpathfile in /etc/manpaths.d/* ; __fish_load_manpath_helper_manpaths < $manpathfile ; end
|
||||
set -xg MANPATH $__fish_tmp_manpath
|
||||
set -e __fish_tmp_manpath
|
||||
functions -e __fish_load_manpath_helper_manpaths
|
||||
end
|
||||
|
||||
|
||||
# Add a handler for when fish_user_path changes, so we can apply the same changes to PATH
|
||||
# Invoke it immediately to apply the current value of fish_user_path
|
||||
function __fish_reconstruct_path -d "Update PATH when fish_user_paths changes" --on-variable fish_user_paths
|
||||
set -l local_path $PATH
|
||||
set -l x
|
||||
for x in $__fish_added_user_paths
|
||||
set -l idx (contains --index -- $x $local_path)
|
||||
and set -e local_path[$idx]
|
||||
end
|
||||
set -l local_path $PATH
|
||||
set -l x
|
||||
for x in $__fish_added_user_paths
|
||||
set -l idx (contains --index -- $x $local_path)
|
||||
and set -e local_path[$idx]
|
||||
end
|
||||
|
||||
set -e __fish_added_user_paths
|
||||
for x in $fish_user_paths[-1..1]
|
||||
if set -l idx (contains --index -- $x $local_path)
|
||||
set -e local_path[$idx]
|
||||
else
|
||||
set -g __fish_added_user_paths $__fish_added_user_paths $x
|
||||
end
|
||||
set local_path $x $local_path
|
||||
end
|
||||
set -xg PATH $local_path
|
||||
set -e __fish_added_user_paths
|
||||
for x in $fish_user_paths[-1..1]
|
||||
if set -l idx (contains --index -- $x $local_path)
|
||||
set -e local_path[$idx]
|
||||
else
|
||||
set -g __fish_added_user_paths $__fish_added_user_paths $x
|
||||
end
|
||||
set local_path $x $local_path
|
||||
end
|
||||
set -xg PATH $local_path
|
||||
end
|
||||
__fish_reconstruct_path
|
||||
|
||||
@@ -168,7 +195,7 @@ __fish_reconstruct_path
|
||||
# Launch debugger on SIGTRAP
|
||||
#
|
||||
function fish_sigtrap_handler --on-signal TRAP --no-scope-shadowing --description "Signal handler for the TRAP signal. Launches a debug prompt."
|
||||
breakpoint
|
||||
breakpoint
|
||||
end
|
||||
|
||||
#
|
||||
@@ -177,22 +204,22 @@ end
|
||||
# This handler removes itself after it is first called.
|
||||
#
|
||||
function __fish_on_interactive --on-event fish_prompt
|
||||
__fish_config_interactive
|
||||
functions -e __fish_on_interactive
|
||||
__fish_config_interactive
|
||||
functions -e __fish_on_interactive
|
||||
end
|
||||
|
||||
# "." command for compatibility with old fish versions.
|
||||
function . --description 'Evaluate contents of file (deprecated, see "source")' --no-scope-shadowing
|
||||
if begin
|
||||
test (count $argv) -eq 0
|
||||
# Uses tty directly, as isatty depends on "."
|
||||
and tty 0>&0 >/dev/null
|
||||
end
|
||||
echo "source: '.' command is deprecated, and doesn't work with STDIN anymore. Did you mean 'source' or './'?" >&2
|
||||
return 1
|
||||
else
|
||||
source $argv
|
||||
end
|
||||
if begin
|
||||
test (count $argv) -eq 0
|
||||
# Uses tty directly, as isatty depends on "."
|
||||
and tty 0>&0 >/dev/null
|
||||
end
|
||||
echo "source: '.' command is deprecated, and doesn't work with STDIN anymore. Did you mean 'source' or './'?" >&2
|
||||
return 1
|
||||
else
|
||||
source $argv
|
||||
end
|
||||
end
|
||||
|
||||
# Set the locale if it isn't explicitly set. Allowing the lack of locale env vars to imply the
|
||||
@@ -204,23 +231,25 @@ __fish_set_locale
|
||||
# Implement precedence (User > Admin > Extra (e.g. vendors) > Fish) by basically doing "basename"
|
||||
set -l sourcelist
|
||||
for file in $configdir/fish/conf.d/*.fish $__fish_sysconfdir/conf.d/*.fish $__extra_confdir/*.fish
|
||||
set -l basename (string replace -r '^.*/' '' -- $file)
|
||||
contains -- $basename $sourcelist; and continue
|
||||
set sourcelist $sourcelist $basename
|
||||
# Also skip non-files or unreadable files
|
||||
# This allows one to use e.g. symlinks to /dev/null to "mask" something (like in systemd)
|
||||
[ -f $file -a -r $file ]; and source $file
|
||||
set -l basename (string replace -r '^.*/' '' -- $file)
|
||||
contains -- $basename $sourcelist
|
||||
and continue
|
||||
set sourcelist $sourcelist $basename
|
||||
# Also skip non-files or unreadable files
|
||||
# This allows one to use e.g. symlinks to /dev/null to "mask" something (like in systemd)
|
||||
[ -f $file -a -r $file ]
|
||||
and source $file
|
||||
end
|
||||
|
||||
# Upgrade pre-existing abbreviations from the old "key=value" to the new "key value" syntax
|
||||
# This needs to be in share/config.fish because __fish_config_interactive is called after 2sourcing config.fish, which might contain abbr calls
|
||||
if not set -q __fish_init_2_3_0
|
||||
set -l fab
|
||||
for abb in $fish_user_abbreviations
|
||||
set fab $fab (string replace -r '^([^ =]+)=(.*)$' '$1 $2' -- $abb)
|
||||
end
|
||||
set fish_user_abbreviations $fab
|
||||
set -U __fish_init_2_3_0
|
||||
set -l fab
|
||||
for abb in $fish_user_abbreviations
|
||||
set fab $fab (string replace -r '^([^ =]+)=(.*)$' '$1 $2' -- $abb)
|
||||
end
|
||||
set fish_user_abbreviations $fab
|
||||
set -U __fish_init_2_3_0
|
||||
end
|
||||
|
||||
#
|
||||
@@ -230,15 +259,15 @@ end
|
||||
|
||||
if status --is-login
|
||||
|
||||
#
|
||||
# Put linux consoles in unicode mode.
|
||||
#
|
||||
#
|
||||
# Put linux consoles in unicode mode.
|
||||
#
|
||||
|
||||
if test "$TERM" = linux
|
||||
if string match -qir '\.UTF' -- $LANG
|
||||
if command -s unicode_start >/dev/null
|
||||
unicode_start
|
||||
end
|
||||
end
|
||||
end
|
||||
if test "$TERM" = linux
|
||||
if string match -qir '\.UTF' -- $LANG
|
||||
if command -s unicode_start >/dev/null
|
||||
unicode_start
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
function N_ --description "No-op"
|
||||
printf "%s" $argv
|
||||
printf "%s" $argv
|
||||
end
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function __fish_append -d "Internal completion function for appending string to the commandline" --argument separator
|
||||
set -e argv[1]
|
||||
set str (commandline -tc| sed -ne "s/\(.*$separator\)[^$separator]*/\1/p"|sed -e "s/--.*=//")
|
||||
printf "%s\n" "$str"$argv "$str"(printf "%s\n" $argv|sed -e "s/\(\t\|\$\)/,\1/")
|
||||
set -e argv[1]
|
||||
set str (commandline -tc| sed -ne "s/\(.*$separator\)[^$separator]*/\1/p"|sed -e "s/--.*=//")
|
||||
printf "%s\n" "$str"$argv "$str"(printf "%s\n" $argv|sed -e "s/\(\t\|\$\)/,\1/")
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -5,21 +5,21 @@ function __fish_bind_test1
|
||||
for i in (commandline -poc)
|
||||
switch $i
|
||||
case -k --k --ke --key
|
||||
set use_keys yes
|
||||
set use_keys yes
|
||||
|
||||
case "-*"
|
||||
|
||||
case "*"
|
||||
set args $args $i
|
||||
set args $args $i
|
||||
end
|
||||
end
|
||||
|
||||
switch $use_keys
|
||||
case yes
|
||||
switch (count $args)
|
||||
case 1
|
||||
return 0
|
||||
end
|
||||
switch (count $args)
|
||||
case 1
|
||||
return 0
|
||||
end
|
||||
end
|
||||
return 1
|
||||
end
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
|
||||
function __fish_bind_test2
|
||||
set -l args
|
||||
for i in (commandline -poc)
|
||||
switch $i
|
||||
case "-*"
|
||||
set -l args
|
||||
for i in (commandline -poc)
|
||||
switch $i
|
||||
case "-*"
|
||||
|
||||
case "*"
|
||||
set args $args $i
|
||||
end
|
||||
end
|
||||
case "*"
|
||||
set args $args $i
|
||||
end
|
||||
end
|
||||
|
||||
switch (count $args)
|
||||
case 2
|
||||
return 0
|
||||
end
|
||||
switch (count $args)
|
||||
case 2
|
||||
return 0
|
||||
end
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
end
|
||||
|
||||
@@ -9,8 +9,8 @@ function __fish_cancel_commandline
|
||||
#
|
||||
# Set reverse fg/bg color mode, output ^C, restore normal mode, clear to EOL (to erase any
|
||||
# autosuggestion).
|
||||
if command -v tput >/dev/null
|
||||
echo -ns (tput smso; or tput so) "^C" (tput rmso; or tput se) (tput el; or tput ce)
|
||||
if command -sq tput
|
||||
echo -ns (set_color -r) "^C" (set_color normal) (tput el; or tput ce)
|
||||
else
|
||||
echo -n "^C"
|
||||
end
|
||||
|
||||
@@ -5,10 +5,10 @@ function __fish_commandline_test
|
||||
for i in (commandline -poc)
|
||||
switch $i
|
||||
case -f --f --fu --fun --func --funct --functi --functio --function
|
||||
set is_function yes
|
||||
set is_function yes
|
||||
|
||||
case --
|
||||
break
|
||||
break
|
||||
|
||||
|
||||
end
|
||||
@@ -16,7 +16,7 @@ function __fish_commandline_test
|
||||
|
||||
switch $is_function
|
||||
case yes
|
||||
return 0
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ function __fish_complete_abook_formats --description 'Complete abook formats'
|
||||
set -l pat
|
||||
switch $argv[1]
|
||||
case in
|
||||
set pat '/output:/,$d; /input:\|^$/d'
|
||||
set pat '/output:/,$d; /input:\|^$/d'
|
||||
case out
|
||||
set pat '/input:/,/output:/d; /^$/d'
|
||||
set pat '/input:/,/output:/d; /^$/d'
|
||||
case '*'
|
||||
return 1
|
||||
return 1
|
||||
end
|
||||
abook --formats | sed -e $pat -e 's/^\s\+//'
|
||||
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
function __fish_complete_ant_targets -d "Print list of targets from build.xml and imported files"
|
||||
set -l buildfile "build.xml"
|
||||
if test -f $buildfile
|
||||
# show ant targets
|
||||
__fish_filter_ant_targets $buildfile
|
||||
set -l buildfile "build.xml"
|
||||
if test -f $buildfile
|
||||
# show ant targets
|
||||
__fish_filter_ant_targets $buildfile
|
||||
|
||||
# find files with buildfile
|
||||
set files (sed -n "s/^.*<import[^>]* file=[\"']\([^\"']*\)[\"'].*\$/\1/p" < $buildfile)
|
||||
# find files with buildfile
|
||||
set files (sed -n "s/^.*<import[^>]* file=[\"']\([^\"']*\)[\"'].*\$/\1/p" < $buildfile)
|
||||
|
||||
# iterate through files and display their targets
|
||||
for file in $files;
|
||||
__fish_filter_ant_targets $file
|
||||
end
|
||||
end
|
||||
# iterate through files and display their targets
|
||||
for file in $files
|
||||
|
||||
__fish_filter_ant_targets $file
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
function __fish_complete_atool_archive_contents --description 'List archive contents'
|
||||
set -l cmd (commandline -cop)
|
||||
set -e cmd[1]
|
||||
set -l file
|
||||
for arg in $cmd
|
||||
switch $arg
|
||||
case '-*'
|
||||
case '*'
|
||||
if test -f $arg
|
||||
set file $arg
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
if not set -q file[1]
|
||||
return
|
||||
end
|
||||
als $file -qq | sed -r 's/^\s*[0-9]+\s+[0-9-]+\s+[0-9:]+\s+(.*)$/\1/'
|
||||
set -l cmd (commandline -cop)
|
||||
set -e cmd[1]
|
||||
set -l file
|
||||
for arg in $cmd
|
||||
switch $arg
|
||||
case '-*'
|
||||
case '*'
|
||||
if test -f $arg
|
||||
set file $arg
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
if not set -q file[1]
|
||||
return
|
||||
end
|
||||
als $file -qq | sed -r 's/^\s*[0-9]+\s+[0-9-]+\s+[0-9:]+\s+(.*)$/\1/'
|
||||
|
||||
end
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
# Bittorrent commands
|
||||
|
||||
function __fish_complete_bittorrent
|
||||
complete -c $argv -l max_uploads -x --description "Maximum uploads at once"
|
||||
complete -c $argv -l keepalive_interval -x --description "Number of seconds between keepalives"
|
||||
complete -c $argv -l download_slice_size -x --description "Bytes per request"
|
||||
complete -c $argv -l request_backlog -x --description "Requests per pipe"
|
||||
complete -c $argv -l max_message_length -x --description "Maximum length prefix encoding"
|
||||
complete -c $argv -l ip --description "IP to report to the tracker" -x -a "(__fish_print_addresses)"
|
||||
complete -c $argv -l minport --description "Minimum port to listen to"
|
||||
complete -c $argv -l maxport --description "Maximum port to listen to"
|
||||
complete -c $argv -l responsefile -r --description "File for server response"
|
||||
complete -c $argv -l url -x --description "URL to get file from"
|
||||
complete -c $argv -l saveas -r --description "Local file target"
|
||||
complete -c $argv -l timeout -x --description "Time to close inactive socket"
|
||||
complete -c $argv -l timeout_check_interval -x --description "Time between checking timeouts"
|
||||
complete -c $argv -l max_slice_length -x --description "Maximum outgoing slice length"
|
||||
complete -c $argv -l max_rate_period -x --description "Maximum time to guess rate"
|
||||
complete -c $argv -l bind -x --description "IP to bind to locally" -a "(__fish_print_addresses)"
|
||||
complete -c $argv -l display_interval -x --description "Time between screen updates"
|
||||
complete -c $argv -l rerequest_interval -x --description "Time to wait between requesting more peers"
|
||||
complete -c $argv -l min_peers -x --description "Minimum number of peers to not do requesting"
|
||||
complete -c $argv -l http_timeout -x --description "Number of seconds before assuming http timeout"
|
||||
complete -c $argv -l max_initiate -x --description "Number of peers at which to stop initiating new connections"
|
||||
complete -c $argv -l max_allow_in -x --description "Maximum number of connections to allow"
|
||||
complete -c $argv -l check_hashes -x --description "Whether to check hashes on disk"
|
||||
complete -c $argv -l max_upload_rate -x --description "Maximum kB/s to upload at"
|
||||
complete -c $argv -l snub_time -x --description "Seconds to wait for data to come in before assuming choking"
|
||||
complete -c $argv -l spew -x --description "Whether to display diagnostic info"
|
||||
complete -c $argv -l rarest_first_cutoff -x --description "Number of downloads at which to switch from random to rarest first"
|
||||
complete -c $argv -l min_uploads -x --description "Number of uploads to fill out to with optimistic unchokes"
|
||||
complete -c $argv -l report_hash_failiures -x --description "Whether to inform the user that hash failures occur"
|
||||
complete -c $argv -l max_uploads -x --description "Maximum uploads at once"
|
||||
complete -c $argv -l keepalive_interval -x --description "Number of seconds between keepalives"
|
||||
complete -c $argv -l download_slice_size -x --description "Bytes per request"
|
||||
complete -c $argv -l request_backlog -x --description "Requests per pipe"
|
||||
complete -c $argv -l max_message_length -x --description "Maximum length prefix encoding"
|
||||
complete -c $argv -l ip --description "IP to report to the tracker" -x -a "(__fish_print_addresses)"
|
||||
complete -c $argv -l minport --description "Minimum port to listen to"
|
||||
complete -c $argv -l maxport --description "Maximum port to listen to"
|
||||
complete -c $argv -l responsefile -r --description "File for server response"
|
||||
complete -c $argv -l url -x --description "URL to get file from"
|
||||
complete -c $argv -l saveas -r --description "Local file target"
|
||||
complete -c $argv -l timeout -x --description "Time to close inactive socket"
|
||||
complete -c $argv -l timeout_check_interval -x --description "Time between checking timeouts"
|
||||
complete -c $argv -l max_slice_length -x --description "Maximum outgoing slice length"
|
||||
complete -c $argv -l max_rate_period -x --description "Maximum time to guess rate"
|
||||
complete -c $argv -l bind -x --description "IP to bind to locally" -a "(__fish_print_addresses)"
|
||||
complete -c $argv -l display_interval -x --description "Time between screen updates"
|
||||
complete -c $argv -l rerequest_interval -x --description "Time to wait between requesting more peers"
|
||||
complete -c $argv -l min_peers -x --description "Minimum number of peers to not do requesting"
|
||||
complete -c $argv -l http_timeout -x --description "Number of seconds before assuming http timeout"
|
||||
complete -c $argv -l max_initiate -x --description "Number of peers at which to stop initiating new connections"
|
||||
complete -c $argv -l max_allow_in -x --description "Maximum number of connections to allow"
|
||||
complete -c $argv -l check_hashes -x --description "Whether to check hashes on disk"
|
||||
complete -c $argv -l max_upload_rate -x --description "Maximum kB/s to upload at"
|
||||
complete -c $argv -l snub_time -x --description "Seconds to wait for data to come in before assuming choking"
|
||||
complete -c $argv -l spew -x --description "Whether to display diagnostic info"
|
||||
complete -c $argv -l rarest_first_cutoff -x --description "Number of downloads at which to switch from random to rarest first"
|
||||
complete -c $argv -l min_uploads -x --description "Number of uploads to fill out to with optimistic unchokes"
|
||||
complete -c $argv -l report_hash_failiures -x --description "Whether to inform the user that hash failures occur"
|
||||
end
|
||||
|
||||
@@ -1,32 +1,36 @@
|
||||
function __fish_complete_cd -d "Completions for the cd command"
|
||||
set -l token (commandline -ct)
|
||||
# Absolute path or explicitly from the current directory - no descriptions and no CDPATH
|
||||
if string match -qr '^\.?\.?/.*' -- $token
|
||||
for d in $token*/
|
||||
# Check if it's accessible - the glob only matches directories
|
||||
[ -x $d ]; and printf "%s\n" $d
|
||||
end
|
||||
else # Relative path - check $CDPATH and use that as description
|
||||
set -l cdpath $CDPATH
|
||||
[ -z "$cdpath" ]; and set cdpath "."
|
||||
# Remove the real path to "." (i.e. $PWD) from cdpath if we're in it
|
||||
# so it doesn't get printed in the descriptions
|
||||
if set -l ind (contains -i -- $PWD $cdpath)
|
||||
and contains -- "." $cdpath
|
||||
set -e cdpath[$ind]
|
||||
end
|
||||
# TODO: There's a subtlety regarding descriptions - if $cdpath[1]/foo and $cdpath[2]/foo exist, we print both
|
||||
# but want the first description to win - this currently works, but is not guaranteed
|
||||
for i in $cdpath
|
||||
set -l desc
|
||||
# Don't show description for current directory
|
||||
# and replace $HOME with "~"
|
||||
[ $i = "." ]; or set -l desc (string replace -r -- "^$HOME" "~" "$i")
|
||||
# This assumes the CDPATH component itself is cd-able
|
||||
for d in $i/$token*/
|
||||
# Remove the cdpath component again
|
||||
[ -x $d ]; and printf "%s\t%s\n" (string replace -r "^$i/" "" -- $d) $desc
|
||||
end
|
||||
end
|
||||
end
|
||||
set -l token (commandline -ct)
|
||||
# Absolute path or explicitly from the current directory - no descriptions and no CDPATH
|
||||
if string match -qr '^\.?\.?/.*' -- $token
|
||||
for d in $token*/
|
||||
# Check if it's accessible - the glob only matches directories
|
||||
[ -x $d ]
|
||||
and printf "%s\n" $d
|
||||
end
|
||||
else # Relative path - check $CDPATH and use that as description
|
||||
set -l cdpath $CDPATH
|
||||
[ -z "$cdpath" ]
|
||||
and set cdpath "."
|
||||
# Remove the real path to "." (i.e. $PWD) from cdpath if we're in it
|
||||
# so it doesn't get printed in the descriptions
|
||||
if set -l ind (contains -i -- $PWD $cdpath)
|
||||
and contains -- "." $cdpath
|
||||
set -e cdpath[$ind]
|
||||
end
|
||||
# TODO: There's a subtlety regarding descriptions - if $cdpath[1]/foo and $cdpath[2]/foo exist, we print both
|
||||
# but want the first description to win - this currently works, but is not guaranteed
|
||||
for i in $cdpath
|
||||
set -l desc
|
||||
# Don't show description for current directory
|
||||
# and replace $HOME with "~"
|
||||
[ $i = "." ]
|
||||
or set -l desc (string replace -r -- "^$HOME" "~" "$i")
|
||||
# This assumes the CDPATH component itself is cd-able
|
||||
for d in $i/$token*/
|
||||
# Remove the cdpath component again
|
||||
[ -x $d ]
|
||||
and printf "%s\t%s\n" (string replace -r "^$i/" "" -- $d) $desc
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
function __fish_complete_command --description 'Complete using all available commands'
|
||||
set -l ctoken (commandline -ct)
|
||||
switch $ctoken
|
||||
case '*=*'
|
||||
set ctoken (string split "=" -- $ctoken)
|
||||
printf '%s\n' $ctoken[1]=(complete -C$ctoken[2])
|
||||
case '*'
|
||||
complete -C$ctoken
|
||||
end
|
||||
set -l ctoken (commandline -ct)
|
||||
switch $ctoken
|
||||
case '*=*'
|
||||
set ctoken (string split "=" -- $ctoken)
|
||||
printf '%s\n' $ctoken[1]=(complete -C$ctoken[2])
|
||||
case '*'
|
||||
complete -C$ctoken
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
function __fish_complete_convert_options --description 'Complete Convert options' --argument what
|
||||
switch $what
|
||||
case format Format
|
||||
convert -list Format | sed '1,/----/d; /^$/,$d; /^$/d; s/^\s*\([a-zA-Z0-9-]\+\)\**\s*\S\+\s\+\\(\S\+\)\s\+\(.\+\S\)\s*$/\1\t\2 \3/'
|
||||
case color Color
|
||||
convert -list color | awk '{ print $1"\t"$2" "$3} ' | sed '1,/----/d'
|
||||
case family
|
||||
convert -list Font | grep family | sed 's/^\s*.\+: //' | sort -u
|
||||
case font Font
|
||||
convert -list Font | grep Font | sed 's/^\s*.\+: //' | sort -u
|
||||
case '*'
|
||||
convert -list $what
|
||||
end
|
||||
switch $what
|
||||
case format Format
|
||||
convert -list Format | sed '1,/----/d; /^$/,$d; /^$/d; s/^\s*\([a-zA-Z0-9-]\+\)\**\s*\S\+\s\+\\(\S\+\)\s\+\(.\+\S\)\s*$/\1\t\2 \3/'
|
||||
case color Color
|
||||
convert -list color | awk '{ print $1"\t"$2" "$3} ' | sed '1,/----/d'
|
||||
case family
|
||||
convert -list Font | grep family | sed 's/^\s*.\+: //' | sort -u
|
||||
case font Font
|
||||
convert -list Font | grep Font | sed 's/^\s*.\+: //' | sort -u
|
||||
case '*'
|
||||
convert -list $what
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
|
||||
function __fish_complete_directories -d "Complete using directories" --argument comp
|
||||
|
||||
set desc (_ Directory)
|
||||
set desc (_ Directory)
|
||||
|
||||
if test (count $argv) -gt 1
|
||||
set desc $argv[2]
|
||||
end
|
||||
if test (count $argv) -gt 1
|
||||
set desc $argv[2]
|
||||
end
|
||||
|
||||
eval "set dirs "$comp"*/"
|
||||
eval "set dirs "$comp"*/"
|
||||
|
||||
if test $dirs[1]
|
||||
printf "%s\t$desc\n" $dirs
|
||||
end
|
||||
if test $dirs[1]
|
||||
printf "%s\t$desc\n" $dirs
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user