mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Merge branch 'master' into issue_4848
This commit is contained in:
commit
7c5297e785
247 changed files with 2896 additions and 1838 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -21,6 +21,7 @@
|
|||
*.o
|
||||
*.obj
|
||||
*.orig
|
||||
!tests/*.out
|
||||
*.out
|
||||
*.pch
|
||||
*.slo
|
||||
|
|
28
CHANGELOG.md
28
CHANGELOG.md
|
@ -4,21 +4,25 @@ This section is for changes merged to the `major` branch that are not also merge
|
|||
## Deprecations
|
||||
- The `IFS` variable is deprecated and will be removed in fish 4.0 (#4156).
|
||||
- The `function --on-process-exit` event will be removed in future (#4700). Use the `fish_exit` event instead.
|
||||
- `$_` is deprecated and will removed in the future (#813). Use `status current-command` in a subshell instead.
|
||||
- `^` as a redirection deprecated and will be removed in the future. (#4394). Use `2>` to redirect stderr. This is controlled by the `stderr-nocaret` feature flag.
|
||||
- `?` as a glob is deprecated and will be removed in the future. (#4520). This is controlled by the `qmark-noglob` feature flag.
|
||||
|
||||
## Notable non-backward compatible changes
|
||||
- `.` command no longer exists -- use `source` (#4294).
|
||||
- `read` now uses `-s` as short for `--silent` (à la `bash`); `--shell`'s abbreviation (formerly `-s`) is now `-S` instead (#4490).
|
||||
- `set x[1] x[2] a b` is no longer valid syntax (#4236).
|
||||
- `for` loop control variables are no longer local to the `for` block (#1935).
|
||||
- A literal `{}` now expands to itself, rather than nothing. This makes working with `find -exec` easier. (#1109, #4632)
|
||||
- Successive commas in brace expansions are handled in less surprising manner (`{,,,}` expands to four empty strings rather than an empty string, a comma and an empty string again). (#3002, #4632).
|
||||
- `%` is no longer used for process and job expansion. `$pid` and `$last_pid` have taken the place of `%self` and `%last` respectively. (#4230, #1202)
|
||||
- `%` is no longer used for process and job expansion. `$fish_pid` and `$last_pid` have taken the place of `%self` and `%last` respectively. (#4230, #1202)
|
||||
- The new `math` builtin (see below) does not support logical expressions; `test` should be used instead (#4777).
|
||||
|
||||
## Notable fixes and improvements
|
||||
- A new feature flags mechanism is added for staging deprecations and breaking changes. (#4940)
|
||||
- `wait` builtin is added for waiting on processes (#4498).
|
||||
- `read` has a new `--delimiter` option as a better alternative to the `IFS` variable (#4256).
|
||||
- `read` writes directly to stdout if called without arguments (#4407)
|
||||
- `read` can now read one or more individual lines from the input stream without consuming the input in its entirety via `read -L/--line`. Refer to the `read` documentation for more info.
|
||||
- `set` has a new `--append` and `--prepend` option (#1326).
|
||||
- `set` has a new `--show` option to show lots of information about variables (#4265).
|
||||
- `complete` now has a `-k` and `--keep-order` option to keep the order of the `OPTION_ARGUMENTS` (#361).
|
||||
|
@ -31,6 +35,7 @@ This section is for changes merged to the `major` branch that are not also merge
|
|||
- `bind` has a new `--silent` option to ignore bind requests for named keys not available under the current `$TERMINAL` (#4188, #4431)
|
||||
- Globs are faster (#4579)
|
||||
- `string` reads from stdin faster (#4610)
|
||||
- `string split` supports `-n/--no-empty` to exclude empty strings from the result (#4779)
|
||||
- `cd` tab completions no longer descend into the deepest unambiguous path (#4649)
|
||||
- Setting `$PATH` no longer warns on non-existent directories, allowing for a single $PATH to be shared across machines (e.g. via dotfiles).
|
||||
- `funced` now has a `-s` and `--save` option to automatically save the edited function after successfully editing (#4668).
|
||||
|
@ -48,20 +53,31 @@ This section is for changes merged to the `major` branch that are not also merge
|
|||
- fish now supports `&&`, `||`, and `!` (#4620).
|
||||
- The machine hostname, where available, is now exposed as `$hostname` which is now a reserved variable. This drops the dependency on the `hostname` executable (#4422).
|
||||
- `functions --handlers` can be used to show event handlers (#4694).
|
||||
- Variables set in `if` and `while` conditions are available outside the block (#4820).
|
||||
- The universal variables file no longer contains the MAC address. It is now at the fixed location `.config/fish/fish_universal_variables` (#1912).
|
||||
- `alias` now has a `-s` and `--save` option to save the function generated by the alias using `funcsave` (#4878).
|
||||
|
||||
## Other significant changes
|
||||
- Command substitution output is now limited to 10 MB by default (#3822).
|
||||
- Added completions for
|
||||
- `j` (autojump #4344)
|
||||
- `bd` (#4472)
|
||||
- `bower`<sup>∗</sup>
|
||||
- `configure`
|
||||
- `j` (autojump #4344)
|
||||
- `jhipster` (#4472)
|
||||
- `ngrok` (#4642)
|
||||
- `port`
|
||||
- `optipng`
|
||||
- `port`
|
||||
- Improved completions for
|
||||
- `git` (#4395, #4396, #4592)
|
||||
- `brew`
|
||||
- `diskutil`
|
||||
- `yarn`
|
||||
- `git` (#4395, #4396, #4592)
|
||||
- `npm`<sup>†</sup>
|
||||
- `ssh` (#4344)
|
||||
- `yarn`<sup>∗</sup><sup>†</sup>
|
||||
|
||||
∗ _`jq` must be installed to complete the list of currently installed `bower` or `yarn` packages_. <br/>
|
||||
† _to autocomplete the list of packages available for installation with `npm` or `yarn`, `all-the-package-names` must be installed (typically: `sudo npm install -g all-the-package-names`)._
|
||||
|
||||
--
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@ SET(FISH_SRCS
|
|||
src/postfork.cpp src/proc.cpp src/reader.cpp src/sanity.cpp src/screen.cpp
|
||||
src/signal.cpp src/tnode.cpp src/tokenizer.cpp src/utf8.cpp src/util.cpp
|
||||
src/wcstringutil.cpp src/wgetopt.cpp src/wildcard.cpp src/wutil.cpp
|
||||
src/future_feature_flags.cpp
|
||||
)
|
||||
|
||||
# Header files are just globbed.
|
||||
|
@ -90,6 +91,13 @@ SET_SOURCE_FILES_PROPERTIES(src/fish_version.cpp
|
|||
PROPERTIES OBJECT_DEPENDS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${FBVF})
|
||||
|
||||
OPTION(INTERNAL_WCWIDTH "use fallback wcwidth" ON)
|
||||
IF(INTERNAL_WCWIDTH)
|
||||
add_definitions(-DHAVE_BROKEN_WCWIDTH=1)
|
||||
ELSE()
|
||||
add_definitions(-DHAVE_BROKEN_WCWIDTH=0)
|
||||
ENDIF()
|
||||
|
||||
# Set up PCRE2
|
||||
INCLUDE(cmake/PCRE2.cmake)
|
||||
|
||||
|
|
|
@ -118,7 +118,8 @@ FISH_OBJS := obj/autoload.o obj/builtin.o obj/builtin_bg.o obj/builtin_bind.o ob
|
|||
obj/parse_productions.o obj/parse_tree.o obj/parse_util.o obj/parser.o \
|
||||
obj/parser_keywords.o obj/path.o obj/postfork.o obj/proc.o obj/reader.o \
|
||||
obj/sanity.o obj/screen.o obj/signal.o obj/tinyexpr.o obj/tokenizer.o obj/tnode.o obj/utf8.o \
|
||||
obj/util.o obj/wcstringutil.o obj/wgetopt.o obj/wildcard.o obj/wutil.o
|
||||
obj/util.o obj/wcstringutil.o obj/wgetopt.o obj/wildcard.o obj/wutil.o \
|
||||
obj/future_feature_flags.o
|
||||
|
||||
FISH_INDENT_OBJS := obj/fish_indent.o obj/print_help.o $(FISH_OBJS)
|
||||
|
||||
|
@ -467,7 +468,7 @@ doc.h: $(HDR_FILES)
|
|||
#
|
||||
%.gmo:
|
||||
@echo " msgfmt $(em)$@$(sgr0)"
|
||||
$v msgfmt --use-fuzzy -o $@ $*.po
|
||||
$v msgfmt -o $@ $*.po
|
||||
|
||||
#
|
||||
# Update existing po file or copy messages.pot
|
||||
|
|
|
@ -13,6 +13,10 @@ fish generally works like other shells, like bash or zsh. A few important differ
|
|||
|
||||
Detailed user documentation is available by running `help` within fish, and also at <https://fishshell.com/docs/current/index.html>
|
||||
|
||||
You can quickly play with fish right in your browser by clicking the button below:
|
||||
|
||||
[![Try in browser](https://cdn.rawgit.com/rootnroll/library/assets/try.svg)](https://rootnroll.com/d/fish-shell/)
|
||||
|
||||
## Getting fish
|
||||
|
||||
### macOS
|
||||
|
|
|
@ -12,5 +12,6 @@ for i in $@; do
|
|||
NAME=`basename $NAME .hdr.in`
|
||||
env sed <$i >>toc.txt -n \
|
||||
-e 's,.*\\page *\([^ ]*\) *\(.*\)$,- <a href="'$NAME'.html" id="toc-'$NAME'">\2</a>,p' \
|
||||
-e 's,.*\\section *\([^ ]*\) *\([^-]*\)\(.*\)$, - <a href="'$NAME'.html#\1">\2</a>,p'
|
||||
-e 's,.*\\section *\([^ ]*\) *\(.*\) - .*$, - <a href="'$NAME'.html#\1">\2</a>,p' \
|
||||
-e 's,.*\\section *\([^ ]*\) *\(.*\)$, - <a href="'$NAME'.html#\1">\2</a>,p'
|
||||
done
|
||||
|
|
|
@ -20,8 +20,8 @@ set committers_from_tag (mktemp)
|
|||
# Unicode collation tables mean that this is fraught with danger; for example, the
|
||||
# "“" character will not case-fold in UTF-8 locales. sort suggests using the C locale!
|
||||
|
||||
git log "$TAG" --format="%aN" --reverse | sort | uniq > $committers_to_tag
|
||||
git log "$TAG".. --format="%aN" --reverse | sort | uniq > $committers_from_tag
|
||||
git log "$TAG" --format="%aN" --reverse | sort -u > $committers_to_tag
|
||||
git log "$TAG".. --format="%aN" --reverse | sort -u > $committers_from_tag
|
||||
|
||||
echo New committers:
|
||||
echo (comm -13 $committers_to_tag $committers_from_tag)','
|
||||
|
|
|
@ -68,8 +68,10 @@ IF(BUILD_DOCS)
|
|||
DEPENDS ${FUNCTIONS_DIR_FILES} ${COMPLETIONS_DIR_FILES}
|
||||
doc_src/commands.hdr ${CMAKE_CURRENT_SOURCE_DIR}/lexicon_filter.in
|
||||
share/functions/__fish_config_interactive.fish
|
||||
build_tools/build_lexicon_filter.sh)
|
||||
build_tools/build_lexicon_filter.sh command_list_toc.txt)
|
||||
|
||||
# Other targets should depend on this target, otherwise the lexicon
|
||||
# filter can be built twice.
|
||||
ADD_CUSTOM_TARGET(build_lexicon_filter DEPENDS lexicon_filter)
|
||||
|
||||
#
|
||||
|
@ -118,7 +120,7 @@ IF(BUILD_DOCS)
|
|||
# @echo " doxygen $(em)user_doc$(sgr0)"
|
||||
# $v (cat Doxyfile.user; echo INPUT_FILTER=./lexicon_filter; echo PROJECT_NUMBER=$(FISH_BUILD_VERSION) | $(SED) "s/-.*//") | doxygen - && touch user_doc
|
||||
# $v rm -f $(wildcard $(addprefix ./user_doc/html/,arrow*.png bc_s.png bdwn.png closed.png doc.png folder*.png ftv2*.png nav*.png open.png splitbar.png sync_*.png tab*.* doxygen.* dynsections.js jquery.js pages.html))
|
||||
ADD_CUSTOM_TARGET(doc
|
||||
ADD_CUSTOM_TARGET(doc ALL
|
||||
COMMAND env `cat ${FBVF}`
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build_tools/build_user_doc.sh
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.user ./lexicon_filter
|
||||
|
@ -127,11 +129,22 @@ IF(BUILD_DOCS)
|
|||
ADD_CUSTOM_COMMAND(OUTPUT share/man/
|
||||
COMMAND env `cat ${FBVF} | tr -d '\"' `
|
||||
INPUT_FILTER=lexicon_filter ${CMAKE_CURRENT_SOURCE_DIR}/build_tools/build_documentation.sh ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.help doc_src ./share
|
||||
DEPENDS ${CFBVF} ${HELP_SRC} ${CMAKE_CURRENT_BINARY_DIR}/lexicon_filter)
|
||||
DEPENDS ${CFBVF} ${HELP_SRC} build_lexicon_filter)
|
||||
|
||||
ADD_CUSTOM_TARGET(BUILD_MANUALS ALL DEPENDS share/man/)
|
||||
|
||||
# Group docs targets into a DocsTargets folder
|
||||
SET_PROPERTY(TARGET doc BUILD_MANUALS build_lexicon_filter
|
||||
PROPERTY FOLDER cmake/DocTargets)
|
||||
ELSEIF(HAVE_PREBUILT_DOCS)
|
||||
IF(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
||||
# Out of tree build - link the prebuilt documentation to the build tree
|
||||
ADD_CUSTOM_TARGET(link_doc ALL)
|
||||
ADD_CUSTOM_COMMAND(TARGET link_doc
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/share/man ${CMAKE_CURRENT_BINARY_DIR}/share/man
|
||||
POST_BUILD)
|
||||
ADD_CUSTOM_COMMAND(TARGET link_doc
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/user_doc ${CMAKE_CURRENT_BINARY_DIR}/user_doc
|
||||
POST_BUILD)
|
||||
ENDIF()
|
||||
ENDIF(BUILD_DOCS)
|
||||
|
|
|
@ -25,30 +25,29 @@ SET(configure_input
|
|||
DO NOT MANUALLY EDIT THIS FILE!")
|
||||
|
||||
SET(extra_completionsdir
|
||||
${rel_datadir}/fish/vendor_completions.d
|
||||
${datadir}/fish/vendor_completions.d
|
||||
CACHE STRING "Path for extra completions")
|
||||
|
||||
SET(extra_functionsdir
|
||||
${rel_datadir}/fish/vendor_functions.d
|
||||
${datadir}/fish/vendor_functions.d
|
||||
CACHE STRING "Path for extra completions")
|
||||
|
||||
SET(extra_confdir
|
||||
${rel_datadir}/fish/vendor_conf.d
|
||||
${datadir}/fish/vendor_conf.d
|
||||
CACHE STRING "Path for extra configuration")
|
||||
|
||||
# These are the man pages that go in system manpath.
|
||||
# These are the man pages that go in system manpath; all manpages go in the fish-specific manpath.
|
||||
SET(MANUALS ${CMAKE_CURRENT_BINARY_DIR}/share/man/man1/fish.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/share/man/man1/fish_indent.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/share/man/man1/fish_key_reader.1)
|
||||
|
||||
# These are the manpages that go in fish-specific manpath.
|
||||
FILE(GLOB HELP_MANPAGES share/man/man1/*.1)
|
||||
|
||||
# Determine which man pages we don't want to install.
|
||||
# Determine which man page 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.
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
LIST(REMOVE_ITEM HELP_MANPAGES share/man/man1/open.1)
|
||||
SET(CONDEMNED_PAGE "open.1")
|
||||
ELSE()
|
||||
SET(CONDEMNED_PAGE "none")
|
||||
ENDIF()
|
||||
|
||||
# Define a function to help us create directories.
|
||||
|
@ -60,6 +59,14 @@ FUNCTION(FISH_CREATE_DIRS)
|
|||
ENDFOREACH(dir)
|
||||
ENDFUNCTION(FISH_CREATE_DIRS)
|
||||
|
||||
FUNCTION(FISH_TRY_REMOVE)
|
||||
FOREACH(dir ${ARGV})
|
||||
IF(EXISTS ${CMAKE_INSTALL_PREFIX}/${dir})
|
||||
FILE(REMOVE_RECURSE ${CMAKE_INSTALL_PREFIX}/${dir})
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
ENDFUNCTION(FISH_TRY_REMOVE)
|
||||
|
||||
FUNCTION(FISH_TRY_CREATE_DIRS)
|
||||
FOREACH(dir ${ARGV})
|
||||
IF(NOT IS_ABSOLUTE ${dir})
|
||||
|
@ -91,16 +98,8 @@ INSTALL(TARGETS ${PROGRAMS}
|
|||
FISH_CREATE_DIRS(${sysconfdir}/fish/conf.d)
|
||||
INSTALL(FILES etc/config.fish DESTINATION ${sysconfdir}/fish/)
|
||||
|
||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish
|
||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/completions
|
||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/functions
|
||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/groff
|
||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/man/man1
|
||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools
|
||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools/web_config
|
||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools/web_config/js
|
||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools/web_config/partials
|
||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools/web_config/sample_prompts
|
||||
FISH_TRY_REMOVE(${rel_datadir}/fish)
|
||||
|
||||
FISH_CREATE_DIRS(${rel_datadir}/fish ${rel_datadir}/fish/completions
|
||||
${rel_datadir}/fish/functions ${rel_datadir}/fish/groff
|
||||
${rel_datadir}/fish/man/man1 ${rel_datadir}/fish/tools
|
||||
|
@ -132,7 +131,7 @@ CONFIGURE_FILE(fish.pc.in fish.pc.noversion)
|
|||
|
||||
ADD_CUSTOM_COMMAND(OUTPUT fish.pc
|
||||
COMMAND sed '/Version/d' fish.pc.noversion > fish.pc
|
||||
COMMAND echo -n "Version: " >> fish.pc
|
||||
COMMAND printf "Version: " >> fish.pc
|
||||
COMMAND sed 's/FISH_BUILD_VERSION=//\;s/\"//g' ${FBVF} >> fish.pc
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${FBVF} ${CMAKE_CURRENT_BINARY_DIR}/fish.pc.noversion)
|
||||
|
@ -160,10 +159,13 @@ INSTALL(DIRECTORY share/groff
|
|||
DESTINATION ${rel_datadir}/fish)
|
||||
|
||||
# $v test -z "$(wildcard share/man/man1/*.1)" || $(INSTALL) -m 644 $(filter-out $(addprefix share/man/man1/, $(CONDEMNED_PAGES)), $(wildcard share/man/man1/*.1)) $(DESTDIR)$(datadir)/fish/man/man1/
|
||||
# CONDEMNED_PAGES is managed by the LIST() function after the glob
|
||||
# CONDEMNED_PAGE is managed by the conditional above
|
||||
# Building the man pages is optional: if doxygen isn't installed, they're not built
|
||||
INSTALL(FILES ${HELP_MANPAGES}
|
||||
DESTINATION ${rel_datadir}/fish/man/man1)
|
||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/share/man/man1/
|
||||
DESTINATION ${rel_datadir}/fish/man/man1
|
||||
FILES_MATCHING
|
||||
PATTERN "*.1"
|
||||
PATTERN ${CONDEMNED_PAGE} EXCLUDE)
|
||||
|
||||
# @echo "Installing helper tools";
|
||||
# $v $(INSTALL) -m 755 share/tools/*.py $(DESTDIR)$(datadir)/fish/tools/
|
||||
|
@ -204,7 +206,7 @@ INSTALL(FILES ${MANUALS} DESTINATION ${mandir}/man1/ OPTIONAL)
|
|||
# fi; \
|
||||
# done;
|
||||
# Building the manual is optional
|
||||
INSTALL(DIRECTORY user_doc/html/ # Trailing slash is important!
|
||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/user_doc/html/ # Trailing slash is important!
|
||||
DESTINATION ${docdir} OPTIONAL)
|
||||
INSTALL(FILES CHANGELOG.md DESTINATION ${docdir})
|
||||
|
||||
|
|
15
configure.ac
15
configure.ac
|
@ -25,6 +25,7 @@ AC_SUBST(HAVE_DOXYGEN)
|
|||
AC_SUBST(LDFLAGS_FISH)
|
||||
AC_SUBST(WCHAR_T_BITS)
|
||||
AC_SUBST(EXTRA_PCRE2)
|
||||
AC_SUBST(HAVE_BROKEN_WCWIDTH)
|
||||
|
||||
#
|
||||
# If needed, run autoconf to regenerate the configure file
|
||||
|
@ -599,6 +600,20 @@ AC_ARG_WITH(
|
|||
[included_pcre2=auto]
|
||||
)
|
||||
|
||||
HAVE_BROKEN_WCWIDTH=
|
||||
AC_ARG_ENABLE(
|
||||
[wcwidth],
|
||||
AS_HELP_STRING(
|
||||
[--disable-internal-wcwidth],
|
||||
[use system wcwidth instead of the bundled version]
|
||||
))
|
||||
|
||||
if test "x$enable_wcwidth" != "xno"; then
|
||||
AC_DEFINE([HAVE_BROKEN_WCWIDTH], [1], [banana])
|
||||
else
|
||||
AC_DEFINE([HAVE_BROKEN_WCWIDTH], [0], [banana])
|
||||
fi
|
||||
|
||||
if test "x$included_pcre2" != "xyes"; then
|
||||
|
||||
# test for pcre2-config
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
\subsection alias-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
alias
|
||||
alias NAME DEFINITION
|
||||
alias NAME=DEFINITION
|
||||
alias [OPTIONS] NAME DEFINITION
|
||||
alias [OPTIONS] NAME=DEFINITION
|
||||
\endfish
|
||||
|
||||
\subsection alias-description Description
|
||||
|
@ -18,6 +18,12 @@ alias NAME=DEFINITION
|
|||
|
||||
You cannot create an alias to a function with the same name. Note that spaces need to be escaped in the call to `alias` just like at the command line, _even inside quoted parts_.
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-h` or `--help` displays help about using this command.
|
||||
|
||||
- `-s` or `--save` Automatically save the function created by the alias into your fish configuration directory using <a href='#funcsave'>funcsave</a>.
|
||||
|
||||
\subsection alias-example Example
|
||||
|
||||
The following code will create `rmi`, which runs `rm` with additional arguments on every invocation.
|
||||
|
|
|
@ -15,6 +15,8 @@ Each option that is seen in the ARG list will result in a var name of the form `
|
|||
|
||||
For example `_flag_h` and `_flag_help` if `-h` or `--help` is seen. The var will be set with local scope (i.e., as if the script had done `set -l _flag_X`). If the flag is a boolean (that is, does not have an associated value) the values are the short and long flags seen. If the option is not a boolean flag the values will be zero or more values corresponding to the values collected when the ARG list is processed. If the flag was not seen the flag var will not be set.
|
||||
|
||||
\subsection argparse-options Options
|
||||
|
||||
The following `argparse` options are available. They must appear before all OPTION_SPECs:
|
||||
|
||||
- `-n` or `--name` is the command name to insert into any error messages. If you don't provide this value `argparse` will be used.
|
||||
|
@ -40,7 +42,7 @@ or return
|
|||
|
||||
If `$argv` is empty then there is nothing to parse and `argparse` returns zero to indicate success. If `$argv` is not empty then it is checked for flags `-h`, `--help`, `-n` and `--name`. If they are found they are removed from the arguments and local variables (more on this <a href="argparse-local-variables">below</a>) are set so the script can determine which options were seen. Assuming `$argv` doesn't have any errors, such as a missing mandatory value for an option, then `argparse` exits with status zero. Otherwise it writes appropriate error messages to stderr and exits with a status of one.
|
||||
|
||||
Not including a `--` argument is an error condition. You do not have to include any arguments after the `--` but you must include the `--`. For example, this is acceptable:
|
||||
The `--` argument is required. You do not have to include any arguments after the `--` but you must include the `--`. For example, this is acceptable:
|
||||
|
||||
\fish
|
||||
set -l argv
|
||||
|
@ -72,7 +74,7 @@ Each option specification is a string composed of
|
|||
|
||||
- `=?` it takes an optional value and only the last instance of the flag is saved, else
|
||||
|
||||
- `=+` if it requires a value each instance of the flag is saved.
|
||||
- `=+` if it requires a value and each instance of the flag is saved.
|
||||
|
||||
- Optionally a `!` followed by fish script to validate the value. Typically this will be a function to run. If the return status is zero the value for the flag is valid. If non-zero the value is invalid. Any error messages should be written to stdout (not stderr). See the section on <a href="#arparse-validation">Flag Value Validation</a> for more information.
|
||||
|
||||
|
@ -114,7 +116,7 @@ Some OPTION_SPEC examples:
|
|||
|
||||
- `x=`, `x=?`, and `x=+` are similar to the n/name examples above but there is no long flag alternative to the short flag `-x`.
|
||||
|
||||
- `x-` is not valid since there is no long flag name and therefore the short flag, `-x`, has to be usable. This is obviously true whether or not the specification also includes one of `:`, `::`, `+`.
|
||||
- `x-` is not valid since there is no long flag name and therefore the short flag, `-x`, has to be usable.
|
||||
|
||||
- `#-max` means that flags matching the regex "^--?\d+$" are valid. When seen they are assigned to the variable `_flag_max`. This allows any valid positive or negative integer to be specified by prefixing it with a single "-". Many commands support this idiom. For example `head -3 /a/file` to emit only the first three lines of /a/file.
|
||||
|
||||
|
@ -122,7 +124,7 @@ Some OPTION_SPEC examples:
|
|||
|
||||
After parsing the arguments the `argv` var is set with local scope to any values not already consumed during flag processing. If there are not unbound values the var is set but `count $argv` will be zero.
|
||||
|
||||
If an error occurs during argparse processing it will exit with a non-zero status and appropriate error messages are written to stderr.
|
||||
If an error occurs during argparse processing it will exit with a non-zero status and print error messages to stderr.
|
||||
|
||||
\subsection argparse-notes Notes
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@ bg [PID...]
|
|||
|
||||
`bg` sends <a href="index.html#syntax-job-control">jobs</a> to the background, resuming them if they are stopped. A background job is executed simultaneously with fish, and does not have access to the keyboard. If no job is specified, the last job to be used is put in the background. If PID is specified, the jobs with the specified process group IDs are put in the background.
|
||||
|
||||
The PID of the desired process is usually found by using <a href="index.html#expand-process">process expansion</a>.
|
||||
|
||||
When at least one of the arguments isn't a valid job specifier (i.e. PID),
|
||||
`bg` will print an error without backgrounding anything.
|
||||
|
||||
|
@ -18,8 +16,6 @@ When all arguments are valid job specifiers, bg will background all matching job
|
|||
|
||||
\subsection bg-example Example
|
||||
|
||||
`bg %1` will put the job with job ID 1 in the background.
|
||||
|
||||
`bg 123 456 789` will background 123, 456 and 789.
|
||||
|
||||
If only 123 and 789 exist, it will still background them and print an error about 456.
|
||||
|
|
|
@ -54,6 +54,7 @@ The following parameters are available:
|
|||
|
||||
- `-a` or `--all` See `--erase` and `--key-names`
|
||||
|
||||
\subsection bind-functions Special input functions
|
||||
The following special input functions are available:
|
||||
|
||||
- `accept-autosuggestion`, accept the current autosuggestion completely
|
||||
|
|
|
@ -35,7 +35,9 @@ The following options change what part of the commandline is printed or updated:
|
|||
|
||||
- `-p` or `--current-process` select the current process
|
||||
|
||||
- `-t` or `--current-token` select the current token.
|
||||
- `-s` or `--current-selection` selects the current selection
|
||||
|
||||
- `-t` or `--current-token` select the current token
|
||||
|
||||
The following options change the way `commandline` prints the current commandline buffer:
|
||||
|
||||
|
|
|
@ -9,9 +9,7 @@ fg [PID]
|
|||
|
||||
`fg` brings the specified <a href="index.html#syntax-job-control">job</a> to the foreground, resuming it if it is stopped. While a foreground job is executed, fish is suspended. If no job is specified, the last job to be used is put in the foreground. If PID is specified, the job with the specified group ID is put in the foreground.
|
||||
|
||||
The PID of the desired process is usually found by using <a href="index.html#expand-process">process expansion</a>. Fish is capable of expanding far more than just the numeric PID, including referencing itself and finding PIDs by name.
|
||||
|
||||
|
||||
\subsection fg-example Example
|
||||
|
||||
`fg %1` will put the job with job ID 1 in the foreground.
|
||||
`fg` will put the last job in the foreground.
|
||||
|
|
|
@ -25,7 +25,10 @@ The following options are available:
|
|||
|
||||
- `-j PGID` or `--on-job-exit PGID` tells fish to run this function when the job with group ID PGID exits. Instead of PGID, the string 'caller' can be specified. This is only legal when in a command substitution, and will result in the handler being triggered by the exit of the job which created this command substitution.
|
||||
|
||||
- `-p PID` or `--on-process-exit PID` tells fish to run this function when the fish child process with process ID PID exits.
|
||||
- `-p PID` or `--on-process-exit PID` tells fish to run this function when the fish child process
|
||||
with process ID PID exits. Instead of a PID, for backward compatibility,
|
||||
"`%self`" can be specified as an alias for `$fish_pid`, and the function will be run when the
|
||||
current fish instance exits.
|
||||
|
||||
- `-s` or `--on-signal SIGSPEC` tells fish to run this function when the signal SIGSPEC is delivered. SIGSPEC can be a signal number, or the signal name, such as SIGHUP (or just HUP).
|
||||
|
||||
|
|
|
@ -94,7 +94,6 @@ Some characters can not be written directly on the command line. For these chara
|
|||
- '<code>\\*</code>' escapes the star character
|
||||
- '<code>\\?</code>' escapes the question mark character
|
||||
- '<code>\\~</code>' escapes the tilde character
|
||||
- '<code>\\%</code>' escapes the percent character
|
||||
- '<code>\\#</code>' escapes the hash character
|
||||
- '<code>\\(</code>' escapes the left parenthesis character
|
||||
- '<code>\\)</code>' escapes the right parenthesis character
|
||||
|
@ -143,11 +142,11 @@ An example of a file redirection is `echo hello > output.txt`, which directs the
|
|||
|
||||
- To read standard input from a file, write `<SOURCE_FILE`
|
||||
- To write standard output to a file, write `>DESTINATION`
|
||||
- To write standard error to a file, write `^DESTINATION`
|
||||
- To write standard error to a file, write `2>DESTINATION`
|
||||
- To append standard output to a file, write `>>DESTINATION_FILE`
|
||||
- To append standard error to a file, write `^^DESTINATION_FILE`
|
||||
- To append standard error to a file, write `2>>DESTINATION_FILE`
|
||||
|
||||
- To not overwrite ("clobber") an existing file, write '>?DESTINATION' or '^?DESTINATION'
|
||||
- To not overwrite ("clobber") an existing file, write '>?DESTINATION' or '2>?DESTINATION'
|
||||
|
||||
`DESTINATION` can be one of the following:
|
||||
|
||||
|
@ -159,7 +158,7 @@ An example of a file redirection is `echo hello > output.txt`, which directs the
|
|||
|
||||
Example:
|
||||
|
||||
To redirect both standard output and standard error to the file 'all_output.txt', you can write `echo Hello > all_output.txt ^&1`.
|
||||
To redirect both standard output and standard error to the file 'all_output.txt', you can write `echo Hello > all_output.txt 2>&1`.
|
||||
|
||||
Any file descriptor can be redirected in an arbitrary way by prefixing the redirection with the file descriptor.
|
||||
|
||||
|
@ -167,7 +166,7 @@ Any file descriptor can be redirected in an arbitrary way by prefixing the redir
|
|||
- To redirect output of FD N, write `N>DESTINATION`
|
||||
- To append the output of FD N to a file, write `N>>DESTINATION_FILE`
|
||||
|
||||
Example: `echo Hello 2>output.stderr` and `echo Hello ^output.stderr` are equivalent, and write the standard error (file descriptor 2) of the target program to `output.stderr`.
|
||||
Example: `echo Hello 2>output.stderr` and `echo Hello 2>output.stderr` are equivalent, and write the standard error (file descriptor 2) of the target program to `output.stderr`.
|
||||
|
||||
\subsection piping Piping
|
||||
|
||||
|
@ -333,8 +332,6 @@ These are the general purpose tab completions that `fish` provides:
|
|||
|
||||
- Completion of filenames, even on strings with wildcards such as '`*`', '`**`' and '`?`'.
|
||||
|
||||
- Completion of job ID, job name and process names for <a href="#expand-process">process expansion</a>.
|
||||
|
||||
`fish` provides a large number of program specific completions. Most of these completions are simple options like the `-l` option for `ls`, but some are more advanced. The latter include:
|
||||
|
||||
- The programs `man` and `whatis` show all installed manual pages as completions.
|
||||
|
@ -673,31 +670,6 @@ Note that variables can be used as indices for expansion of variables, but not c
|
|||
The `~` (tilde) character at the beginning of a parameter, followed by a username, is expanded into the home directory of the specified user. A lone `~`, or a `~` followed by a slash, is expanded into the home directory of the process owner.
|
||||
|
||||
|
||||
\subsection expand-process Process expansion
|
||||
|
||||
The `%` (percent) character at the beginning of a parameter followed by a string is expanded into a process ID (PID). The following expansions are performed:
|
||||
|
||||
- If the string is the entire word `self`, the shell's PID is the result.
|
||||
|
||||
- Otherwise, if the string is the entire word `last`, the last job's PID is the result.
|
||||
|
||||
- Otherwise, if the string is the ID of a job, the result is the process group ID of the job.
|
||||
|
||||
- Otherwise, if any child processes match the specified string, their PIDs are the result of the expansion.
|
||||
|
||||
- Otherwise, if any processes owned by the user match the specified string, their PIDs are the result of the expansion.
|
||||
|
||||
- If none of these matches apply, an error is produced.
|
||||
|
||||
This form of expansion is useful for commands like kill and fg, which take process IDs as arguments.
|
||||
|
||||
Example:
|
||||
|
||||
`fg %%ema` will search for a process whose command line begins with the letters 'ema', such as emacs, and if found, put it in the foreground.
|
||||
|
||||
`kill -s SIGINT %3` will send the SIGINT signal to the job with job ID 3.
|
||||
|
||||
|
||||
\subsection combine Combining different expansions
|
||||
|
||||
All of the above expansions can be combined. If several expansions result in more than one parameter, all possible combinations are created.
|
||||
|
@ -1270,11 +1242,34 @@ end
|
|||
If you want to run a set of commands when `fish` exits, use an <a href='#event'>event handler</a> that is triggered by the exit of the shell:
|
||||
|
||||
\fish
|
||||
function on_exit --on-process %self
|
||||
function on_exit --on-process $fish_pid
|
||||
echo fish is now exiting
|
||||
end
|
||||
\endfish
|
||||
|
||||
\section featureflags Future feature flags
|
||||
|
||||
Feature flags are how fish stages changes that might break scripts. Breaking changes are introduced as opt-in, in a few releases they become opt-out, and eventually the old behavior is removed.
|
||||
|
||||
You can see the current list of features via `status features`:
|
||||
|
||||
\fish
|
||||
> status features
|
||||
stderr-nocaret on 3.0 ^ no longer redirects stderr
|
||||
qmark-noglob off 3.0 ? no longer globs
|
||||
\endfish
|
||||
|
||||
There are two breaking changes in fish 3.0: caret `^` no longer redirects stderr, and question mark `?` is no longer a glob. These changes are off by default. They can be enabled on a per session basis:
|
||||
|
||||
\fish
|
||||
> fish --features qmark-noglob,stderr-nocaret
|
||||
\endfish
|
||||
|
||||
or opted into globally for a user:
|
||||
|
||||
\fish
|
||||
> set -U fish_features stderr-nocaret qmark-noglob
|
||||
\endfish
|
||||
|
||||
\section other Other features
|
||||
|
||||
|
@ -1297,14 +1292,14 @@ To customize the syntax highlighting, you can set the environment variables list
|
|||
|
||||
\subsection title Programmable title
|
||||
|
||||
When using most virtual terminals, it is possible to set the message displayed in the titlebar of the terminal window. This can be done automatically in fish by defining the `fish_title` function. The `fish_title` function is executed before and after a new command is executed or put into the foreground and the output is used as a titlebar message. The $_ environment variable will always contain the name of the job to be put into the foreground (Or 'fish' if control is returning to the shell) when the `fish_prompt` function is called. The first argument to fish_title will contain the most recently executed foreground command as a string, starting with fish 2.2.
|
||||
When using most virtual terminals, it is possible to set the message displayed in the titlebar of the terminal window. This can be done automatically in fish by defining the `fish_title` function. The `fish_title` function is executed before and after a new command is executed or put into the foreground and the output is used as a titlebar message. The `status current-command` builtin will always return the name of the job to be put into the foreground (or 'fish' if control is returning to the shell) when the `fish_prompt` function is called. The first argument to fish_title will contain the most recently executed foreground command as a string, starting with fish 2.2.
|
||||
|
||||
Examples:
|
||||
The default `fish` title is
|
||||
|
||||
\fish
|
||||
function fish_title
|
||||
echo $_ ' '
|
||||
echo (status current-command) ' '
|
||||
pwd
|
||||
end
|
||||
\endfish
|
||||
|
@ -1360,11 +1355,6 @@ To start a debug session simply run the builtin command `breakpoint` at the poin
|
|||
Note: At the moment the debug prompt is identical to your normal fish prompt. This can make it hard to recognize that you've entered a debug session. <a hread="https://github.com/fish-shell/fish-shell/issues/1310">Issue 1310</a> is open to improve this.
|
||||
|
||||
|
||||
\section issues Common issues with fish
|
||||
|
||||
If you install fish in your home directory, fish will not work correctly for any other user than yourself. This is because fish needs its initialization files to function properly. To solve this problem, either copy the initialization files to each fish users home directory, or install them in `/etc`.
|
||||
|
||||
|
||||
\section more-help Further help and development
|
||||
|
||||
If you have a question not answered by this documentation, there are several avenues for help:
|
||||
|
|
|
@ -19,13 +19,13 @@ The following options are available:
|
|||
|
||||
If the expression is successfully evaluated and doesn't over/underflow or return NaN the return `status` is zero (success) else one.
|
||||
|
||||
\subsection math-syntax
|
||||
\subsection math-syntax Syntax
|
||||
|
||||
`math` knows some operators, constants, functions and can (obviously) read numbers.
|
||||
|
||||
For numbers, `.` is always the radix character regardless of locale - `2.5`, not `2,5`. Scientific notation (`10e5`) is also available.
|
||||
|
||||
\subsection math-operators
|
||||
\subsection math-operators Operators
|
||||
|
||||
`math` knows the following operators:
|
||||
|
||||
|
@ -41,7 +41,7 @@ For numbers, `.` is always the radix character regardless of locale - `2.5`, not
|
|||
|
||||
They are all used in an infix manner - `5 + 2`, not `+ 5 2`.
|
||||
|
||||
\subsection math-constants
|
||||
\subsection math-constants Constants
|
||||
|
||||
`math` knows the following constants:
|
||||
|
||||
|
@ -50,7 +50,7 @@ They are all used in an infix manner - `5 + 2`, not `+ 5 2`.
|
|||
|
||||
Use them without a leading `$`.
|
||||
|
||||
\subsection math-functions
|
||||
\subsection math-functions Functions
|
||||
|
||||
`math` supports the following functions:
|
||||
|
||||
|
|
|
@ -7,13 +7,13 @@ read [OPTIONS] VARIABLES...
|
|||
|
||||
\subsection read-description Description
|
||||
|
||||
`read` reads from standard input and either writes the result back to the terminal for use in command substitution or stores the result in one or more shell variables. By default, one line (terminated by a newline) is read into each variable. Alternatively, a null character or a maximum number of characters can be used to terminate the input. Unlike other shells, there is no default variable (such as `REPLY`) for storing the result.
|
||||
`read` reads from standard input and either writes the result back to the terminal for use in command substitution or stores the result in one or more shell variables. By default, `read` reads up to the next newline and splits it into given variables on spaces or tabs. Alternatively, a null character or a maximum number of characters can be used to terminate the input, and other delimiters can be given. Unlike other shells, there is no default variable (such as `REPLY`) for storing the result. Instead, it is printed on stdout.
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-c CMD` or `--command=CMD` sets the initial string in the interactive mode command buffer to `CMD`.
|
||||
|
||||
- `-d DELIMITER` or `--delimiter=DELIMITER` splits on DELIMITER.
|
||||
- `-d DELIMITER` or `--delimiter=DELIMITER` splits on DELIMITER. DELIMITER will be used as an entire string to split on, not a set of characters.
|
||||
|
||||
- `-g` or `--global` makes the variables global.
|
||||
|
||||
|
@ -43,6 +43,10 @@ The following options are available:
|
|||
- `-z` or `--null` marks the end of the line with the NUL character, instead of newline. This also
|
||||
disables interactive mode.
|
||||
|
||||
- `-L` or `--line` reads a single line at a time from the input stream and stores it in the `N` given variable. No more than `N` lines are consumed (one line per variable) from the input stream.
|
||||
|
||||
- `-A` or `--all-lines` splits input into the given variables, separated by line breaks. The entire input stream is consumed and interactive mode is disabled. Probably only useful with `-a` to read all lines into a single array variable. Where possible, ` | while read --line` should be preferred over ` | read --all-lines` as the latter will block until the input stream has been consumed, leading to latency and decreased responsiveness.
|
||||
|
||||
`read` reads a single line of input from stdin, breaks it into tokens based on the delimiter set via `-d`/`--delimiter` as a complete string (like `string split` or, if that has not been given the (deprecated) `IFS` shell variable as a set of characters, and then assigns one token to each variable specified in `VARIABLES`. If there are more tokens than variables, the complete remainder is assigned to the last variable. As a special case, if `IFS` is set to the empty string, each character of the input is considered a separate token.
|
||||
|
||||
If no parameters are provided, `read` enters a special case that simply provides redirection from `stdin` to `stdout`, useful for command substitution. For instance, the fish shell command below can be used to read data that should be provided via a command line argument from the console instead of hardcoding it in the command itself, allowing the command to both be reused as-is in various contexts with different input values and preventing possibly sensitive text from being included in the shell history:
|
||||
|
|
|
@ -12,7 +12,7 @@ string repeat [(-n | --count) COUNT] [(-m | --max) MAX] [(-N | --no-newline)]
|
|||
[(-q | --quiet)] [STRING...]
|
||||
string replace [(-a | --all)] [(-f | --filter)] [(-i | --ignore-case)] [(-r | --regex)]
|
||||
[(-q | --quiet)] PATTERN REPLACEMENT [STRING...]
|
||||
string split [(-m | --max) MAX] [(-r | --right)] [(-q | --quiet)] SEP
|
||||
string split [(-m | --max) MAX] [(-n | --no-empty)] [(-q | --quiet)] [(-r | --right)] SEP
|
||||
[STRING...]
|
||||
string sub [(-s | --start) START] [(-l | --length) LENGTH] [(-q | --quiet)]
|
||||
[STRING...]
|
||||
|
@ -89,7 +89,7 @@ Exit status: 0 if at least one replacement was performed, or 1 otherwise.
|
|||
|
||||
\subsection string-split "split" subcommand
|
||||
|
||||
`string split` splits each STRING on the separator SEP, which can be an empty string. If `-m` or `--max` is specified, at most MAX splits are done on each STRING. If `-r` or `--right` is given, splitting is performed right-to-left. This is useful in combination with `-m` or `--max`. Exit status: 0 if at least one split was performed, or 1 otherwise.
|
||||
`string split` splits each STRING on the separator SEP, which can be an empty string. If `-m` or `--max` is specified, at most MAX splits are done on each STRING. If `-r` or `--right` is given, splitting is performed right-to-left. This is useful in combination with `-m` or `--max`. With `-n` or `--no-empty`, empty results are excluded from consideration (e.g. `hello\n\nworld` would expand to two strings and not three). Exit status: 0 if at least one split was performed, or 1 otherwise.
|
||||
|
||||
See also `read --delimiter`.
|
||||
|
||||
|
|
|
@ -203,8 +203,6 @@
|
|||
D01243691CD4015C00C64313 /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855E13B3ACEE0099B651 /* util.cpp */; };
|
||||
D012436A1CD4018100C64313 /* fallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853E13B3ACEE0099B651 /* fallback.cpp */; };
|
||||
D012436B1CD4019700C64313 /* fallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853E13B3ACEE0099B651 /* fallback.cpp */; };
|
||||
D013CE371F52964A00AB1419 /* libmuparser.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D06821651F51490E00040321 /* libmuparser.a */; };
|
||||
D013CE381F52964D00AB1419 /* libmuparser.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D06821651F51490E00040321 /* libmuparser.a */; };
|
||||
D01A2D24169B736200767098 /* man1 in Copy Files */ = {isa = PBXBuildFile; fileRef = D01A2D23169B730A00767098 /* man1 */; };
|
||||
D01A2D25169B737700767098 /* man1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = D01A2D23169B730A00767098 /* man1 */; };
|
||||
D02960E61FBD726200CA3985 /* builtin_wait.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D02960E51FBD726100CA3985 /* builtin_wait.cpp */; };
|
||||
|
@ -251,6 +249,10 @@
|
|||
D033781115DC6D4C00A634BA /* completions in CopyFiles */ = {isa = PBXBuildFile; fileRef = D025C02715D1FEA100B9DB63 /* completions */; };
|
||||
D033781215DC6D5200A634BA /* functions in CopyFiles */ = {isa = PBXBuildFile; fileRef = D025C02815D1FEA100B9DB63 /* functions */; };
|
||||
D033781315DC6D5400A634BA /* tools in CopyFiles */ = {isa = PBXBuildFile; fileRef = D025C02915D1FEA100B9DB63 /* tools */; };
|
||||
D046A0FA2070245000C8DFF7 /* tinyexpr.c in Sources */ = {isa = PBXBuildFile; fileRef = D046A0F92070245000C8DFF7 /* tinyexpr.c */; };
|
||||
D046A0FB2070245000C8DFF7 /* tinyexpr.c in Sources */ = {isa = PBXBuildFile; fileRef = D046A0F92070245000C8DFF7 /* tinyexpr.c */; };
|
||||
D046A0FC2070245000C8DFF7 /* tinyexpr.c in Sources */ = {isa = PBXBuildFile; fileRef = D046A0F92070245000C8DFF7 /* tinyexpr.c */; };
|
||||
D046A0FD2070245000C8DFF7 /* tinyexpr.c in Sources */ = {isa = PBXBuildFile; fileRef = D046A0F92070245000C8DFF7 /* tinyexpr.c */; };
|
||||
D04F7FD51BA4E3AC00B0F227 /* pcre2_compile.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F8D1BA4DCD900B0F227 /* pcre2_compile.c */; };
|
||||
D04F7FD61BA4E3AC00B0F227 /* pcre2_config.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F901BA4DCE900B0F227 /* pcre2_config.c */; };
|
||||
D04F7FD71BA4E3AC00B0F227 /* pcre2_context.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F931BA4DCFA00B0F227 /* pcre2_context.c */; };
|
||||
|
@ -375,13 +377,6 @@
|
|||
D05F59CC1F041AE4003EE978 /* builtin_bg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F596D1F041AE4003EE978 /* builtin_bg.cpp */; };
|
||||
D05F59CD1F041AE4003EE978 /* builtin_bg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F596D1F041AE4003EE978 /* builtin_bg.cpp */; };
|
||||
D06821601F5148AE00040321 /* builtin_math.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0B51D811F5018B30051C61A /* builtin_math.cpp */; };
|
||||
D068222A1F5149B500040321 /* muParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D06822211F51498700040321 /* muParser.cpp */; };
|
||||
D068222B1F5149B500040321 /* muParserBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D06822221F51498700040321 /* muParserBase.cpp */; };
|
||||
D068222C1F5149B500040321 /* muParserBytecode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D06822231F51498700040321 /* muParserBytecode.cpp */; };
|
||||
D068222D1F5149B500040321 /* muParserCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D06822241F51498700040321 /* muParserCallback.cpp */; };
|
||||
D068222F1F5149B500040321 /* muParserError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D06822261F51498700040321 /* muParserError.cpp */; };
|
||||
D06822301F5149B500040321 /* muParserInt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D06822271F51498700040321 /* muParserInt.cpp */; };
|
||||
D06822321F5149B500040321 /* muParserTokenReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D06822291F51498700040321 /* muParserTokenReader.cpp */; };
|
||||
D07B247315BCC15700D4ADB4 /* add-shell in Resources */ = {isa = PBXBuildFile; fileRef = D07B247215BCC15700D4ADB4 /* add-shell */; };
|
||||
D07B247615BCC4BE00D4ADB4 /* install.sh in Resources */ = {isa = PBXBuildFile; fileRef = D07B247515BCC4BE00D4ADB4 /* install.sh */; };
|
||||
D07D266A15E33B86009E43F6 /* config.fish in CopyFiles */ = {isa = PBXBuildFile; fileRef = D0C4FD9415A7D7EE00212EF1 /* config.fish */; };
|
||||
|
@ -389,8 +384,6 @@
|
|||
D07D266D15E33B86009E43F6 /* functions in Copy Files */ = {isa = PBXBuildFile; fileRef = D025C02815D1FEA100B9DB63 /* functions */; };
|
||||
D07D266E15E33B86009E43F6 /* tools in Copy Files */ = {isa = PBXBuildFile; fileRef = D025C02915D1FEA100B9DB63 /* tools */; };
|
||||
D07D267215E34171009E43F6 /* config.fish in Copy Files */ = {isa = PBXBuildFile; fileRef = D0CBD580159EE48F0024809C /* config.fish */; };
|
||||
D08500A01F63A62C00C0E329 /* libmuparser.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D06821651F51490E00040321 /* libmuparser.a */; };
|
||||
D08500A11F63A63100C0E329 /* libmuparser.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D06821651F51490E00040321 /* libmuparser.a */; };
|
||||
D08500A41F63A65800C0E329 /* builtin_argparse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB0F034A1F156FE3001827D3 /* builtin_argparse.cpp */; };
|
||||
D08500A51F63A6EB00C0E329 /* builtin_math.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0B51D811F5018B30051C61A /* builtin_math.cpp */; };
|
||||
D0879AC816BF9AAB00E98E56 /* fish_term_icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = D0879AC616BF9A1A00E98E56 /* fish_term_icon.icns */; };
|
||||
|
@ -545,27 +538,6 @@
|
|||
remoteGlobalIDString = D0D02ACF1598642A008E62BD;
|
||||
remoteInfo = fish_indent;
|
||||
};
|
||||
D085009C1F63A61B00C0E329 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D0A084F213B3AC130099B651 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D06821641F51490E00040321;
|
||||
remoteInfo = muparser;
|
||||
};
|
||||
D085009E1F63A61F00C0E329 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D0A084F213B3AC130099B651 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D06821641F51490E00040321;
|
||||
remoteInfo = muparser;
|
||||
};
|
||||
D08500A21F63A63600C0E329 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D0A084F213B3AC130099B651 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D06821641F51490E00040321;
|
||||
remoteInfo = muparser;
|
||||
};
|
||||
D0A564EE168D09C000AF6161 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D0A084F213B3AC130099B651 /* Project object */;
|
||||
|
@ -714,6 +686,7 @@
|
|||
D032388A1849D1980032CF2C /* pager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pager.h; sourceTree = "<group>"; };
|
||||
D03EE83814DF88B200FC7150 /* lru.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = lru.h; sourceTree = "<group>"; };
|
||||
D043012D1F5350E400942A50 /* maybe.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = maybe.h; sourceTree = "<group>"; };
|
||||
D046A0F92070245000C8DFF7 /* tinyexpr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tinyexpr.c; sourceTree = "<group>"; };
|
||||
D04F7F8D1BA4DCD900B0F227 /* pcre2_compile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_compile.c; sourceTree = "<group>"; };
|
||||
D04F7F901BA4DCE900B0F227 /* pcre2_config.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_config.c; sourceTree = "<group>"; };
|
||||
D04F7F931BA4DCFA00B0F227 /* pcre2_context.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_context.c; sourceTree = "<group>"; };
|
||||
|
@ -804,23 +777,6 @@
|
|||
D05F596B1F041AE4003EE978 /* builtin_bind.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_bind.cpp; sourceTree = "<group>"; };
|
||||
D05F596C1F041AE4003EE978 /* builtin_bg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_bg.h; sourceTree = "<group>"; };
|
||||
D05F596D1F041AE4003EE978 /* builtin_bg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_bg.cpp; sourceTree = "<group>"; };
|
||||
D06821651F51490E00040321 /* libmuparser.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libmuparser.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D06821FB1F51498700040321 /* muParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = muParser.h; sourceTree = "<group>"; };
|
||||
D06821FC1F51498700040321 /* muParserBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = muParserBase.h; sourceTree = "<group>"; };
|
||||
D06821FD1F51498700040321 /* muParserBytecode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = muParserBytecode.h; sourceTree = "<group>"; };
|
||||
D06821FE1F51498700040321 /* muParserCallback.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = muParserCallback.h; sourceTree = "<group>"; };
|
||||
D06821FF1F51498700040321 /* muParserDef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = muParserDef.h; sourceTree = "<group>"; };
|
||||
D06822031F51498700040321 /* muParserInt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = muParserInt.h; sourceTree = "<group>"; };
|
||||
D06822061F51498700040321 /* muParserTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = muParserTest.h; sourceTree = "<group>"; };
|
||||
D06822071F51498700040321 /* muParserToken.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = muParserToken.h; sourceTree = "<group>"; };
|
||||
D06822081F51498700040321 /* muParserTokenReader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = muParserTokenReader.h; sourceTree = "<group>"; };
|
||||
D06822211F51498700040321 /* muParser.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = muParser.cpp; sourceTree = "<group>"; };
|
||||
D06822221F51498700040321 /* muParserBase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = muParserBase.cpp; sourceTree = "<group>"; };
|
||||
D06822231F51498700040321 /* muParserBytecode.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = muParserBytecode.cpp; sourceTree = "<group>"; };
|
||||
D06822241F51498700040321 /* muParserCallback.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = muParserCallback.cpp; sourceTree = "<group>"; };
|
||||
D06822261F51498700040321 /* muParserError.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = muParserError.cpp; sourceTree = "<group>"; };
|
||||
D06822271F51498700040321 /* muParserInt.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = muParserInt.cpp; sourceTree = "<group>"; };
|
||||
D06822291F51498700040321 /* muParserTokenReader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = muParserTokenReader.cpp; sourceTree = "<group>"; };
|
||||
D07B247215BCC15700D4ADB4 /* add-shell */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "add-shell"; path = "build_tools/osx_package_scripts/add-shell"; sourceTree = "<group>"; };
|
||||
D07B247515BCC4BE00D4ADB4 /* install.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = install.sh; path = osx/install.sh; sourceTree = "<group>"; };
|
||||
D0879AC616BF9A1A00E98E56 /* fish_term_icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = fish_term_icon.icns; path = osx/fish_term_icon.icns; sourceTree = "<group>"; };
|
||||
|
@ -932,7 +888,6 @@
|
|||
files = (
|
||||
9C7A556C1DCD71330049C25D /* libncurses.dylib in Frameworks */,
|
||||
9C7A556D1DCD71330049C25D /* libpcre2.a in Frameworks */,
|
||||
D08500A01F63A62C00C0E329 /* libmuparser.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -942,7 +897,6 @@
|
|||
files = (
|
||||
D007693D1990137800CA4627 /* libncurses.dylib in Frameworks */,
|
||||
D04F7FFA1BA4E9A400B0F227 /* libpcre2.a in Frameworks */,
|
||||
D08500A11F63A63100C0E329 /* libmuparser.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -953,20 +907,12 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D06821621F51490E00040321 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D0D02ACD1598642A008E62BD /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D0D02ADC159864D5008E62BD /* libncurses.dylib in Frameworks */,
|
||||
D04F7FF21BA4E68A00B0F227 /* libpcre2.a in Frameworks */,
|
||||
D013CE381F52964D00AB1419 /* libmuparser.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -976,7 +922,6 @@
|
|||
files = (
|
||||
D0D02A8D15983CFA008E62BD /* libncurses.dylib in Frameworks */,
|
||||
D04F7FF11BA4E68200B0F227 /* libpcre2.a in Frameworks */,
|
||||
D013CE371F52964A00AB1419 /* libmuparser.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -1039,45 +984,6 @@
|
|||
path = "pcre2-10.22/src";
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
D06821C71F51498700040321 /* muparser-2.2.5 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D06821FA1F51498700040321 /* include */,
|
||||
D06822201F51498700040321 /* src */,
|
||||
);
|
||||
path = "muparser-2.2.5";
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
D06821FA1F51498700040321 /* include */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D06821FB1F51498700040321 /* muParser.h */,
|
||||
D06821FC1F51498700040321 /* muParserBase.h */,
|
||||
D06821FD1F51498700040321 /* muParserBytecode.h */,
|
||||
D06821FE1F51498700040321 /* muParserCallback.h */,
|
||||
D06821FF1F51498700040321 /* muParserDef.h */,
|
||||
D06822031F51498700040321 /* muParserInt.h */,
|
||||
D06822061F51498700040321 /* muParserTest.h */,
|
||||
D06822071F51498700040321 /* muParserToken.h */,
|
||||
D06822081F51498700040321 /* muParserTokenReader.h */,
|
||||
);
|
||||
path = include;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D06822201F51498700040321 /* src */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D06822211F51498700040321 /* muParser.cpp */,
|
||||
D06822221F51498700040321 /* muParserBase.cpp */,
|
||||
D06822231F51498700040321 /* muParserBytecode.cpp */,
|
||||
D06822241F51498700040321 /* muParserCallback.cpp */,
|
||||
D06822261F51498700040321 /* muParserError.cpp */,
|
||||
D06822271F51498700040321 /* muParserInt.cpp */,
|
||||
D06822291F51498700040321 /* muParserTokenReader.cpp */,
|
||||
);
|
||||
path = src;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D08A328E17B4455100F3A533 /* fish_tests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -1259,6 +1165,7 @@
|
|||
D0A0855A13B3ACEE0099B651 /* screen.cpp */,
|
||||
D0A0852413B3ACEE0099B651 /* signal.h */,
|
||||
D0A0855C13B3ACEE0099B651 /* signal.cpp */,
|
||||
D046A0F92070245000C8DFF7 /* tinyexpr.c */,
|
||||
D0A0852513B3ACEE0099B651 /* tokenizer.h */,
|
||||
D0A0855D13B3ACEE0099B651 /* tokenizer.cpp */,
|
||||
4F2D55CD2013ECDD00822920 /* tnode.h */,
|
||||
|
@ -1275,7 +1182,6 @@
|
|||
D0A0856013B3ACEE0099B651 /* wildcard.cpp */,
|
||||
D0A0852913B3ACEE0099B651 /* wutil.h */,
|
||||
D0A0856113B3ACEE0099B651 /* wutil.cpp */,
|
||||
D06821C71F51498700040321 /* muparser-2.2.5 */,
|
||||
D04F7F8B1BA4DC7600B0F227 /* pcre */,
|
||||
);
|
||||
name = Sources;
|
||||
|
@ -1321,7 +1227,6 @@
|
|||
D00769421990137800CA4627 /* fish_tests */,
|
||||
D04F7FD01BA4E29300B0F227 /* libpcre2.a */,
|
||||
9C7A55721DCD71330049C25D /* fish_key_reader */,
|
||||
D06821651F51490E00040321 /* libmuparser.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
@ -1336,13 +1241,6 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D06821631F51490E00040321 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
|
@ -1358,7 +1256,6 @@
|
|||
dependencies = (
|
||||
9C7A55311DCD71330049C25D /* PBXTargetDependency */,
|
||||
9C7A55331DCD71330049C25D /* PBXTargetDependency */,
|
||||
D085009F1F63A61F00C0E329 /* PBXTargetDependency */,
|
||||
);
|
||||
name = fish_key_reader;
|
||||
productName = fish_Xcode;
|
||||
|
@ -1377,7 +1274,6 @@
|
|||
dependencies = (
|
||||
D008D0CF1BC58FE500841177 /* PBXTargetDependency */,
|
||||
D04F7FED1BA4E3DF00B0F227 /* PBXTargetDependency */,
|
||||
D08500A31F63A63600C0E329 /* PBXTargetDependency */,
|
||||
);
|
||||
name = fish_tests;
|
||||
productName = fish_Xcode;
|
||||
|
@ -1402,23 +1298,6 @@
|
|||
productReference = D04F7FD01BA4E29300B0F227 /* libpcre2.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
D06821641F51490E00040321 /* muparser */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D06821661F51490E00040321 /* Build configuration list for PBXNativeTarget "muparser" */;
|
||||
buildPhases = (
|
||||
D06821611F51490E00040321 /* Sources */,
|
||||
D06821621F51490E00040321 /* Frameworks */,
|
||||
D06821631F51490E00040321 /* Headers */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = muparser;
|
||||
productName = muparser;
|
||||
productReference = D06821651F51490E00040321 /* libmuparser.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
D0D02A9915985A75008E62BD /* fish.app */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D0D02AA415985A75008E62BD /* Build configuration list for PBXNativeTarget "fish.app" */;
|
||||
|
@ -1466,7 +1345,6 @@
|
|||
dependencies = (
|
||||
D008D0CB1BC58FDD00841177 /* PBXTargetDependency */,
|
||||
D04F7FEB1BA4E3DB00B0F227 /* PBXTargetDependency */,
|
||||
D085009D1F63A61B00C0E329 /* PBXTargetDependency */,
|
||||
);
|
||||
name = fish_shell;
|
||||
productName = fish_Xcode;
|
||||
|
@ -1487,9 +1365,6 @@
|
|||
D04F7FCF1BA4E29300B0F227 = {
|
||||
CreatedOnToolsVersion = 6.4;
|
||||
};
|
||||
D06821641F51490E00040321 = {
|
||||
CreatedOnToolsVersion = 9.0;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = D0A084F513B3AC130099B651 /* Build configuration list for PBXProject "fish" */;
|
||||
|
@ -1514,7 +1389,6 @@
|
|||
D04F7FCF1BA4E29300B0F227 /* pcre2 */,
|
||||
D008D0C41BC58F8800841177 /* generate-version-header */,
|
||||
9C7A55301DCD71330049C25D /* fish_key_reader */,
|
||||
D06821641F51490E00040321 /* muparser */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
@ -1737,6 +1611,7 @@
|
|||
D001B6141F041CBD000838CC /* builtin_exit.cpp in Sources */,
|
||||
D001B6161F041CBD000838CC /* builtin_emit.cpp in Sources */,
|
||||
D001B6181F041CBD000838CC /* builtin_echo.cpp in Sources */,
|
||||
D046A0FD2070245000C8DFF7 /* tinyexpr.c in Sources */,
|
||||
D001B61A1F041CBD000838CC /* builtin_disown.cpp in Sources */,
|
||||
D001B61C1F041CBD000838CC /* builtin_contains.cpp in Sources */,
|
||||
D001B61E1F041CBD000838CC /* builtin_complete.cpp in Sources */,
|
||||
|
@ -1802,6 +1677,7 @@
|
|||
files = (
|
||||
D02960E81FBD726200CA3985 /* builtin_wait.cpp in Sources */,
|
||||
9C7A552F1DCD65820049C25D /* util.cpp in Sources */,
|
||||
D046A0FC2070245000C8DFF7 /* tinyexpr.c in Sources */,
|
||||
D05F59971F041AE4003EE978 /* builtin_printf.cpp in Sources */,
|
||||
D05F59A31F041AE4003EE978 /* builtin_function.cpp in Sources */,
|
||||
9C7A55271DCD651F0049C25D /* fallback.cpp in Sources */,
|
||||
|
@ -1912,20 +1788,6 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D06821611F51490E00040321 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D068222A1F5149B500040321 /* muParser.cpp in Sources */,
|
||||
D068222B1F5149B500040321 /* muParserBase.cpp in Sources */,
|
||||
D068222C1F5149B500040321 /* muParserBytecode.cpp in Sources */,
|
||||
D068222D1F5149B500040321 /* muParserCallback.cpp in Sources */,
|
||||
D068222F1F5149B500040321 /* muParserError.cpp in Sources */,
|
||||
D06822301F5149B500040321 /* muParserInt.cpp in Sources */,
|
||||
D06822321F5149B500040321 /* muParserTokenReader.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D0D02ACC1598642A008E62BD /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
|
@ -1954,6 +1816,7 @@
|
|||
D05F59A81F041AE4003EE978 /* builtin_exit.cpp in Sources */,
|
||||
D012436B1CD4019700C64313 /* fallback.cpp in Sources */,
|
||||
D05F59CC1F041AE4003EE978 /* builtin_bg.cpp in Sources */,
|
||||
D046A0FB2070245000C8DFF7 /* tinyexpr.c in Sources */,
|
||||
D05F59AB1F041AE4003EE978 /* builtin_emit.cpp in Sources */,
|
||||
D05F59961F041AE4003EE978 /* builtin_printf.cpp in Sources */,
|
||||
D030FC001A4A38F300F7ADA0 /* function.cpp in Sources */,
|
||||
|
@ -2095,6 +1958,7 @@
|
|||
D0C52F371765284C00BFAB82 /* parse_tree.cpp in Sources */,
|
||||
D0FE8EE8179FB760008C9F21 /* parse_productions.cpp in Sources */,
|
||||
D01243681CD4015600C64313 /* util.cpp in Sources */,
|
||||
D046A0FA2070245000C8DFF7 /* tinyexpr.c in Sources */,
|
||||
D05F59891F041AE4003EE978 /* builtin_realpath.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
@ -2165,21 +2029,6 @@
|
|||
target = D0D02ACF1598642A008E62BD /* fish_indent */;
|
||||
targetProxy = D07D265E15E33B86009E43F6 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D085009D1F63A61B00C0E329 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D06821641F51490E00040321 /* muparser */;
|
||||
targetProxy = D085009C1F63A61B00C0E329 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D085009F1F63A61F00C0E329 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D06821641F51490E00040321 /* muparser */;
|
||||
targetProxy = D085009E1F63A61F00C0E329 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D08500A31F63A63600C0E329 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D06821641F51490E00040321 /* muparser */;
|
||||
targetProxy = D08500A21F63A63600C0E329 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D0A564EF168D09C000AF6161 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D0A564E6168CFDD800AF6161 /* man_pages */;
|
||||
|
@ -2317,74 +2166,6 @@
|
|||
};
|
||||
name = Release;
|
||||
};
|
||||
D06821671F51490E00040321 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
EXECUTABLE_PREFIX = lib;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_CHECK_SWITCH_STATEMENTS = NO;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WARNING_CFLAGS = "-Wno-switch-enum";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
D06821681F51490E00040321 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
EXECUTABLE_PREFIX = lib;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_CHECK_SWITCH_STATEMENTS = NO;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WARNING_CFLAGS = "-Wno-switch-enum";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
D07D267015E33B86009E43F6 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
|
@ -2676,15 +2457,6 @@
|
|||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
D06821661F51490E00040321 /* Build configuration list for PBXNativeTarget "muparser" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D06821671F51490E00040321 /* Debug */,
|
||||
D06821681F51490E00040321 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
D07D266F15E33B86009E43F6 /* Build configuration list for PBXAggregateTarget "install_tree" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
|
2
po/de.po
2
po/de.po
|
@ -2118,7 +2118,7 @@ msgstr ""
|
|||
|
||||
#: src/parse_constants.h:275
|
||||
#, c-format
|
||||
msgid "$$ is not the pid. In fish, please use $pid."
|
||||
msgid "$$ is not the pid. In fish, please use $fish_pid."
|
||||
msgstr ""
|
||||
|
||||
#: src/parse_constants.h:278
|
||||
|
|
4
po/en.po
4
po/en.po
|
@ -118,7 +118,7 @@ msgstr "%ls: '%ls' is not a valid variable name\n"
|
|||
#: src/builtin_bg.cpp:95 src/builtin_disown.cpp:89 src/builtin_wait.cpp:163
|
||||
#, fuzzy, c-format
|
||||
msgid "%ls: Could not find job '%d'\n"
|
||||
msgstr "%s: Could not find “%s”\n"
|
||||
msgstr "%s: Could not find “%d”\n"
|
||||
|
||||
#: src/builtin_bind.cpp:141
|
||||
#, c-format
|
||||
|
@ -2068,7 +2068,7 @@ msgstr ""
|
|||
|
||||
#: src/parse_constants.h:275
|
||||
#, c-format
|
||||
msgid "$$ is not the pid. In fish, please use $pid."
|
||||
msgid "$$ is not the pid. In fish, please use $fish_pid."
|
||||
msgstr ""
|
||||
|
||||
#: src/parse_constants.h:278
|
||||
|
|
4
po/fr.po
4
po/fr.po
|
@ -2229,8 +2229,8 @@ msgstr "$? n’est pas le code de retour. Dans fish, veuillez utiliser $status."
|
|||
|
||||
#: src/parse_constants.h:275
|
||||
#, c-format
|
||||
msgid "$$ is not the pid. In fish, please use $pid."
|
||||
msgstr "$$ n’est pas le PID. Dans fish, veuillez utiliser $pid."
|
||||
msgid "$$ is not the pid. In fish, please use $fish_pid."
|
||||
msgstr "$$ n’est pas le PID. Dans fish, veuillez utiliser $fish_pid."
|
||||
|
||||
#: src/parse_constants.h:278
|
||||
msgid "$# is not supported. In fish, please use 'count $argv'."
|
||||
|
|
2
po/nb.po
2
po/nb.po
|
@ -2027,7 +2027,7 @@ msgstr ""
|
|||
|
||||
#: src/parse_constants.h:275
|
||||
#, c-format
|
||||
msgid "$$ is not the pid. In fish, please use $pid."
|
||||
msgid "$$ is not the pid. In fish, please use $fish_pid."
|
||||
msgstr ""
|
||||
|
||||
#: src/parse_constants.h:278
|
||||
|
|
2
po/nn.po
2
po/nn.po
|
@ -2027,7 +2027,7 @@ msgstr ""
|
|||
|
||||
#: src/parse_constants.h:275
|
||||
#, c-format
|
||||
msgid "$$ is not the pid. In fish, please use $pid."
|
||||
msgid "$$ is not the pid. In fish, please use $fish_pid."
|
||||
msgstr ""
|
||||
|
||||
#: src/parse_constants.h:278
|
||||
|
|
4
po/pl.po
4
po/pl.po
|
@ -2051,9 +2051,9 @@ msgstr ""
|
|||
|
||||
#: src/parse_constants.h:275
|
||||
#, c-format
|
||||
msgid "$$ is not the pid. In fish, please use $pid."
|
||||
msgid "$$ is not the pid. In fish, please use $fish_pid."
|
||||
msgstr ""
|
||||
"$$ nie jest numerem identyfikacyjnym procesu. W fish używane jest $pid."
|
||||
"$$ nie jest numerem identyfikacyjnym procesu. W fish używane jest $fish_pid."
|
||||
|
||||
#: src/parse_constants.h:278
|
||||
msgid "$# is not supported. In fish, please use 'count $argv'."
|
||||
|
|
|
@ -2084,7 +2084,7 @@ msgstr ""
|
|||
|
||||
#: src/parse_constants.h:275
|
||||
#, c-format
|
||||
msgid "$$ is not the pid. In fish, please use $pid."
|
||||
msgid "$$ is not the pid. In fish, please use $fish_pid."
|
||||
msgstr ""
|
||||
|
||||
#: src/parse_constants.h:278
|
||||
|
|
2
po/sv.po
2
po/sv.po
|
@ -2031,7 +2031,7 @@ msgstr ""
|
|||
|
||||
#: src/parse_constants.h:275
|
||||
#, c-format
|
||||
msgid "$$ is not the pid. In fish, please use $pid."
|
||||
msgid "$$ is not the pid. In fish, please use $fish_pid."
|
||||
msgstr ""
|
||||
|
||||
#: src/parse_constants.h:278
|
||||
|
|
|
@ -2045,7 +2045,7 @@ msgstr ""
|
|||
|
||||
#: src/parse_constants.h:275
|
||||
#, c-format
|
||||
msgid "$$ is not the pid. In fish, please use $pid."
|
||||
msgid "$$ is not the pid. In fish, please use $fish_pid."
|
||||
msgstr ""
|
||||
|
||||
#: src/parse_constants.h:278
|
||||
|
|
|
@ -84,7 +84,7 @@ complete -c ack -l bar -d 'The warning admiral'
|
|||
|
||||
# File types
|
||||
if type ack > /dev/null
|
||||
for type in (ack --dump ^/dev/null | perl -lne 'print $1 if /^\s+--type-add=([^:]+)/' | uniq)
|
||||
for type in (ack --dump 2>/dev/null | perl -lne 'print $1 if /^\s+--type-add=([^:]+)/' | uniq)
|
||||
complete -c ack -l $type -d "Allow $type file type"
|
||||
complete -c ack -l no$type -l no-$type -d "Don't allow $type file type"
|
||||
end
|
||||
|
|
|
@ -49,7 +49,7 @@ function __fish_adb_run_command -d 'Runs adb with any -s parameters already give
|
|||
end
|
||||
|
||||
function __fish_adb_list_packages
|
||||
__fish_adb_run_command pm list packages ^/dev/null | string replace 'package:' ''
|
||||
__fish_adb_run_command pm list packages 2>/dev/null | string replace 'package:' ''
|
||||
end
|
||||
|
||||
|
||||
|
@ -58,6 +58,21 @@ function __fish_adb_list_uninstallable_packages
|
|||
__fish_adb_run_command pm list packages -3 | string replace 'package:' ''
|
||||
end
|
||||
|
||||
function __fish_adb_list_files
|
||||
set -l token (commandline -ct)
|
||||
|
||||
# Have tab complete show initial / if nothing on current token
|
||||
if test -z "$token"
|
||||
set token "/"
|
||||
end
|
||||
|
||||
# Return list of directories suffixed with '/'
|
||||
__fish_adb_run_command find -H "$token*" -maxdepth 0 -type d 2>/dev/null | awk '{print $1"/"}'
|
||||
# Return list of files
|
||||
__fish_adb_run_command find -H "$token*" -maxdepth 0 -type f 2>/dev/null
|
||||
end
|
||||
|
||||
|
||||
# Generic options, must come before command
|
||||
complete -n '__fish_adb_no_subcommand' -c adb -s s -x -a "(__fish_adb_get_devices)" -d 'Device to communicate with'
|
||||
complete -n '__fish_adb_no_subcommand' -c adb -s d -d 'Communicate with first USB device'
|
||||
|
@ -143,3 +158,7 @@ complete -n '__fish_seen_subcommand_from sideload' -c adb -xa '(__fish_complete_
|
|||
|
||||
# reconnect
|
||||
complete -n '__fish_seen_subcommand_from reconnect' -c adb -x -a 'device' -d 'Kick current connection from device side and make it reconnect.'
|
||||
|
||||
# commands that accept listing device files
|
||||
complete -n '__fish_seen_subcommand_from shell' -c adb -f -a "(__fish_adb_list_files)" -d 'File on device'
|
||||
complete -n '__fish_seen_subcommand_from pull' -c adb -f -a "(__fish_adb_list_files)" -d 'File on device'
|
||||
|
|
|
@ -69,7 +69,7 @@ function __fish_apm_list_packages
|
|||
apm list -b
|
||||
end
|
||||
|
||||
if apm -h ^| string match -q "*Atom Package Manager*"
|
||||
if apm -h 2>| string match -q "*Atom Package Manager*"
|
||||
# Completions for Atom Package Manager
|
||||
|
||||
##################
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
function __fish_complete_apropos
|
||||
if test (commandline -ct)
|
||||
set str (commandline -ct)
|
||||
apropos $str ^/dev/null |sed -e "s/^\(.*$str\([^ ]*\).*\)\$/$str\2"\t"\1/"
|
||||
apropos $str 2>/dev/null |sed -e "s/^\(.*$str\([^ ]*\).*\)\$/$str\2"\t"\1/"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
63
share/completions/bower.fish
Normal file
63
share/completions/bower.fish
Normal file
|
@ -0,0 +1,63 @@
|
|||
function __bower_cmds
|
||||
echo -en "cache\tManage bower cache
|
||||
help\tDisplay help information about Bower
|
||||
home\tOpens a package homepage into your favorite browser
|
||||
info\tInfo of a particular package
|
||||
init\tInteractively create a bower.json file
|
||||
install\tInstall a package locally
|
||||
link\tSymlink a package folder
|
||||
list\tList local packages - and possible updates
|
||||
login\tAuthenticate with GitHub and store credentials
|
||||
lookup\tLook up a single package URL by name
|
||||
prune\tRemoves local extraneous packages
|
||||
register\tRegister a package
|
||||
search\tSearch for packages by name
|
||||
update\tUpdate a local package
|
||||
uninstall\tRemove a local package
|
||||
unregister\tRemove a package from the registry
|
||||
version\tBump a package version
|
||||
"
|
||||
end
|
||||
|
||||
function __bower_args
|
||||
echo -en "-f\tMakes various commands more forceful
|
||||
--force\tMakes various commands more forceful
|
||||
-j\tOutput consumable JSON
|
||||
--json\tOutput consumable JSON
|
||||
-l\tWhat level of logs to report
|
||||
--loglevel\tWhat level of logs to report
|
||||
-o\tDo not hit the network
|
||||
--offline\tDo not hit the network
|
||||
-q\tOnly output important information
|
||||
--quiet\tOnly output important information
|
||||
-s\tDo not output anything, besides errors
|
||||
--silent\tDo not output anything, besides errors
|
||||
-V\tMakes output more verbose
|
||||
--verbose\tMakes output more verbose
|
||||
--allow-root\tAllows running commands as root
|
||||
-v\tOutput Bower version
|
||||
--version\tOutput Bower version
|
||||
--no-color\tDisable colors"
|
||||
end
|
||||
|
||||
function __bower_matching_pkgs
|
||||
bower search (commandline -ct) | string match -r "\S+[^\s]" | string match -v "Search"
|
||||
end
|
||||
|
||||
# Output of `bower list` is a) slow, b) convoluted. Use `jq` instead.
|
||||
function __bower_list_installed
|
||||
if not type -q jq
|
||||
return 1
|
||||
end
|
||||
|
||||
if not test -e bower.json
|
||||
return 1
|
||||
end
|
||||
|
||||
jq -r '.dependencies | to_entries[] | .key' bower.json
|
||||
end
|
||||
|
||||
complete -c bower -n "__fish_is_first_token" -x -a '(__bower_cmds)'
|
||||
complete -c bower -n "__fish_should_complete_switches" -x -a '(__bower_args)'
|
||||
complete -c bower -n "__fish_seen_subcommand_from install" -x -a '(__bower_matching_pkgs)'
|
||||
complete -c bower -n "__fish_seen_subcommand_from uninstall" -x -a '(__bower_list_installed)'
|
|
@ -15,7 +15,7 @@ function __fish_busctl
|
|||
else
|
||||
set mode "--system"
|
||||
end
|
||||
command busctl $mode $argv --no-legend --no-pager ^/dev/null
|
||||
command busctl $mode $argv --no-legend --no-pager 2>/dev/null
|
||||
end
|
||||
|
||||
# Only get the arguments to the actual command, skipping all options and arguments to options
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
if cat --version ^ /dev/null > /dev/null # GNU
|
||||
if cat --version 2>/dev/null > /dev/null # GNU
|
||||
complete -c cat -s A -l show-all -d "Escape all non-printing characters"
|
||||
complete -c cat -s b -l number-nonblank -d "Number nonblank lines"
|
||||
complete -c cat -s e -d "Escape non-printing characters except tab"
|
||||
|
|
|
@ -10,6 +10,6 @@ complete -x -c chsh -a "(__fish_complete_users)"
|
|||
|
||||
# util-linux's chsh also has a "-l"/"--list-shells" option.
|
||||
# While both FreeBSD and macOS also have "-l", it means something different and probably uninteresting.
|
||||
if set -l chshversion (chsh --version ^/dev/null); and string match -qr '.*util-linux.*' -- $chshversion
|
||||
if set -l chshversion (chsh --version 2>/dev/null); and string match -qr '.*util-linux.*' -- $chshversion
|
||||
complete -f -c chsh -s l -l list-shells -d "List available shells and exit"
|
||||
end
|
||||
|
|
296
share/completions/conda.fish
Normal file
296
share/completions/conda.fish
Normal file
|
@ -0,0 +1,296 @@
|
|||
# Fish shell completions for conda, the package management system
|
||||
# https://conda.io/docs
|
||||
# Based on `conda help` as per version 4.4.11
|
||||
# Advanced completions:
|
||||
# - completion of already defined keys for `conda config`
|
||||
# - completion of already created environment where possible
|
||||
#
|
||||
# Note: conda ships with a completion for fish, automatically generated
|
||||
# from `conda -h` but it is far cruder than the completions in this file,
|
||||
# and it is by nature far too tricky to tweak to get the desired richness.
|
||||
# Hence this effort.
|
||||
|
||||
# First, as part of conda's configuration, some complete would have been defined
|
||||
# Let's erase them, so that we start from a blank state
|
||||
complete -c conda -e
|
||||
|
||||
# Complete using -n to select the given conda subcommand
|
||||
# and passing the rest of the arguments to `complete`
|
||||
# The goal here is to reduce clutter in the definitions below
|
||||
function __fish_conda -a cmd
|
||||
complete -c conda -n "__fish_seen_subcommand_from $cmd" $argv[2..-1]
|
||||
end
|
||||
|
||||
# Complete for the first argument only
|
||||
function __fish_conda_top
|
||||
complete -c conda -n "test (count (commandline -opc)) -eq 1" $argv
|
||||
end
|
||||
|
||||
function __fish_conda_config_keys
|
||||
conda config --show | string match -r '^\w+(?=:)'
|
||||
end
|
||||
|
||||
function __fish_conda_environments
|
||||
conda env list | string match -rv '^#' | string match -r '^\w+'
|
||||
end
|
||||
|
||||
# common options
|
||||
complete -c conda -f
|
||||
complete -c conda -s h -l help -d "Show help and exit"
|
||||
|
||||
# top-level options
|
||||
__fish_conda_top -s V -l version -d "Show the conda version number and exit"
|
||||
|
||||
# top-level commands
|
||||
__fish_conda_top -a clean -d "Remove unused packages and caches"
|
||||
__fish_conda_top -a config -d "Modify configuration values in .condarc"
|
||||
__fish_conda_top -a create -d "Create a new conda environment from a list of specified packages"
|
||||
__fish_conda_top -a help -d "Displays a list of available conda commands and their help strings"
|
||||
__fish_conda_top -a info -d "Display information about current conda install"
|
||||
__fish_conda_top -a install -d "Installs a list of packages into a specified conda environment"
|
||||
__fish_conda_top -a list -d "List linked packages in a conda environment"
|
||||
__fish_conda_top -a package -d "Low-level conda package utility (EXPERIMENTAL)"
|
||||
__fish_conda_top -a remove -d "Remove a list of packages from a specified conda environment"
|
||||
__fish_conda_top -a uninstall -d "Alias for conda remove"
|
||||
__fish_conda_top -a search -d "Search for packages and display associated information"
|
||||
__fish_conda_top -a update -d "Updates conda packages to the latest compatible version"
|
||||
__fish_conda_top -a upgrade -d "Alias for conda update"
|
||||
|
||||
# command added by sourcing ~/miniconda3/etc/fish/conf.d/conda.fish,
|
||||
# which is the recommended way to use conda with fish
|
||||
__fish_conda_top -a activate -d "Activate the given environment"
|
||||
__fish_conda activate -x -a "(__fish_conda_environments)"
|
||||
__fish_conda_top -a deactivate -d "Deactivate current environment, reactivating the previous one"
|
||||
|
||||
# common to all top-level commands
|
||||
|
||||
set -l __fish_conda_commands clean config create help info install list package remove uninstall search update upgrade
|
||||
for cmd in $__fish_conda_commands
|
||||
__fish_conda $cmd -l json -d "Report all output as json"
|
||||
__fish_conda $cmd -l debug -d "Show debug output"
|
||||
__fish_conda $cmd -l verbose -s v -d "Use once for info, twice for debug, three times for trace"
|
||||
end
|
||||
|
||||
# 'clean' command
|
||||
__fish_conda clean -s y -l yes -d "Do not ask for confirmation"
|
||||
__fish_conda clean -l dry-run -d "Only display what would have been done"
|
||||
__fish_conda clean -s q -l quiet -d "Do not display progress bar"
|
||||
__fish_conda clean -s a -l all -d "Remove all: same as -iltps"
|
||||
__fish_conda clean -s i -l index-cache -d "Remove index cache"
|
||||
__fish_conda clean -s l -l lock -d "Remove all conda lock files"
|
||||
__fish_conda clean -s t -l tarballs -d "Remove cached package tarballs"
|
||||
__fish_conda clean -s p -l packages -d "Remove unused cached packages (no check for symlinks)"
|
||||
__fish_conda clean -s s -l source-cache -d "Remove files from the source cache of conda build"
|
||||
|
||||
# 'config' command
|
||||
|
||||
__fish_conda config -l system -d "Write to the system .condarc file"
|
||||
__fish_conda config -l env -d "Write to the active conda environment .condarc file"
|
||||
__fish_conda config -l file -d "Write to the given file"
|
||||
__fish_conda config -l show -x -a "(__fish_conda_config_keys)" -d "Display configuration values"
|
||||
__fish_conda config -l show-sources -d "Display all identified configuration sources"
|
||||
__fish_conda config -l validate -d "Validate all configuration sources"
|
||||
__fish_conda config -l describe -x -a "(__fish_conda_config_keys)" -d "Describe configuration parameters"
|
||||
__fish_conda config -l write-default -d "Write the default configuration to a file"
|
||||
__fish_conda config -l get -x -a "(__fish_conda_config_keys)" -d "Get a configuration value"
|
||||
__fish_conda config -l append -d "Add one configuration value to the end of a list key"
|
||||
__fish_conda config -l prepend -d "Add one configuration value to the beginning of a list key"
|
||||
__fish_conda config -l add -d "Alias for --prepend"
|
||||
__fish_conda config -l set -x -a "(__fish_conda_config_keys)" -d "Set a boolean or string key"
|
||||
__fish_conda config -l remove -x -a "(__fish_conda_config_keys)" -d "Remove a configuration value from a list key"
|
||||
__fish_conda config -l remove-key -x -a "(__fish_conda_config_keys)" -d "Remove a configuration key (and all its values)"
|
||||
__fish_conda config -l stdin -d "Apply configuration given in yaml format from stdin"
|
||||
|
||||
# 'help' command
|
||||
__fish_conda "help" -d "Displays a list of available conda commands and their help strings"
|
||||
__fish_conda "help" -x -a "$__fish_conda_commands"
|
||||
|
||||
# 'info' command
|
||||
__fish_conda info -l offline -d "Offline mode, don't connect to the Internet."
|
||||
__fish_conda info -s a -l all -d "Show all information, (environments, license, and system information)"
|
||||
__fish_conda info -s e -l envs -d "List all known conda environments"
|
||||
__fish_conda info -s l -l license -d "Display information about the local conda licenses list"
|
||||
__fish_conda info -s s -l system -d "List environment variables"
|
||||
__fish_conda info -l base -d "Display base environment path"
|
||||
__fish_conda info -l unsafe-channels -d "Display list of channels with tokens exposed"
|
||||
|
||||
# The remaining commands share many options, so the definitions are written the other way around:
|
||||
# the outer loop is on the options
|
||||
|
||||
# Option channel
|
||||
for cmd in create install remove search update
|
||||
__fish_conda $cmd -s c -l channel -d 'Additional channel to search for packages'
|
||||
end
|
||||
|
||||
# Option channel-priority
|
||||
for cmd in create install update
|
||||
__fish_conda $cmd -l channel-priority -d 'Channel priority takes precedence over package version'
|
||||
end
|
||||
|
||||
# Option clobber
|
||||
for cmd in create install update
|
||||
__fish_conda $cmd -l clobber -d 'Allow clobbering of overlapping file paths (no warnings)'
|
||||
end
|
||||
|
||||
# Option clone
|
||||
__fish_conda create -l clone -x -a "(__fish_conda_environments)" -d "Path to (or name of) existing local environment"
|
||||
|
||||
# Option copy
|
||||
for cmd in create install update
|
||||
__fish_conda $cmd -l copy -d 'Install all packages using copies instead of hard- or soft-linking'
|
||||
end
|
||||
|
||||
# Option download-only
|
||||
for cmd in create install update
|
||||
__fish_conda $cmd -l download-only -d 'Solve an environment: populate caches but no linking/unlinking into prefix'
|
||||
end
|
||||
|
||||
# Option dry-run
|
||||
for cmd in create install remove update
|
||||
__fish_conda $cmd -l dry-run -d 'Only display what would have been done'
|
||||
end
|
||||
|
||||
# Option file
|
||||
for cmd in create install update
|
||||
__fish_conda $cmd -l file -d 'Read package versions from the given file'
|
||||
end
|
||||
|
||||
# Option force
|
||||
for cmd in create install remove update
|
||||
__fish_conda $cmd -l force -d 'Force install (even when package already installed)'
|
||||
end
|
||||
|
||||
# Option insecure
|
||||
for cmd in create install remove search update
|
||||
__fish_conda $cmd -l insecure -d 'Allow conda to perform "insecure" SSL connections and transfers'
|
||||
end
|
||||
|
||||
# Option mkdir
|
||||
for cmd in create install update
|
||||
__fish_conda $cmd -l mkdir -d 'Create the environment directory if necessary'
|
||||
end
|
||||
|
||||
# Option name
|
||||
__fish_conda create -s n -l name -d "Name of new environment"
|
||||
for cmd in install list remove search update
|
||||
__fish_conda $cmd -s n -l name -x -a "(__fish_conda_environments)" -d "Name of existing environment"
|
||||
end
|
||||
|
||||
# Option no-channel-priority
|
||||
for cmd in create install update
|
||||
__fish_conda $cmd -l no-channel-priority -l no-channel-pri -l no-chan-pri -d 'Package version takes precedence over channel priority'
|
||||
end
|
||||
|
||||
# Option no-default-packages
|
||||
__fish_conda create -l no-default-packages -d 'Ignore create_default_packages in the .condarc file'
|
||||
|
||||
# Option no-deps
|
||||
for cmd in create install update
|
||||
__fish_conda $cmd -l no-deps -d 'Do not install, update, remove, or change dependencies'
|
||||
end
|
||||
|
||||
# Option no-pin
|
||||
for cmd in create install remove update
|
||||
__fish_conda $cmd -l no-pin -d 'Ignore pinned file'
|
||||
end
|
||||
|
||||
# Option no-show-channel-urls
|
||||
for cmd in create install list update
|
||||
__fish_conda $cmd -l no-show-channel-urls -d "Don't show channel urls"
|
||||
end
|
||||
|
||||
# Option no-update-dependencies
|
||||
for cmd in create install update
|
||||
__fish_conda $cmd -l no-update-dependencies -l no-update-deps -d "Don't update dependencies"
|
||||
end
|
||||
|
||||
# Option offline
|
||||
for cmd in create install remove search update
|
||||
__fish_conda $cmd -l offline -d "Offline mode, don't connect to the Internet"
|
||||
end
|
||||
|
||||
# Option only-deps
|
||||
for cmd in create install update
|
||||
__fish_conda $cmd -l only-deps -d "Only install dependencies"
|
||||
end
|
||||
|
||||
# Option override-channels
|
||||
for cmd in create install remove search update
|
||||
__fish_conda $cmd -l override-channels -d "Do not search default or .condarc channels"
|
||||
end
|
||||
|
||||
# Option prefix
|
||||
for cmd in create install list remove search update
|
||||
__fish_conda $cmd -s p -l prefix -d "Full path to environment prefix"
|
||||
end
|
||||
|
||||
# Option quiet
|
||||
for cmd in create install remove update
|
||||
__fish_conda $cmd -s q -l quiet -d "Do not display progress bar"
|
||||
end
|
||||
|
||||
# Option show-channel-urls
|
||||
for cmd in create install list update
|
||||
__fish_conda $cmd -l show-channel-urls -d "Show channel urls"
|
||||
end
|
||||
|
||||
# Option update-dependencies
|
||||
for cmd in create install update
|
||||
__fish_conda $cmd -l update-dependencies -l update-deps -d "Update dependencies"
|
||||
end
|
||||
|
||||
# Option use-index-cache
|
||||
for cmd in create install remove search update
|
||||
__fish_conda $cmd -s C -l use-index-cache -d "Use cache of channel index files, even if it has expired"
|
||||
end
|
||||
|
||||
# Option use-local
|
||||
for cmd in create install remove search update
|
||||
__fish_conda $cmd -l use-local -d "Use locally built packages"
|
||||
end
|
||||
|
||||
# Option yes
|
||||
for cmd in create install remove update
|
||||
__fish_conda $cmd -s y -l yes -d "Do not ask for confirmation"
|
||||
end
|
||||
|
||||
# Option revision
|
||||
__fish_conda install -l revision -d "Revert to the specified REVISION"
|
||||
|
||||
# Option canonical
|
||||
__fish_conda list -s c -l canonical -d "Output canonical names of packages only. Implies --no-pip"
|
||||
|
||||
# Option explicit
|
||||
__fish_conda list -l explicit -d "List explicitly all installed conda with URL (output usable by conda create --file)"
|
||||
|
||||
# Option export
|
||||
__fish_conda list -s e -l export -d "Output requirement string only (output usable by conda create --file)"
|
||||
|
||||
# Option full-name
|
||||
__fish_conda list -s f -l full-name -d "Only search for full names, i.e., ^<regex>\$"
|
||||
|
||||
# Option md5
|
||||
__fish_conda list -l md5 -d "Add MD5 hashsum when using --explicit"
|
||||
|
||||
# Option no-pip
|
||||
__fish_conda list -s c -l canonical -d "Output canonical names of packages only. Implies --no-pip"
|
||||
|
||||
# Option revisions
|
||||
__fish_conda list -s r -l revisions -d "List the revision history and exit"
|
||||
|
||||
# Option all
|
||||
__fish_conda remove -l all -d "Remove all packages, i.e., the entire environment"
|
||||
__fish_conda update -l all -d "Update all installed packages in the environment"
|
||||
|
||||
# Option features
|
||||
__fish_conda remove -l features -d "Remove features (instead of packages)"
|
||||
|
||||
# Option info
|
||||
__fish_conda search -s i -l info -d "Provide detailed information about each package"
|
||||
|
||||
# Option platform
|
||||
set -l __fish_conda_platforms {osx,linux,win}-{32,64}
|
||||
__fish_conda search -l platform -x -a "$__fish_conda_platforms" -d "Search the given platform"
|
||||
|
||||
# Option reverse-dependency
|
||||
__fish_conda search -l reverse-dependency -d "Perform a reverse dependency search"
|
|
@ -10,3 +10,7 @@ complete -c configure -l exec-prefix -d "Architecture-dependent install director
|
|||
complete -c configure -l build -d "Configure for building on BUILD" -x
|
||||
complete -c configure -l host -d "Cross-compile to build programs to run on HOST" -x
|
||||
complete -c configure -l target -d "Configure for building compilers for TARGET" -x
|
||||
|
||||
# use autoconf's --help to generate completions:
|
||||
echo "sourcing configure completions"
|
||||
complete -c 'configure' -a '(__fish_parse_configure (commandline | string replace -r "(.*configure) .*" "\$1"))'
|
||||
|
|
|
@ -20,4 +20,4 @@ complete -c cower -f -s v -l 'verbose' -d 'Output more'
|
|||
|
||||
# Complete with AUR packages:
|
||||
# If the search string is too short, cower prints an annoying message to stderr - ignore that
|
||||
complete -c cower -f -n 'not string match -q -- "-*" (commandline --current-token)' -a '(cower --format="%n\t%d\n" --search (commandline --current-token) ^/dev/null)'
|
||||
complete -c cower -f -n 'not string match -q -- "-*" (commandline --current-token)' -a '(cower --format="%n\t%d\n" --search (commandline --current-token) 2>/dev/null)'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
if cp --version ^ /dev/null > /dev/null # GNU
|
||||
if cp --version 2>/dev/null > /dev/null # GNU
|
||||
complete -c cp -s a -l archive -d "Same as -dpR"
|
||||
complete -c cp -s b -l backup -d "Make backup of each existing destination file" -a "none off numbered t existing nil simple never"
|
||||
complete -c cp -l copy-contents -d "Copy contents of special files when recursive"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
if date --version > /dev/null ^ /dev/null
|
||||
if date --version > /dev/null 2>/dev/null
|
||||
complete -c date -s d -l date -d "Display date described by string" -x
|
||||
complete -c date -s f -l file -d "Display date for each line in file" -r
|
||||
complete -c date -s I -l iso-8601 -d "Output in ISO 8601 format" -x -a "date hours minutes seconds"
|
||||
|
|
|
@ -7,7 +7,7 @@ function __fish_dconf_keys
|
|||
# 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
|
||||
dconf dump / 2>/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)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#
|
||||
|
||||
set -l is_gnu
|
||||
df --version >/dev/null ^/dev/null; and set is_gnu --is-gnu
|
||||
df --version >/dev/null 2>/dev/null; and set is_gnu --is-gnu
|
||||
|
||||
__fish_gnu_complete -c df -s h -l human-readable -d "Human readable sizes" $is_gnu
|
||||
__fish_gnu_complete -c df -s i -l inodes -d "List inode information" $is_gnu
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
# First parameter is the profile name, or 'usage'
|
||||
complete --command duply --no-files --condition '__fish_is_first_token' --arguments '(/bin/ls /etc/duply ^/dev/null) (/bin/ls ~/.duply ^/dev/null)' -d 'Profile'
|
||||
complete --command duply --no-files --condition '__fish_is_first_token' --arguments '(/bin/ls /etc/duply 2>/dev/null) (/bin/ls ~/.duply 2>/dev/null)' -d 'Profile'
|
||||
complete --command duply --no-files --arguments 'usage' -d 'Get usage help text'
|
||||
|
||||
# Second parameter is a duply command
|
||||
|
|
35
share/completions/ebuild.fish
Normal file
35
share/completions/ebuild.fish
Normal file
|
@ -0,0 +1,35 @@
|
|||
function __fish_seen_ebuild_arg -d "Test if an ebuild-argument has been given in the current commandline"
|
||||
commandline -opc | string match -q '*.ebuild'
|
||||
end
|
||||
|
||||
## Opts
|
||||
complete -c ebuild -l debug -d "Run bash with the -x option"
|
||||
complete -c ebuild -l color -d "Enable color" \
|
||||
-xa "y n"
|
||||
complete -c ebuild -l force -d "Force regeneration of digests"
|
||||
complete -c ebuild -l ignore-default-opts -d "Ignore EBUILD_DEFAULT_OPTS"
|
||||
complete -c ebuild -l skip-manifest -d "Skip all manifest checks"
|
||||
|
||||
## Subcommands
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'help' -d "Show help"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'setup' -d "Run setup and system checks"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'clean' -d "Clean build dir"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'fetch' -d "Fetches all files from SRC_URI"
|
||||
#complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'digest' -d "Deprecared: see manifest"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'manifest' -d "Update pkg manifest"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'unpack' -d "Extracts sources"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'prepare' -d "Run src_prepare()"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'configure' -d "Run src_configure()"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'compile' -d "Run src_compile()"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'test' -d "Run tests"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'preinst' -d "Run pkg_preinst()"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'install' -d "Run src_install()"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'postinst' -d "Run pkg_postinst()"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'qmerge' -d "Install files to live filesystem"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'merge' -d "Run fetch, unpack, compile, install and qmerge"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'unmerge' -d "Uninstall files from live filesystem"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'prerm' -d "Run pkg_prerm()"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'postrm' -d "Run pkg_postrm()"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'config' -d "Run post-install configuration"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'package' -d "Create a binpkg in PKGDIR"
|
||||
complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'rpm' -d "Builds a RedHat RPM pkg"
|
|
@ -11,7 +11,7 @@ complete -c emacs -l no-site-file -d "do not load site-start.el"
|
|||
complete -c emacs -l no-site-lisp -o nsl -d "do not add site-lisp directories to load-path"
|
||||
complete -c emacs -l no-splash -d "do not display a splash screen on startup"
|
||||
complete -c emacs -l no-window-system -o nw -d "do not communicate with X, ignoring $DISPLAY"
|
||||
complete -c emacs -l quick -s Q -d "equivalent to: emacs -l --no-site-file --no-site-lisp --no-splash"
|
||||
complete -c emacs -l quick -s Q -d "equivalent to: emacs -q --no-site-file --no-splash"
|
||||
complete -c emacs -l script -d "run FILE as an Emacs Lisp script"
|
||||
complete -c emacs -l terminal -s t -d "use DEVICE for terminal I/O"
|
||||
complete -c emacs -l user -s u -d "load ~USER/.emacs instead of your own"
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
# TODO unused
|
||||
function __fish_equery_print_format
|
||||
printf "%s\t%s\n" \
|
||||
'$cp' "contains the category and the package name only (e.g 'app-portage/gentoolkit')" \
|
||||
'$cpv' "contains the category, the package name and the full version (e.g. 'app-portage/gentoolkit-0.3.0_rc10-r1')" \
|
||||
'$category' "contains just the category (e.g. 'app-portage')" \
|
||||
'$name' "contains just the package name (e.g. 'gentoolkit')" \
|
||||
'$version' "contains the package version (without the revision) (e.g. '0.3.0_rc10')" \
|
||||
'$revision' "contains the package revision (e.g. 'r1')" \
|
||||
'$fullversion' "contains the package version including its revision (e.g. '0.3.0_rc10-r1')" \
|
||||
'$slot' "contains the package's slot" \
|
||||
'$repo' "contains the name of the package's repository (e.g. 'gentoo')" \
|
||||
'$mask' "the mask-status field (~M-??)" \
|
||||
'$mask2' "contains a verbose description of the packages masking status" \
|
||||
'$location' "the location field (IPO-)"
|
||||
'$cp' "Category and package name (e.g 'app-portage/gentoolkit')" \
|
||||
'$cpv' "Category, package name and version (e.g. 'app-portage/gentoolkit-0.3.0_rc10-r1')" \
|
||||
'$category' "Category (e.g. 'app-portage')" \
|
||||
'$name' "Package name (e.g. 'gentoolkit')" \
|
||||
'$version' "Version (without the revision) (e.g. '0.3.0_rc10')" \
|
||||
'$revision' "Revision (e.g. 'r1')" \
|
||||
'$fullversion' "Version including revision (e.g. '0.3.0_rc10-r1')" \
|
||||
'$slot' "Slot" \
|
||||
'$repo' "Repository (e.g. 'gentoo')" \
|
||||
'$mask' "Mask-status field (~M-??)" \
|
||||
'$mask2' "Verbose description of the masking status" \
|
||||
'$location' "Location field (IPO-)"
|
||||
end
|
||||
|
||||
## Global Opts
|
||||
|
@ -23,101 +23,112 @@ complete -c equery -s N -l no-pipe -d "Turns off pipe detection"
|
|||
complete -c equery -s V -l version -d "Display version information"
|
||||
|
||||
## Subcommands
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'belongs' -d "List all packages owning file(s)"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'belongs' -d "List all pkgs owning file(s)"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'changes' -d "List changelog entries for ATOM"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'check' -d "Check MD5sums and timestamps of package"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'depends' -d "List all packages depending on specified package"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'depgraph' -d "Display a dependency tree for package"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'files' -d "List files owned by package"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'check' -d "Check pkg's MD5sums and timestamps"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'depends' -d "List all pkgs depending on specified pkg"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'depgraph' -d "Display pkg's dependency tree"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'files' -d "List files owned by pkg"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'has' -d "List pkgs for matching ENVIRONMENT data"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'hasuse' -d "List pkgs with specified useflag"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'keywords' -d "Display keywords for specified PKG"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'list' -d "List all packages matching pattern"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'meta' -d "Display metadata about PKG"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'size' -d "Print size of files contained in package"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'uses' -d "Display USE flags for package"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'which' -d "Print full path to ebuild for package"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'keywords' -d "Display pkg's keywords"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'list' -d "List all pkgs matching pattern"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'meta' -d "Display pkg's metadata"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'size' -d "Print size of files contained in pkg"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'uses' -d "Display pkg's USE flags"
|
||||
complete -c equery -n '__fish_use_subcommand' -xa 'which' -d "Print full path to ebuild for pkg"
|
||||
|
||||
## Arguments
|
||||
complete -c equery -n '__fish_seen_subcommand_from changes depends depgraph meta which' -xa '(__fish_portage_print_available_pkgs)'
|
||||
complete -c equery -n '__fish_seen_subcommand_from check files uses size' -xa '(__fish_portage_print_installed_pkgs)'
|
||||
complete -c equery -n '__fish_seen_subcommand_from c changes d depends g depgraph y keywords m meta u uses w which' \
|
||||
-xa '(__fish_portage_print_available_pkgs)'
|
||||
complete -c equery -n '__fish_seen_subcommand_from k check f files s size' \
|
||||
-xa '(__fish_portage_print_installed_pkgs)'
|
||||
|
||||
## Local opts
|
||||
# belongs
|
||||
complete -c equery -n '__fish_seen_subcommand_from belongs' -s f -l full-regex -d "Supplied query is a regex"
|
||||
complete -c equery -n '__fish_seen_subcommand_from belongs' -s e -l early-out -d "Stop when first match is found"
|
||||
complete -c equery -n '__fish_seen_subcommand_from belongs' -s n -l name-only -d "Don't print the version"
|
||||
complete -c equery -n '__fish_seen_subcommand_from b belongs' -s f -l full-regex -d "Supplied query is a regex"
|
||||
complete -c equery -n '__fish_seen_subcommand_from b belongs' -s e -l early-out -d "Stop after first match"
|
||||
complete -c equery -n '__fish_seen_subcommand_from b belongs' -s n -l name-only -d "Omit version"
|
||||
|
||||
# changes
|
||||
complete -c equery -n '__fish_seen_subcommand_from changes' -s l -l latest -d "Display only the latest ChangeLog entry"
|
||||
complete -c equery -n '__fish_seen_subcommand_from changes' -s f -l full -d "Display the full ChangeLog"
|
||||
#complete -c equery -n '__fish_seen_subcommand_from changes' -l limit=NUM -d "Limit the number of entries displayed (with --full)"
|
||||
#complete -c equery -n '__fish_seen_subcommand_from changes' -l from=VER -d "Set which version to display from"
|
||||
#complete -c equery -n '__fish_seen_subcommand_from changes' -l to=VER -d "Set which version to display to"
|
||||
complete -c equery -n '__fish_seen_subcommand_from c changes' -s l -l latest -d "Display only latest ChangeLog entry"
|
||||
complete -c equery -n '__fish_seen_subcommand_from c changes' -s f -l full -d "Display full ChangeLog"
|
||||
complete -c equery -n '__fish_seen_subcommand_from c changes' -l limit -d "Limit number of entries displayed (with --full)" \
|
||||
-xa "(seq 99)"
|
||||
#complete -c equery -n '__fish_seen_subcommand_from c changes' -l from=VER -d "Set which version to display from"
|
||||
#complete -c equery -n '__fish_seen_subcommand_from c changes' -l to=VER -d "Set which version to display to"
|
||||
|
||||
# check
|
||||
complete -c equery -n '__fish_seen_subcommand_from check' -s f -l full-regex -d "Query is a regular expression"
|
||||
complete -c equery -n '__fish_seen_subcommand_from check' -s o -l only-failures -d "Only display packages that do not pass"
|
||||
complete -c equery -n '__fish_seen_subcommand_from k check' -s f -l full-regex -d "Query is a regular expression"
|
||||
complete -c equery -n '__fish_seen_subcommand_from k check' -s o -l only-failures -d "Only display pkgs that do not pass"
|
||||
|
||||
# depends
|
||||
complete -c equery -n '__fish_seen_subcommand_from depends' -s a -l all-packages -d "Include dependencies that are not installed (slow)"
|
||||
complete -c equery -n '__fish_seen_subcommand_from depends' -s D -l indirect -d "Search both direct and indirect dependencies"
|
||||
#complete -c equery -n '__fish_seen_subcommand_from depends' -l depth=N -d "Limit indirect dependency tree to specified depth"
|
||||
complete -c equery -n '__fish_seen_subcommand_from d depends' -s a -l all-packages -d "Include dependencies that are not installed (slow)"
|
||||
complete -c equery -n '__fish_seen_subcommand_from d depends' -s D -l indirect -d "Search both direct and indirect dependencies"
|
||||
complete -c equery -n '__fish_seen_subcommand_from d depends' -l depth -d "Limit indirect dependency tree to specified depth" \
|
||||
-xa "(seq 9)"
|
||||
|
||||
# depgraph
|
||||
complete -c equery -n '__fish_seen_subcommand_from depgraph' -s A -l no-atom -d "Do not show dependency atom"
|
||||
complete -c equery -n '__fish_seen_subcommand_from depgraph' -s M -l no-mask -d "Do not show masking status"
|
||||
complete -c equery -n '__fish_seen_subcommand_from depgraph' -s U -l no-useflags -d "Do not show USE flags"
|
||||
complete -c equery -n '__fish_seen_subcommand_from depgraph' -s l -l linear -d "Do not format the graph by indenting dependencies"
|
||||
#complete -c equery -n '__fish_seen_subcommand_from depgraph' -l depth=N -d "Limit dependency graph to specified depth"
|
||||
complete -c equery -n '__fish_seen_subcommand_from g depgraph' -s A -l no-atom -d "Don't show dependency atom"
|
||||
complete -c equery -n '__fish_seen_subcommand_from g depgraph' -s M -l no-mask -d "Don't show masking status"
|
||||
complete -c equery -n '__fish_seen_subcommand_from g depgraph' -s U -l no-useflags -d "Don't show USE flags"
|
||||
complete -c equery -n '__fish_seen_subcommand_from g depgraph' -s l -l linear -d "Don't indent dependencies"
|
||||
complete -c equery -n '__fish_seen_subcommand_from g depgraph' -l depth -d "Limit dependency graph to specified depth" \
|
||||
-xa "(seq 9)"
|
||||
|
||||
# files
|
||||
complete -c equery -n '__fish_seen_subcommand_from files' -s m -l md5sum -d "Include MD5 sum in output"
|
||||
complete -c equery -n '__fish_seen_subcommand_from files' -s s -l timestamp -d "Include timestamp in output"
|
||||
complete -c equery -n '__fish_seen_subcommand_from files' -s t -l type -d "Include file type in output"
|
||||
complete -c equery -n '__fish_seen_subcommand_from files' -l tree -d "Display results in a tree (turns off other options)"
|
||||
# TODO comma separated list
|
||||
complete -c equery -n '__fish_seen_subcommand_from files' -s f -l filter -d "Filter output by file type (comma separated list)" \
|
||||
-xa "dir obj sym dev fifo path conf cmd doc man info"
|
||||
function __fish_equery_files_filter_args
|
||||
printf "%s\n" dir obj sym dev fifo path conf cmd doc man info
|
||||
end
|
||||
complete -c equery -n '__fish_seen_subcommand_from f files' -s m -l md5sum -d "Include MD5 sum in output"
|
||||
complete -c equery -n '__fish_seen_subcommand_from f files' -s s -l timestamp -d "Include timestamp in output"
|
||||
complete -c equery -n '__fish_seen_subcommand_from f files' -s t -l type -d "Include file type in output"
|
||||
complete -c equery -n '__fish_seen_subcommand_from f files' -l tree -d "Display results in a tree"
|
||||
complete -c equery -n '__fish_seen_subcommand_from f files' -s f -l filter -d "Filter output by file type" \
|
||||
-xa "(__fish_complete_list , __fish_equery_files_filter_args)"
|
||||
|
||||
# has + hasuse
|
||||
complete -c equery -n '__fish_seen_subcommand_from has hasuse' -s I -l exclude-installed -d "Exclude installed packages from search path"
|
||||
complete -c equery -n '__fish_seen_subcommand_from has hasuse' -s o -l overlay-tree -d "Include overlays in search path"
|
||||
complete -c equery -n '__fish_seen_subcommand_from has hasuse' -s p -l portage-tree -d "Include entire portage tree in search path"
|
||||
#complete -c equery -n '__fish_seen_subcommand_from has hasuse' -s F -l format=TMPL -d "Specify a custom output format"
|
||||
complete -c equery -n '__fish_seen_subcommand_from a has h hasuse' -s I -l exclude-installed -d "Exclude installed pkgs from search path"
|
||||
complete -c equery -n '__fish_seen_subcommand_from a has h hasuse' -s o -l overlay-tree -d "Include overlays in search path"
|
||||
complete -c equery -n '__fish_seen_subcommand_from a has h hasuse' -s p -l portage-tree -d "Include entire portage tree in search path"
|
||||
#complete -c equery -n '__fish_seen_subcommand_from a has h hasuse' -s F -l format=TMPL -d "Specify a custom output format"
|
||||
|
||||
# keywords
|
||||
# TODO
|
||||
|
||||
# list
|
||||
complete -c equery -n '__fish_seen_subcommand_from list' -s d -l duplicates -d "List only installed duplicate packages"
|
||||
complete -c equery -n '__fish_seen_subcommand_from list' -s b -l binpkgs-missing -d "List only installed packages without a corresponding binary package"
|
||||
complete -c equery -n '__fish_seen_subcommand_from list' -s f -l full-regex -d "Query is a regular expression"
|
||||
complete -c equery -n '__fish_seen_subcommand_from list' -s m -l mask-reason -d "Include reason for package mask"
|
||||
complete -c equery -n '__fish_seen_subcommand_from list' -s I -l exclude-installed -d "Exclude installed packages from output"
|
||||
complete -c equery -n '__fish_seen_subcommand_from list' -s o -l overlay-tree -d "List packages in overlays"
|
||||
complete -c equery -n '__fish_seen_subcommand_from list' -s p -l portage-tree -d "List packages in the main portage tree"
|
||||
#complete -c equery -n '__fish_seen_subcommand_from list' -s F -l format=TMPL -d "Specify a custom output format"
|
||||
complete -c equery -n '__fish_seen_subcommand_from l list' -s d -l duplicates -d "List only installed duplicate pkgs"
|
||||
complete -c equery -n '__fish_seen_subcommand_from l list' -s b -l binpkgs-missing -d "List only installed pkgs without a corresponding binary pkg"
|
||||
complete -c equery -n '__fish_seen_subcommand_from l list' -s f -l full-regex -d "Query is a regular expression"
|
||||
complete -c equery -n '__fish_seen_subcommand_from l list' -s m -l mask-reason -d "Include reason for pkg mask"
|
||||
complete -c equery -n '__fish_seen_subcommand_from l list' -s I -l exclude-installed -d "Exclude installed pkgs from output"
|
||||
complete -c equery -n '__fish_seen_subcommand_from l list' -s o -l overlay-tree -d "List pkgs in overlays"
|
||||
complete -c equery -n '__fish_seen_subcommand_from l list' -s p -l portage-tree -d "List pkgs in the main portage tree"
|
||||
#complete -c equery -n '__fish_seen_subcommand_from l list' -s F -l format=TMPL -d "Specify a custom output format"
|
||||
complete -c equery -n '__fish_seen_subcommand_from l list; and not __fish_contains_opt -s p portage-tree' \
|
||||
-xa "(__fish_portage_print_installed_pkgs)"
|
||||
complete -c equery -n '__fish_seen_subcommand_from l list; and __fish_contains_opt -s p portage-tree' \
|
||||
-xa "(__fish_portage_print_available_pkgs)"
|
||||
|
||||
# meta
|
||||
complete -c equery -n '__fish_seen_subcommand_from meta' -s d -l description -d "Show an extended package description"
|
||||
complete -c equery -n '__fish_seen_subcommand_from meta' -s H -l herd -d "Show the herd(s) for the package"
|
||||
complete -c equery -n '__fish_seen_subcommand_from meta' -s k -l keywords -d "Show keywords for all matching package versions"
|
||||
complete -c equery -n '__fish_seen_subcommand_from meta' -s l -l license -d "Show licenses for the best maching version"
|
||||
complete -c equery -n '__fish_seen_subcommand_from meta' -s m -l maintainer -d "Show the maintainer(s) for the package"
|
||||
complete -c equery -n '__fish_seen_subcommand_from meta' -s S -l stablreq -d "Show STABLEREQ arches (cc's) for all matching package versions"
|
||||
complete -c equery -n '__fish_seen_subcommand_from meta' -s u -l useflags -d "Show per-package USE flag descriptions"
|
||||
complete -c equery -n '__fish_seen_subcommand_from meta' -s U -l upstream -d "Show package's upstream information"
|
||||
complete -c equery -n '__fish_seen_subcommand_from meta' -s x -l xml -d "Show the plain metadata.xml file"
|
||||
complete -c equery -n '__fish_seen_subcommand_from m meta' -s d -l description -d "Show an extended pkg description"
|
||||
complete -c equery -n '__fish_seen_subcommand_from m meta' -s H -l herd -d "Show pkg's herd(s)"
|
||||
complete -c equery -n '__fish_seen_subcommand_from m meta' -s k -l keywords -d "Show keywords for all matching pkg versions"
|
||||
complete -c equery -n '__fish_seen_subcommand_from m meta' -s l -l license -d "Show licenses for the best maching version"
|
||||
complete -c equery -n '__fish_seen_subcommand_from m meta' -s m -l maintainer -d "Show the maintainer(s) for the pkg"
|
||||
complete -c equery -n '__fish_seen_subcommand_from m meta' -s S -l stablreq -d "Show STABLEREQ arches (cc's) for all matching pkg versions"
|
||||
complete -c equery -n '__fish_seen_subcommand_from m meta' -s u -l useflags -d "Show per-pkg USE flag descriptions"
|
||||
complete -c equery -n '__fish_seen_subcommand_from m meta' -s U -l upstream -d "Show pkg's upstream information"
|
||||
complete -c equery -n '__fish_seen_subcommand_from m meta' -s x -l xml -d "Show the plain metadata.xml file"
|
||||
|
||||
# size
|
||||
complete -c equery -n '__fish_seen_subcommand_from size' -s b -l bytes -d "Report size in bytes"
|
||||
complete -c equery -n '__fish_seen_subcommand_from size' -s f -l full-regex -d "Query is a regular expression"
|
||||
complete -c equery -n '__fish_seen_subcommand_from s size' -s b -l bytes -d "Report size in bytes"
|
||||
complete -c equery -n '__fish_seen_subcommand_from s size' -s f -l full-regex -d "Query is a regular expression"
|
||||
|
||||
# uses
|
||||
complete -c equery -n '__fish_seen_subcommand_from uses' -s a -l all -d "Include all package versions"
|
||||
complete -c equery -n '__fish_seen_subcommand_from uses' -s i -l ignore-l10n -d "Don't show l10n USE flags"
|
||||
complete -c equery -n '__fish_seen_subcommand_from u uses' -s a -l all -d "Include all pkg versions"
|
||||
complete -c equery -n '__fish_seen_subcommand_from u uses' -s i -l ignore-l10n -d "Don't show l10n USE flags"
|
||||
|
||||
# which
|
||||
complete -c equery -n '__fish_seen_subcommand_from which' -s m -l include-masked -d "Return highest version ebuild available"
|
||||
complete -c equery -n '__fish_seen_subcommand_from which' -s e -l ebuild -d "Print the ebuild"
|
||||
complete -c equery -n '__fish_seen_subcommand_from w which' -s m -l include-masked -d "Return highest version ebuild available"
|
||||
complete -c equery -n '__fish_seen_subcommand_from w which' -s e -l ebuild -d "Print the ebuild"
|
||||
|
|
|
@ -19,7 +19,7 @@ function __fish_complete_eselect_action_options
|
|||
|
||||
# Alter further php completion
|
||||
if [ (__fish_print_cmd_args_without_options)[2] = 'php' ]
|
||||
eselect php list-modules ^/dev/null | string split " "
|
||||
eselect php list-modules 2>/dev/null | string split " "
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -38,7 +38,7 @@ function __fish_complete_eselect_php_actions
|
|||
set -l sedregexp 's/^\s*\[([0-9]+)\]\s+([A-Za-z0-9\.]+).*/\1\t\2/'
|
||||
|
||||
if test (__fish_print_cmd_args_without_options)[3] = 'set'
|
||||
eselect php list (__fish_print_cmd_args_without_options)[-1] ^/dev/null | sed -r $sedregexp
|
||||
eselect php list (__fish_print_cmd_args_without_options)[-1] 2>/dev/null | sed -r $sedregexp
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# http://www.fossil-scm.org/
|
||||
|
||||
function __fish_fossil
|
||||
command fossil $argv ^/dev/null
|
||||
command fossil $argv 2>/dev/null
|
||||
end
|
||||
|
||||
function __fish_fossil_needs_command
|
||||
|
|
|
@ -6,33 +6,49 @@ function __fish_git_commits
|
|||
# This allows filtering by subject with the new pager!
|
||||
# Because even subject lines can be quite long,
|
||||
# trim them (abbrev'd hash+tab+subject) to 73 characters
|
||||
command git log --pretty=tformat:"%h"\t"%s" --all --max-count=1000 ^/dev/null \
|
||||
| string replace -r '(.{73}).+' '$1…'
|
||||
#
|
||||
# Hashes we just truncate ourselves to 10 characters, without disambiguating.
|
||||
# That technically means that sometimes we don't give usable SHAs,
|
||||
# but according to https://stackoverflow.com/a/37403152/3150338,
|
||||
# that happens for 3 commits out of 600k.
|
||||
# For fish, at the time of writing, out of 12200 commits, 7 commits need 8 characters.
|
||||
# And since this takes about 1/3rd of the time that disambiguating takes...
|
||||
command git log --pretty=tformat:"%H"\t"%<(64,trunc)%s" --all --max-count=1000 2>/dev/null \
|
||||
| string replace -r '^([0-9a-f]{10})[0-9a-f]*\t(.*)' '$1\t$2'
|
||||
end
|
||||
|
||||
function __fish_git_recent_commits
|
||||
# Like __fish_git_commits, but not on all branches and limited to
|
||||
# the last 50 commits. Used for fixup, where only the current branch
|
||||
# and the latest commits make sense.
|
||||
command git log --pretty=tformat:"%h"\t"%s" --max-count=50 ^/dev/null \
|
||||
| string replace -r '(.{73}).+' '$1…'
|
||||
command git log --pretty=tformat:"%h"\t"%<(64,trunc)%s" --max-count=50 2>/dev/null
|
||||
end
|
||||
|
||||
function __fish_git_branches
|
||||
command git branch --no-color -a $argv ^/dev/null \
|
||||
# Filter out detached heads and such ("(HEAD detached at SOMESHA)", localized).
|
||||
| string match -v '\* (*)' | string match -r -v ' -> ' | string trim -c "* " \
|
||||
# We assume anything that's not remote is a local branch.
|
||||
| string replace -r '^(?!remotes/)(.*)' '$1\tLocal Branch' \
|
||||
| string replace -r "^remotes/(.*)" '$1\tRemote Branch'
|
||||
# This is much faster than using `git branch`,
|
||||
# and avoids having to deal with localized "detached HEAD" messages.
|
||||
command git for-each-ref --format='%(refname)' refs/heads/ refs/remotes/ \
|
||||
| string replace -r '^refs/heads/(.*)$' '$1\tLocal Branch' \
|
||||
| string replace -r '^refs/remotes/(.*)$' '$1\tRemote Branch'
|
||||
end
|
||||
|
||||
function __fish_git_unique_remote_branches
|
||||
# `git checkout` accepts remote branches without the remote part
|
||||
# if they are unambiguous.
|
||||
# E.g. if only alice has a "frobulate" branch
|
||||
# `git checkout frobulate` is equivalent to `git checkout -b frobulate --track alice/frobulate`.
|
||||
command git for-each-ref --format="%(refname:strip=3)" \
|
||||
--sort="refname:strip=3" \
|
||||
"refs/remotes/*/$match*" "refs/remotes/*/*/**" | \
|
||||
uniq -u
|
||||
end
|
||||
|
||||
function __fish_git_tags
|
||||
command git tag --sort=-creatordate ^/dev/null
|
||||
command git tag --sort=-creatordate 2>/dev/null
|
||||
end
|
||||
|
||||
function __fish_git_dir
|
||||
command git rev-parse --git-dir ^/dev/null
|
||||
command git rev-parse --git-dir 2>/dev/null
|
||||
end
|
||||
|
||||
function __fish_git_heads
|
||||
|
@ -51,7 +67,7 @@ function __fish_git_refs
|
|||
end
|
||||
|
||||
function __fish_git_remotes
|
||||
command git remote ^/dev/null
|
||||
command git remote 2>/dev/null
|
||||
end
|
||||
|
||||
function __fish_git_files
|
||||
|
@ -72,7 +88,9 @@ function __fish_git_files
|
|||
# to get _all_ kinds of staged files.
|
||||
|
||||
# Save the repo root to remove it from the path later.
|
||||
set -l root (command git rev-parse --show-toplevel ^/dev/null)
|
||||
set -l root (command git rev-parse --show-toplevel 2>/dev/null)
|
||||
# Do not continue if not inside a Git repository
|
||||
or return
|
||||
|
||||
# Cache the translated descriptions so we don't have to get it
|
||||
# once per file.
|
||||
|
@ -126,6 +144,13 @@ function __fish_git_files
|
|||
# A " " means it's unmodified.
|
||||
#
|
||||
# Be careful about the ordering here!
|
||||
#
|
||||
# HACK: To allow this to work both with and without '?' globs
|
||||
set -l dq '\\?\\?'
|
||||
if status test-feature qmark-noglob
|
||||
# ? is not a glob
|
||||
set dq '??'
|
||||
end
|
||||
switch "$stat"
|
||||
case DD AU UD UA DU AA UU
|
||||
# Unmerged
|
||||
|
@ -146,28 +171,28 @@ function __fish_git_files
|
|||
# Otherwise it's an untracked file.
|
||||
contains -- added $argv; or contains -- all-staged $argv
|
||||
and printf '%s\t%s\n' "$file" $added_desc
|
||||
case '?M'
|
||||
case '*M'
|
||||
# Modified
|
||||
contains -- modified $argv
|
||||
and printf '%s\t%s\n' "$file" $modified_desc
|
||||
case 'M?'
|
||||
case 'M*'
|
||||
# If the character is first ("M "), then that means it's "our" change,
|
||||
# which means it is staged.
|
||||
# This is useless for many commands - e.g. `checkout` won't do anything with this.
|
||||
# So it needs to be requested explicitly.
|
||||
contains -- modified-staged $argv; or contains -- all-staged $argv
|
||||
and printf '%s\t%s\n' "$file" $staged_modified_desc
|
||||
case '?D'
|
||||
case '*D'
|
||||
contains -- deleted $argv
|
||||
and printf '%s\t%s\n' "$file" $deleted_desc
|
||||
case 'D?'
|
||||
case 'D*'
|
||||
# TODO: The docs are unclear on this.
|
||||
# There is both X unmodified and Y either M or D ("not updated")
|
||||
# and Y is D and X is unmodified or [MARC] ("deleted in work tree").
|
||||
# For our purposes, we assume this is a staged deletion.
|
||||
contains -- deleted-staged $argv; or contains -- all-staged $argv
|
||||
and printf '%s\t%s\n' "$file" $staged_deleted_desc
|
||||
case '\?\?'
|
||||
case "$dq" # a literal '??'
|
||||
# Untracked
|
||||
contains -- untracked $argv
|
||||
and printf '%s\t%s\n' "$file" $untracked_desc
|
||||
|
@ -245,9 +270,6 @@ end
|
|||
# but a command can be aliased multiple times)
|
||||
git config -z --get-regexp 'alias\..*' | while read -lz alias command _
|
||||
# Git aliases can contain chars that variable names can't - escape them.
|
||||
if test (count $command) -ne 1
|
||||
printf (_ "Warning: alias '%s' has more than one command: '%s'") $alias "$command" >&2
|
||||
end
|
||||
set alias (string replace 'alias.' '' -- $alias | string escape --style=var)
|
||||
set -g __fish_git_alias_$alias $command
|
||||
end
|
||||
|
@ -292,11 +314,11 @@ function __fish_git_stash_not_using_subcommand
|
|||
end
|
||||
|
||||
function __fish_git_complete_stashes
|
||||
command git stash list --format=%gd:%gs ^/dev/null | string replace ":" \t
|
||||
command git stash list --format=%gd:%gs 2>/dev/null | string replace ":" \t
|
||||
end
|
||||
|
||||
function __fish_git_aliases
|
||||
command git config -z --get-regexp '^alias\.' ^/dev/null | while read -lz key value
|
||||
command git config -z --get-regexp '^alias\.' 2>/dev/null | while read -lz key value
|
||||
begin
|
||||
set -l name (string replace -r '^.*\.' '' -- $key)
|
||||
printf "%s\t%s\n" $name "Alias for $value"
|
||||
|
@ -349,14 +371,77 @@ function __fish_git_possible_commithash
|
|||
end
|
||||
|
||||
function __fish_git_reflog
|
||||
command git reflog --no-decorate ^/dev/null | string replace -r '[0-9a-f]* (.+@\{[0-9]+\}): (.*)$' '$1\t$2'
|
||||
command git reflog --no-decorate 2>/dev/null | string replace -r '[0-9a-f]* (.+@\{[0-9]+\}): (.*)$' '$1\t$2'
|
||||
end
|
||||
|
||||
function __fish_git_diff_opt -a option
|
||||
switch $option
|
||||
case diff-algorithm
|
||||
printf "%b" "
|
||||
default\tBasic greedy diff algorithm
|
||||
myers\tBasic greedy diff algorithm
|
||||
minimal\tMake smallest diff possible
|
||||
patience\tPatience diff algorithm
|
||||
histogram\tPatience algorithm with low-occurrence common elements"
|
||||
case diff-filter
|
||||
printf "%b" "
|
||||
A\tAdded files
|
||||
C\tCopied files
|
||||
D\tDeleted files
|
||||
M\tModified files
|
||||
R\tRenamed files
|
||||
T\tType changed files
|
||||
U\tUnmerged files
|
||||
X\tUnknown files
|
||||
B\tBroken pairing files"
|
||||
case dirstat
|
||||
printf "%b" "
|
||||
changes\tCount lines that have been removed from the source / added to the destination
|
||||
lines\tRegular line-based diff analysis
|
||||
files\tCount the number of files changed
|
||||
cumulative\tCount changes in a child directory for the parent directory as well"
|
||||
case ignore-submodules
|
||||
printf "%b" "
|
||||
none\tUntracked/modified files
|
||||
untracked\tNot considered dirty when they only contain untracked content
|
||||
dirty\tIgnore all changes to the work tree of submodules
|
||||
all\tHide all changes to submodules (default)"
|
||||
case submodule
|
||||
printf "%b" "
|
||||
short\tShow the name of the commits at the beginning and end of the range
|
||||
log\tList the commits in the range
|
||||
diff\tShow an inline diff of the changes"
|
||||
case ws-error-highlight
|
||||
printf "%b" "
|
||||
context\tcontext lines of the diff
|
||||
old\told lines of the diff
|
||||
new\tnew lines of the diff
|
||||
none\treset previous values
|
||||
default\treset the list to 'new'
|
||||
all\tShorthand for 'old,new,context'"
|
||||
end
|
||||
end
|
||||
|
||||
function __fish_git_show_opt -a option
|
||||
switch $option
|
||||
case format pretty
|
||||
printf "%b" "
|
||||
oneline\t<sha1> <title line>
|
||||
short\t<sha1> / <author> / <title line>
|
||||
medium\t<sha1> / <author> / <author date> / <title> / <commit msg>
|
||||
full\t<sha1> / <author> / <committer> / <title> / <commit msg>
|
||||
fuller\t<sha1> / <author> / <author date> / <committer> / <committer date> / <title> / <commit msg>
|
||||
email\t<sha1> <date> / <author> / <author date> / <title> / <commit msg>
|
||||
raw\tShow the entire commit exactly as stored in the commit object
|
||||
format:\tSpecify which information to show"
|
||||
end
|
||||
end
|
||||
|
||||
# general options
|
||||
complete -f -c git -l help -d 'Display the manual of a git command'
|
||||
complete -f -c git -n '__fish_git_needs_command' -l version -d 'Display version'
|
||||
complete -x -c git -n '__fish_git_needs_command' -s C -a '(__fish_complete_directories)' -d 'Run as if git was started in this directory'
|
||||
complete -x -c git -n '__fish_git_needs_command' -s c -a '(command git config -l ^/dev/null | string replace = \t)' -d 'Set a configuration option'
|
||||
complete -x -c git -n '__fish_git_needs_command' -s c -a '(command git config -l 2>/dev/null | string replace = \t)' -d 'Set a configuration option'
|
||||
complete -x -c git -n '__fish_git_needs_command' -l exec-path -a '(__fish_git_complete_directories)' -d 'Get or set the path to the git programs'
|
||||
complete -f -c git -n '__fish_git_needs_command' -l html-path -d 'Print the path to the html documentation'
|
||||
complete -f -c git -n '__fish_git_needs_command' -l man-path -d 'Print the path to the man documentation'
|
||||
|
@ -374,7 +459,72 @@ complete -f -c git -n '__fish_git_needs_command' -l noglob-pathspecs -d "Don't t
|
|||
complete -f -c git -n '__fish_git_needs_command' -l icase-pathspecs -d 'Match pathspecs case-insensitively'
|
||||
|
||||
# Options shared between multiple commands
|
||||
complete -f -c git -n '__fish_git_using_command log show diff-tree rev-list' -l pretty -a 'oneline short medium full fuller email raw format:'
|
||||
complete -f -c git -n '__fish_git_using_command log show diff-tree rev-list' -l pretty -a '(__fish_git_show_opt pretty)'
|
||||
|
||||
complete -c git -n '__fish_git_using_command diff show' -l abbrev -d 'Show only a partial prefix instead of the full 40-byte hexadecimal object name'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l binary -d 'Output a binary diff that can be applied with "git-apply"'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l check -d 'Warn if changes introduce conflict markers or whitespace errors'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l color -d 'Show colored diff'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l color-moved -d 'Moved lines of code are colored differently'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l color-words -d 'Equivalent to --word-diff=color plus --word-diff-regex=<regex>'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l compact-summary -d 'Output a condensed summary of extended header information'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l dst-prefix -d 'Show the given destination prefix instead of "b/"'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l ext-diff -d 'Allow an external diff helper to be executed'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l find-copies-harder -d 'Inspect unmodified files as candidates for the source of copy'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l find-object -d 'Look for differences that change the number of occurrences of the specified object'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l full-index -d 'Show the full pre- and post-image blob object names on the "index" line'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l histogram -d 'Generate a diff using the "histogram diff" algorithm'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l ignore-blank-lines -d 'Ignore changes whose lines are all blank'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l ignore-cr-at-eol -d 'Ignore carrige-return at the end of line when doing a comparison'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l ignore-space-at-eol -d 'Ignore changes in whitespace at EOL'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l indent-heuristic -d 'Enable the heuristic that shift diff hunk boundaries'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l inter-hunk-context -d 'Show the context between diff hunks, up to the specified number of lines'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l ita-invisible-in-index -d 'Make the entry appear as a new file in "git diff" and non-existent in "git diff -l cached"'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l line-prefix -d 'Prepend an additional prefix to every line of output'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l minimal -d 'Spend extra time to make sure the smallest possible diff is produced'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l name-only -d 'Show only names of changed files'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l name-status -d 'Show only names and status of changed files'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l no-color -d 'Turn off colored diff'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l no-ext-diff -d 'Disallow external diff drivers'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l no-indent-heuristic -d 'Disable the indent heuristic'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l no-prefix -d 'Do not show any source or destination prefix'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l no-renames -d 'Turn off rename detection'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l no-textconv -d 'Disallow external text conversion filters to be run when comparing binary files'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l numstat -d 'Shows number of added/deleted lines in decimal notation'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l patch-with-raw -d 'Synonym for -p --raw'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l patch-with-stat -d 'Synonym for -p --stat'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l patience -d 'Generate a diff using the "patience diff" algorithm'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l pickaxe-all -d 'When -S or -G finds a change, show all the changes in that changeset'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l pickaxe-regex -d 'Treat the <string> given to -S as an extended POSIX regular expression to match'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l relative -d 'Exclude changes outside the directory and show relative pathnames'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l shortstat -d 'Output only the last line of the --stat format containing total number of modified files'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l src-prefix -d 'Show the given source prefix instead of "a/"'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l stat -d 'Generate a diffstat'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l summary -d 'Output a condensed summary of extended header information'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l textconv -d 'Allow external text conversion filters to be run when comparing binary files'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l word-diff -d 'Show a word diff'
|
||||
complete -c git -n '__fish_git_using_command diff show' -l word-diff-regex -d 'Use <regex> to decide what a word is'
|
||||
complete -c git -n '__fish_git_using_command diff show' -s a -l text -d 'Treat all files as text'
|
||||
complete -c git -n '__fish_git_using_command diff show' -s B -l break-rewrites -d 'Break complete rewrite changes into pairs of delete and create'
|
||||
complete -c git -n '__fish_git_using_command diff show' -s b -l ignore-space-change -d 'Ignore changes in amount of whitespace'
|
||||
complete -c git -n '__fish_git_using_command diff show' -s C -l find-copies -d 'Detect copies as well as renames'
|
||||
complete -c git -n '__fish_git_using_command diff show' -s D -l irreversible-delete -d 'Omit the preimage for deletes'
|
||||
complete -c git -n '__fish_git_using_command diff show' -s G -d 'Look for differences whose patch text contains added/removed lines that match <regex>'
|
||||
complete -c git -n '__fish_git_using_command diff show' -s M -l find-renames -d 'Detect and report renames'
|
||||
complete -c git -n '__fish_git_using_command diff show' -s R -d 'Show differences from index or on-disk file to tree contents'
|
||||
complete -c git -n '__fish_git_using_command diff show' -s S -d 'Look for differences that change the number of occurrences of the specified string'
|
||||
complete -c git -n '__fish_git_using_command diff show' -s W -l function-context -d 'Show whole surrounding functions of changes'
|
||||
complete -c git -n '__fish_git_using_command diff show' -s w -l ignore-all-space -d 'Ignore whitespace when comparing lines'
|
||||
complete -c git -n '__fish_git_using_command diff show' -s z -d 'Use NULs as output field/commit terminators'
|
||||
complete -r -c git -n '__fish_git_using_command diff show' -s O -d 'Control the order in which files appear in the output'
|
||||
complete -f -c git -n '__fish_git_using_command diff show' -l anchored -d 'Generate a diff using the "anchored diff" algorithm'
|
||||
complete -x -c git -n '__fish_git_using_command diff show' -s l -d 'Prevents rename/copy detection if the number of rename/copy targets exceeds the specified number'
|
||||
complete -x -c git -n '__fish_git_using_command diff show' -l diff-filter -a '(__fish_git_diff_opt diff-filter)' -d 'Choose diff filters'
|
||||
complete -x -c git -n '__fish_git_using_command diff log show' -l diff-algorithm -a '(__fish_git_diff_opt diff-algorithm)' -d 'Choose a diff algorithm'
|
||||
complete -x -c git -n '__fish_git_using_command diff log show' -l dirstat -a '(__fish_git_diff_opt dirstat)' -d 'Output the distribution of relative amount of changes for each sub-directory'
|
||||
complete -x -c git -n '__fish_git_using_command diff log show' -l ignore-submodules -a '(__fish_git_diff_opt ignore-submodules)' -d 'Ignore changes to submodules in the diff generation'
|
||||
complete -x -c git -n '__fish_git_using_command diff log show' -l submodule -a '(__fish_git_diff_opt submodule)' -d 'Specify how differences in submodules are shown'
|
||||
complete -x -c git -n '__fish_git_using_command diff log show' -l ws-error-highlight -a '(__fish_git_diff_opt ws-error-highlight)' -d 'Highlight whitespace errors in lines of the diff'
|
||||
|
||||
#### fetch
|
||||
complete -f -c git -n '__fish_git_needs_command' -a fetch -d 'Download objects and refs from another repository'
|
||||
|
@ -391,13 +541,13 @@ complete -f -c git -n '__fish_git_using_command fetch' -s f -l force -d 'Force u
|
|||
#### filter-branch
|
||||
complete -f -c git -n '__fish_git_needs_command' -a filter-branch -d 'Rewrite branches'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l env-filter -d 'This filter may be used if you only need to modify the environment'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l tree-filter -d 'This is the filter for rewriting the tree and its contents.'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l index-filter -d 'This is the filter for rewriting the index.'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l parent-filter -d 'This is the filter for rewriting the commit\\(cqs parent list.'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l msg-filter -d 'This is the filter for rewriting the commit messages.'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l commit-filter -d 'This is the filter for performing the commit.'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l tag-name-filter -d 'This is the filter for rewriting tag names.'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l subdirectory-filter -d 'Only look at the history which touches the given subdirectory.'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l tree-filter -d 'This is the filter for rewriting the tree and its contents'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l index-filter -d 'This is the filter for rewriting the index'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l parent-filter -d 'This is the filter for rewriting the commit'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l msg-filter -d 'This is the filter for rewriting the commit messages'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l commit-filter -d 'This is the filter for performing the commit'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l tag-name-filter -d 'This is the filter for rewriting tag names'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l subdirectory-filter -d 'Only look at the history which touches the given subdirectory'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l prune-empty -d 'Ignore empty commits generated by filters'
|
||||
complete -f -c git -n '__fish_git_using_command filter-branch' -l original -d 'Use this option to set the namespace where the original commits will be stored'
|
||||
complete -r -c git -n '__fish_git_using_command filter-branch' -s d -d 'Use this option to set the path to the temporary directory used for rewriting'
|
||||
|
@ -433,8 +583,17 @@ complete -f -c git -n '__fish_git_needs_command' -a show -d 'Shows the last comm
|
|||
complete -f -c git -n '__fish_git_using_command show' -a '(__fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command show' -a '(__fish_git_tags)' -d 'Tag'
|
||||
complete -f -c git -n '__fish_git_using_command show' -a '(__fish_git_commits)'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l stat -d 'Generate a diffstat, showing the number of changed lines of each file'
|
||||
# TODO options
|
||||
complete -f -c git -n '__fish_git_using_command show' -l format -d 'Pretty-print the contents of the commit logs in a given format' -a '(__fish_git_show_opt format)'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l abbrev-commit -d 'Show only a partial hexadecimal commit object name'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l no-abbrev-commit -d 'Show the full 40-byte hexadecimal commit object name'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l oneline -d 'Shorthand for "--pretty=oneline --abbrev-commit"'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l encoding -d 'Re-code the commit log message in the encoding'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l expand-tabs -d 'Perform a tab expansion in the log message'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l no-expand-tabs -d 'Do not perform a tab expansion in the log message'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l notes -a '(__fish_git_refs)' -d 'Show the notes that annotate the commit'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l no-notes -d 'Do not show notes'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l show-signature -d 'Check the validity of a signed commit object'
|
||||
|
||||
|
||||
### show-branch
|
||||
complete -f -c git -n '__fish_git_needs_command' -a show-branch -d 'Shows the commits on branches'
|
||||
|
@ -462,9 +621,10 @@ complete -f -c git -n '__fish_git_using_command add' -a '(__fish_git_files modif
|
|||
|
||||
### checkout
|
||||
complete -f -c git -n '__fish_git_needs_command' -a checkout -d 'Checkout and switch to a branch'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_branches)'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_heads)' -d 'Head'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_tags)' -d 'Tag'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -op)' -a '(__fish_git_branches)'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -op)' -a '(__fish_git_heads)' -d 'Head'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -op)' -a '(__fish_git_tags)' -d 'Tag'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -op)' -a '(__fish_git_unique_remote_branches)' -d 'Unique Remote Branch'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_files modified deleted)'
|
||||
complete -f -c git -n '__fish_git_using_command checkout' -s b -d 'Create a new branch'
|
||||
complete -f -c git -n '__fish_git_using_command checkout' -s t -l track -d 'Track a new branch'
|
||||
|
@ -535,14 +695,39 @@ complete -c git -n '__fish_git_needs_command' -a diff -d 'Show changes between c
|
|||
complete -c git -n '__fish_git_using_command diff' -a '(__fish_git_ranges)'
|
||||
complete -c git -n '__fish_git_using_command diff' -l cached -d 'Show diff of changes in the index'
|
||||
complete -c git -n '__fish_git_using_command diff' -l no-index -d 'Compare two paths on the filesystem'
|
||||
complete -c git -n '__fish_git_using_command diff' -l exit-code -d 'Exit with 1 if there were differences or 0 if no differences'
|
||||
complete -c git -n '__fish_git_using_command diff' -s q -l quiet -d 'Disable all output of the program, implies --exit-code'
|
||||
complete -c git -n '__fish_git_using_command diff' -s 1 -l base -d 'Compare the working tree with the "base" version'
|
||||
complete -c git -n '__fish_git_using_command diff' -s 2 -l ours -d 'Compare the working tree with the "our branch"'
|
||||
complete -c git -n '__fish_git_using_command diff' -s 3 -l theirs -d 'Compare the working tree with the "their branch"'
|
||||
complete -c git -n '__fish_git_using_command diff' -s 0 -d 'Omit diff output for unmerged entries and just show "Unmerged"'
|
||||
complete -f -c git -n '__fish_git_using_command diff' -a '(__fish_git_files modified deleted)'
|
||||
# TODO options
|
||||
|
||||
### Function to list available tools for git difftool and mergetool
|
||||
|
||||
function __fish_git_diffmerge_tools -a cmd
|
||||
git $cmd --tool-help | \
|
||||
while read -l line
|
||||
string match -q 'The following tools are valid, but not currently available:' -- $line
|
||||
and break
|
||||
string replace -f -r '^\t\t(\w+).*$' '$1' -- $line
|
||||
end
|
||||
end
|
||||
|
||||
### difftool
|
||||
complete -c git -n '__fish_git_needs_command' -a difftool -d 'Open diffs in a visual tool'
|
||||
complete -c git -n '__fish_git_using_command difftool' -a '(__fish_git_ranges)'
|
||||
complete -c git -n '__fish_git_using_command difftool' -l cached -d 'Visually show diff of changes in the index'
|
||||
complete -f -c git -n '__fish_git_using_command difftool' -a '(__fish_git_files modified deleted)'
|
||||
complete -f -c git -n '__fish_git_using_command difftool' -s g -l gui -d 'Use `diff.guitool` instead of `diff.tool`'
|
||||
complete -f -c git -n '__fish_git_using_command difftool' -s d -l dir-diff -d 'Perform a full-directory diff'
|
||||
complete -c git -n '__fish_git_using_command difftool' -l prompt -d 'Prompt before each invocation of the diff tool'
|
||||
complete -f -c git -n '__fish_git_using_command difftool' -s y -l no-prompt -d 'Do not prompt before launching a diff tool'
|
||||
complete -f -c git -n '__fish_git_using_command difftool' -l symlinks -d 'Use symlinks in dir-diff mode'
|
||||
complete -f -c git -n '__fish_git_using_command difftool' -s t -l tool -d 'Use the specified diff tool' -a "(__fish_git_diffmerge_tools difftool)"
|
||||
complete -f -c git -n '__fish_git_using_command difftool' -l tool-help -d 'Print a list of diff tools that may be used with `--tool`'
|
||||
complete -f -c git -n '__fish_git_using_command difftool' -l trust-exit-code -d 'Exit when an invoked diff tool returns a non-zero exit code'
|
||||
complete -f -c git -n '__fish_git_using_command difftool' -s x -l extcmd -d 'Specify a custom command for viewing diffs'
|
||||
# TODO options
|
||||
|
||||
|
||||
|
@ -681,23 +866,14 @@ complete -c git -n '__fish_git_using_command log' -l no-compaction-heuristic
|
|||
complete -c git -n '__fish_git_using_command log' -l minimal
|
||||
complete -c git -n '__fish_git_using_command log' -l patience
|
||||
complete -c git -n '__fish_git_using_command log' -l histogram
|
||||
complete -x -c git -n '__fish_git_using_command log' -l diff-algorithm -a '
|
||||
default\tBasic\ greedy\ diff\ algorithm
|
||||
myers\tBasic\ greedy\ diff\ algorithm
|
||||
minimal\tMake\ smallest\ diff\ possible
|
||||
patience\tPatience\ diff\ algorithm
|
||||
histogram\tPatience\ algorithm\ with\ low-occurrence\ common\ elements
|
||||
'
|
||||
complete -f -x -c git -n '__fish_git_using_command log' -l stat
|
||||
complete -c git -n '__fish_git_using_command log' -l numstat
|
||||
complete -c git -n '__fish_git_using_command log' -l shortstat
|
||||
complete -f -c git -n '__fish_git_using_command log' -l dirstat -a '(__fish_append , changes lines files cumulative)'
|
||||
complete -c git -n '__fish_git_using_command log' -l summary
|
||||
complete -c git -n '__fish_git_using_command log' -l patch-with-stat
|
||||
complete -c git -n '__fish_git_using_command log' -s z
|
||||
complete -c git -n '__fish_git_using_command log' -l name-only
|
||||
complete -c git -n '__fish_git_using_command log' -l name-status
|
||||
complete -f -c git -n '__fish_git_using_command log' -l submodule -a 'short diff log'
|
||||
complete -f -c git -n '__fish_git_using_command log' -l color -a 'always never auto'
|
||||
complete -c git -n '__fish_git_using_command log' -l no-color
|
||||
complete -f -c git -n '__fish_git_using_command log' -l word-diff -a '
|
||||
|
@ -709,7 +885,6 @@ complete -f -c git -n '__fish_git_using_command log' -l word-diff -a '
|
|||
complete -f -c git -n '__fish_git_using_command log' -l color-words
|
||||
complete -c git -n '__fish_git_using_command log' -l no-renames
|
||||
complete -c git -n '__fish_git_using_command log' -l check
|
||||
complete -f -c git -n '__fish_git_using_command log' -l ws-error-highlight -a '(__fish_append , old new context)'
|
||||
complete -c git -n '__fish_git_using_command log' -l full-index
|
||||
complete -c git -n '__fish_git_using_command log' -l binary
|
||||
complete -f -c git -n '__fish_git_using_command log' -l abbrev
|
||||
|
@ -721,8 +896,8 @@ complete -c git -n '__fish_git_using_command log' -l irreversible-delete -s D
|
|||
complete -f -c git -n '__fish_git_using_command log' -s l
|
||||
|
||||
function __fish__git_append_letters_nosep
|
||||
set -l token (commandline -tc)
|
||||
printf "%s\n" $token$argv
|
||||
set -l token (commandline -tc)
|
||||
printf "%s\n" $token$argv
|
||||
end
|
||||
|
||||
complete -x -c git -n '__fish_git_using_command log' -l diff-filter -a '(__fish__git_append_letters_nosep a\tExclude\ added c\tExclude\ copied d\tExclude\ deleted m\tExclude\ modified r\tExclude\ renamed t\tExclude\ type\ changed u\tExclude\ unmerged x\tExclude\ unknown b\tExclude\ broken A\tAdded C\tCopied D\tDeleted M\tModified R\tRenamed T\tType\ Changed U\tUnmerged X\tUnknown B\tBroken)'
|
||||
|
@ -744,12 +919,6 @@ complete -c git -n '__fish_git_using_command log' -l ext-diff
|
|||
complete -c git -n '__fish_git_using_command log' -l no-ext-diff
|
||||
complete -c git -n '__fish_git_using_command log' -l textconv
|
||||
complete -c git -n '__fish_git_using_command log' -l no-textconv
|
||||
complete -f -c git -n '__fish_git_using_command log' -l ignore-submodules -a '
|
||||
none
|
||||
untracked
|
||||
dirty
|
||||
all
|
||||
'
|
||||
complete -x -c git -n '__fish_git_using_command log' -l src-prefix
|
||||
complete -x -c git -n '__fish_git_using_command log' -l dst-prefix
|
||||
complete -c git -n '__fish_git_using_command log' -l no-prefix
|
||||
|
@ -761,41 +930,44 @@ complete -f -c git -n '__fish_git_needs_command' -a merge -d 'Join two or more d
|
|||
complete -f -c git -n '__fish_git_using_command merge' -a '(__fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l commit -d "Autocommit the merge"
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l no-commit -d "Don't autocommit the merge"
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l edit -d 'Edit auto-generated merge message'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -s e -l edit -d 'Edit auto-generated merge message'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l no-edit -d "Don't edit auto-generated merge message"
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l ff -d "Don't generate a merge commit if merge is fast-forward"
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l no-ff -d "Generate a merge commit even if merge is fast-forward"
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l ff-only -d 'Refuse to merge unless fast-forward possible'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -s S -l gpg-sign -d 'GPG-sign the merge commit'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l log -d 'Populate the log message with one-line descriptions'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l no-log -d "Don't populate the log message with one-line descriptions"
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l signoff -d 'Add Signed-off-by line at the end of the merge commit message'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l no-signoff -d 'Do not add a Signed-off-by line at the end of the merge commit message'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l stat -d "Show diffstat of the merge"
|
||||
complete -f -c git -n '__fish_git_using_command merge' -s n -l no-stat -d "Don't show diffstat of the merge"
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l squash -d "Squash changes from other branch as a single commit"
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l no-squash -d "Don't squash changes"
|
||||
complete -x -c git -n '__fish_git_using_command merge' -s s -l strategy -d 'Use the given merge strategy'
|
||||
complete -r -c git -n '__fish_git_using_command merge' -s X -l strategy-option -d 'Pass given option to the merge strategy'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l verify-signatures -d 'Abort merge if other branch tip commit is not signed with a valid key'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l no-verify-signatures -d 'Do not abort merge if other branch tip commit is not signed with a valid key'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -s q -l quiet -d 'Be quiet'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -s v -l verbose -d 'Be verbose'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l progress -d 'Force progress status'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l no-progress -d 'Force no progress status'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -s m -d 'Set the commit message'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l allow-unrelated-histories -d 'Allow merging even when branches do not share a common history'
|
||||
complete -x -c git -n '__fish_git_using_command merge' -s m -d 'Set the commit message'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -s rerere-autoupdate -d 'If possible, use previous conflict resolutions'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -s no-rerere-autoupdate -d 'Do not use previous conflict resolutions'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l abort -d 'Abort the current conflict resolution process'
|
||||
|
||||
# TODO options
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l continue -d 'Conclude current conflict resolution process'
|
||||
|
||||
### mergetool
|
||||
|
||||
function __fish_git_mergetools
|
||||
set -l tools diffuse diffmerge ecmerge emerge kdiff3 meld opendiff tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc codecompare
|
||||
for tool in $tools
|
||||
if command -sq $tool
|
||||
echo "$tool"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
complete -f -c git -n '__fish_git_needs_command' -a mergetool -d 'Run merge conflict resolution tools to resolve merge conflicts'
|
||||
complete -f -c git -n '__fish_git_using_command mergetool' -s t -l tool -d "Use specific merge resolution program" -a "(__fish_git_mergetools)"
|
||||
complete -f -c git -n '__fish_git_using_command mergetool' -s t -l tool -d "Use specific merge resolution program" -a "(__fish_git_diffmerge_tools mergetool)"
|
||||
complete -f -c git -n '__fish_git_using_command mergetool' -l tool-help -d 'Print a list of merge tools that may be used with `--tool`'
|
||||
complete -f -c git -n '__fish_git_using_command mergetool' -a "(__fish_git_files unmerged)"
|
||||
|
||||
complete -f -c git -n '__fish_git_using_command mergetool' -s y -l no-prompt -d 'Do not prompt before launching a diff tool'
|
||||
complete -f -c git -n '__fish_git_using_command mergetool' -l 'prompt' -d 'Prompt before each invocation of the merge resolution program'
|
||||
complete -c git -n '__fish_git_using_command mergetool' -s O -d 'Process files in the order specified in the file passed as argument'
|
||||
|
||||
### mv
|
||||
complete -c git -n '__fish_git_needs_command' -a mv -d 'Move or rename a file, a directory, or a symlink'
|
||||
|
@ -819,6 +991,32 @@ complete -f -c git -n '__fish_git_using_command pull' -l no-tags -d 'Disable aut
|
|||
complete -f -c git -n '__fish_git_using_command pull' -l progress -d 'Force progress status'
|
||||
complete -f -c git -n '__fish_git_using_command pull; and not __fish_git_branch_for_remote' -a '(__fish_git_remotes)' -d 'Remote alias'
|
||||
complete -f -c git -n '__fish_git_using_command pull; and __fish_git_branch_for_remote' -a '(__fish_git_branch_for_remote)'
|
||||
# Options related to merging
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l commit -d "Autocommit the merge"
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l no-commit -d "Don't autocommit the merge"
|
||||
complete -f -c git -n '__fish_git_using_command pull' -s e -l edit -d 'Edit auto-generated merge message'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l no-edit -d "Don't edit auto-generated merge message"
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l ff -d "Don't generate a merge commit if merge is fast-forward"
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l no-ff -d "Generate a merge commit even if merge is fast-forward"
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l ff-only -d 'Refuse to merge unless fast-forward possible'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -s S -l gpg-sign -d 'GPG-sign the merge commit'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l log -d 'Populate the log message with one-line descriptions'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l no-log -d "Don't populate the log message with one-line descriptions"
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l signoff -d 'Add Signed-off-by line at the end of the merge commit message'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l no-signoff -d 'Do not add a Signed-off-by line at the end of the merge commit message'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l stat -d "Show diffstat of the merge"
|
||||
complete -f -c git -n '__fish_git_using_command pull' -s n -l no-stat -d "Don't show diffstat of the merge"
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l squash -d "Squash changes from upstream branch as a single commit"
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l no-squash -d "Don't squash changes"
|
||||
complete -x -c git -n '__fish_git_using_command pull' -s s -l strategy -d 'Use the given merge strategy'
|
||||
complete -r -c git -n '__fish_git_using_command pull' -s X -l strategy-option -d 'Pass given option to the merge strategy'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l verify-signatures -d 'Abort merge if upstream branch tip commit is not signed with a valid key'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l no-verify-signatures -d 'Do not abort merge if upstream branch tip commit is not signed with a valid key'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l allow-unrelated-histories -d 'Allow merging even when branches do not share a common history'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -s r -l rebase -d 'Rebase the current branch on top of the upstream branch'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l no-rebase -d 'Do not rebase the current branch on top of the upstream branch'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l autostash -d 'Before starting rebase, stash local changes, and apply stash when done'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l no-autostash -d 'Do not stash local changes before starting rebase'
|
||||
# TODO other options
|
||||
|
||||
### push
|
||||
|
@ -879,9 +1077,10 @@ complete -f -c git -n '__fish_git_using_command reset' -l hard -d 'Reset files i
|
|||
complete -c git -n '__fish_git_using_command reset' -a '(__fish_git_branches)'
|
||||
# reset can either undo changes to versioned modified files,
|
||||
# or remove files from the staging area.
|
||||
# TODO: Deleted files seem to need a "--" separator.
|
||||
complete -f -c git -n '__fish_git_using_command reset' -a '(__fish_git_files all-staged modified)'
|
||||
complete -f -c git -n '__fish_git_using_command reset' -a '(__fish_git_reflog)' -d 'Reflog'
|
||||
# Deleted files seem to need a "--" separator.
|
||||
complete -f -c git -n '__fish_git_using_command reset; and not contains -- -- (commandline -op)' -a '(__fish_git_files all-staged modified)'
|
||||
complete -f -c git -n '__fish_git_using_command reset; and contains -- -- (commandline -op)' -a '(__fish_git_files all-staged deleted modified)'
|
||||
complete -f -c git -n '__fish_git_using_command reset; and not contains -- -- (commandline -op)' -a '(__fish_git_reflog)' -d 'Reflog'
|
||||
# TODO options
|
||||
|
||||
### revert
|
||||
|
|
|
@ -48,7 +48,7 @@ function __cache_or_get_gradle_completion
|
|||
set -l hashed_pwd (fish_md5 -s $PWD)
|
||||
set -l gradle_cache_file $XDG_CACHE_HOME/gradle-completions/$hashed_pwd
|
||||
if not test -f $gradle_cache_file; or command test build.gradle -nt $gradle_cache_file
|
||||
command gradle -q tasks ^/dev/null | string match -r '^[[:alnum:]]+ - .*' | string replace ' - ' \t > $gradle_cache_file
|
||||
command gradle -q tasks 2>/dev/null | string match -r '^[[:alnum:]]+ - .*' | string replace ' - ' \t > $gradle_cache_file
|
||||
end
|
||||
cat $gradle_cache_file
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
# https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
|
||||
|
||||
function __grunt_print_tasks
|
||||
set -l tasks (grunt --version --verbose ^/dev/null | awk '/Available tasks: / {$1=$2=""; print $0}' | awk '{$1=$1}1' | tr ' ' '\n')
|
||||
set -l tasks (grunt --version --verbose 2>/dev/null | awk '/Available tasks: / {$1=$2=""; print $0}' | awk '{$1=$1}1' | tr ' ' '\n')
|
||||
for t in $tasks
|
||||
echo $t
|
||||
end
|
||||
|
|
|
@ -27,11 +27,11 @@ function __fish_complete_gsettings_args
|
|||
|
||||
if not set -q cmd[2]
|
||||
# Non-relocatable schemas
|
||||
gsettings $schemadir list-schemas ^/dev/null
|
||||
gsettings $schemadir list-schemas 2>/dev/null
|
||||
|
||||
# Relocatable schemas require a dconf path, but there is no universal way of
|
||||
# finding the right paths to suggest here. Just default to '/'.
|
||||
gsettings $schemadir list-relocatable-schemas ^/dev/null | string replace -r \$ ':/'
|
||||
gsettings $schemadir list-relocatable-schemas 2>/dev/null | string replace -r \$ ':/'
|
||||
return 0
|
||||
end
|
||||
|
||||
|
@ -42,7 +42,7 @@ function __fish_complete_gsettings_args
|
|||
set -l schema $cmd[2]
|
||||
|
||||
if not set -q cmd[3]
|
||||
gsettings $schemadir list-keys $schema ^/dev/null
|
||||
gsettings $schemadir list-keys $schema 2>/dev/null
|
||||
return 0
|
||||
end
|
||||
|
||||
|
@ -52,7 +52,7 @@ function __fish_complete_gsettings_args
|
|||
|
||||
if not set -q cmd[4]
|
||||
set -l key $cmd[3]
|
||||
set -l range (gsettings $schemadir range $schema $key ^/dev/null)
|
||||
set -l range (gsettings $schemadir range $schema $key 2>/dev/null)
|
||||
set -l key_type $range[1]
|
||||
set -e range[1]
|
||||
switch $key_type
|
||||
|
@ -64,7 +64,7 @@ function __fish_complete_gsettings_args
|
|||
case '*'
|
||||
# If no sensible suggestions can be made, just use the current value.
|
||||
# It gives a good indication on the expected format and is likely already close to what the user wants.
|
||||
gsettings $schemadir get $schema $key ^/dev/null
|
||||
gsettings $schemadir get $schema $key 2>/dev/null
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
if head --version >/dev/null ^/dev/null
|
||||
if head --version >/dev/null 2>/dev/null
|
||||
complete -c head -s c -l bytes -d 'Print the first N bytes; Leading '-', truncate the last N bytes' -r
|
||||
complete -c head -s n -l lines -d 'Print the first N lines; Leading '-', truncate the last N lines' -r
|
||||
complete -c head -s q -l quiet -l silent -d 'Never print file names'
|
||||
|
|
|
@ -68,7 +68,7 @@ function __helm_subcommands -a cmd
|
|||
end
|
||||
|
||||
function __helm_kube_contexts
|
||||
kubectl config get-contexts -o name ^/dev/null
|
||||
kubectl config get-contexts -o name 2>/dev/null
|
||||
end
|
||||
|
||||
function __helm_kube_namespaces
|
||||
|
@ -76,11 +76,11 @@ function __helm_kube_namespaces
|
|||
end
|
||||
|
||||
function __helm_releases
|
||||
helm ls --short ^/dev/null
|
||||
helm ls --short 2>/dev/null
|
||||
end
|
||||
|
||||
function __helm_release_completions
|
||||
helm ls ^/dev/null | awk 'NR >= 2 { print $1"\tRelease of "$NF }'
|
||||
helm ls 2>/dev/null | awk 'NR >= 2 { print $1"\tRelease of "$NF }'
|
||||
end
|
||||
|
||||
function __helm_release_revisions
|
||||
|
|
|
@ -38,7 +38,6 @@ complete -c help -x -a history-search -d 'Searchable history'
|
|||
complete -c help -x -a identifiers -d 'Shell variable and function names'
|
||||
complete -c help -x -a initialization -d 'Initialization files'
|
||||
complete -c help -x -a introduction -d 'Introduction'
|
||||
complete -c help -x -a issues -d 'Common issues with fish'
|
||||
complete -c help -x -a job-control -d 'Running multiple programs'
|
||||
complete -c help -x -a killring -d 'Copy and paste (Kill Ring)'
|
||||
complete -c help -x -a more-help -d 'Further help and development'
|
||||
|
|
|
@ -34,7 +34,7 @@ function __fish_hg
|
|||
if set -l cwd (__fish_hg_get_cwd)
|
||||
set argv $argv --cwd $cwd
|
||||
end
|
||||
command hg $argv ^ /dev/null
|
||||
command hg $argv 2>/dev/null
|
||||
end
|
||||
|
||||
function __fish_hg_commands
|
||||
|
|
|
@ -10,6 +10,8 @@ complete -c history -n '__fish_seen_subcommand_from search delete' \
|
|||
-s e -l exact -d "Match items identical to the string"
|
||||
complete -c history -n '__fish_seen_subcommand_from search delete' \
|
||||
-s t -l show-time -d "Output with timestamps"
|
||||
complete -c history -n '__fish_seen_subcommand_from search delete' \
|
||||
-s C -l case-sensitive -d "Match items in a case-sensitive manner"
|
||||
complete -c history -n '__fish_seen_subcommand_from search' \
|
||||
-s n -l max -d "Limit output to the first 'n' matches"
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ function __fish_iptables_user_chains
|
|||
set tablearg "--table=$table"
|
||||
end
|
||||
# This only works as root, so ignore errors
|
||||
iptables $tablearg -L ^/dev/null | grep Chain | while read a b c
|
||||
iptables $tablearg -L 2>/dev/null | grep Chain | while read a b c
|
||||
echo $b
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,4 +7,6 @@ function __history_completions --argument limit
|
|||
history --prefix (commandline) | string replace -r \^$tokens[1]\\s\* "" | head -n$limit
|
||||
end
|
||||
|
||||
# erase the stock autojump completions, which are no longer needed with this
|
||||
complete -c j -e
|
||||
complete -k -c j -a '(__history_completions 25)' -f
|
||||
|
|
|
@ -17,13 +17,13 @@ end
|
|||
|
||||
function __fish_journalctl_field_values
|
||||
set -l token (commandline -t | cut -d"=" -f 1)
|
||||
command journalctl -F $token ^ /dev/null | while read value
|
||||
command journalctl -F $token 2>/dev/null | while read value
|
||||
echo $token=$value
|
||||
end
|
||||
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 '(command journalctl -F _EXE 2>/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
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ end
|
|||
|
||||
complete -c kill -xa '(__fish_complete_pids)'
|
||||
|
||||
if kill -L > /dev/null ^ /dev/null
|
||||
if kill -L > /dev/null 2>/dev/null
|
||||
complete -c kill -s s -l signal -d "Signal to send"
|
||||
complete -c kill -s l -l list -d "Printf list of signal names, or name of given SIG NUMBER"
|
||||
complete -c kill -s L -l table -d " Print signal names and their corresponding numbers"
|
||||
|
|
|
@ -21,7 +21,7 @@ end
|
|||
|
||||
complete -c killall -xa '(__fish_complete_proc)'
|
||||
|
||||
if killall --version >/dev/null ^/dev/null # GNU
|
||||
if killall --version >/dev/null 2>/dev/null # GNU
|
||||
complete -c killall -s e -l exact -d 'Require an exact match for very long names'
|
||||
complete -c killall -s I -l ignore-case -d 'Do case insensitive process name match'
|
||||
complete -c killall -s g -l process-group -d 'Kill the process group to which the process belongs. The kill signal is only sent once per group, even if multiple processes belonging to the same process group were found'
|
||||
|
|
|
@ -23,10 +23,9 @@ complete -c lpadmin -s o -d 'Sets the binary communications program to use when
|
|||
complete -c lpadmin -s o -d 'Sets the error policy to be used when the printer backend is unable to send the job to the printer. ' -xa 'printer-error-policy=abort-job printer-error-policy=retry-job printer-error-policy=retry-current-job printer-error-policy=stop-printer'
|
||||
complete -c lpadmin -s o -xa printer-is-shared=true -d 'Sets the destination to shared/published or unshared/unpublished'
|
||||
complete -c lpadmin -s o -xa printer-is-shared=false -d 'Sets the destination to shared/published or unshared/unpublished'
|
||||
complete -c lpadmin -s o -d 'Sets the IPP operation policy associated with the destination' -xa "printer-policy=(cat /etc/cups/cupsd.conf | grep \<Policy | sed 's/<Policy \(.\+\)>/\1/')"
|
||||
complete -c lpadmin -s o -d 'Sets the IPP operation policy associated with the destination' -xa "printer-policy=(test -r /etc/cups/cupsd.conf; and string replace -r --filter '<Policy (.*)>' '$1' < /etc/cups/cupsd.conf)"
|
||||
|
||||
complete -c lpadmin -s u -xa 'allow:all allow:none (__fish_complete_list , __fish_complete_users allow:)' -d 'Sets user-level access control on a destination. Names starting with "@" are interpreted as UNIX group'
|
||||
complete -c lpadmin -s u -xa '(__fish_complete_list , __fish_complete_groups allow: @)' -d 'Sets user-level access control on a destination. Names starting with "@" are interpreted as UNIX group'
|
||||
complete -c lpadmin -s u -xa 'deny:all deny:none (__fish_complete_list , __fish_complete_users deny:)' -d 'Sets user-level access control on a destination. Names starting with "@" are interpreted as UNIX group'
|
||||
complete -c lpadmin -s u -xa '(__fish_complete_list , __fish_complete_groups deny: @)' -d 'Sets user-level access control on a destination. Names starting with "@" are interpreted as UNIX group'
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ complete -c ls -s x -d "List entries by lines"
|
|||
complete -c ls -s 1 -d "List one file per line"
|
||||
|
||||
# Test if we are using GNU ls
|
||||
if command ls --version >/dev/null ^/dev/null
|
||||
if command ls --version >/dev/null 2>/dev/null
|
||||
complete -c ls -s a -l all -d "Show hidden"
|
||||
complete -c ls -s A -l almost-all -d "Show hidden except . and .."
|
||||
complete -c ls -s F -l classify -d "Append filetype indicator"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
complete -c lua -s e -d 'Execute string' -x
|
||||
# Try the most common lib directories, silencing errors in case they don't exist.
|
||||
complete -c lua -s l -d 'Require library' -xa "(find /usr/lib{,32,64}/lua/ -name \*.so -printf '%f\n' ^/dev/null | string replace -r '.so\$' '')"
|
||||
complete -c lua -s l -d 'Require library' -xa "(find /usr/lib{,32,64}/lua/ -name \*.so -printf '%f\n' 2>/dev/null | string replace -r '.so\$' '')"
|
||||
complete -c lua -s i -d 'Enter interactive mode after executing script'
|
||||
complete -c lua -s v -d 'Show version'
|
||||
complete -c lua -s h -l help -d 'Print help and exit'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
# Checks if we are using GNU tools
|
||||
if mkdir --version > /dev/null ^ /dev/null
|
||||
if mkdir --version > /dev/null 2>/dev/null
|
||||
complete -c mkdir -l version -d 'Output version'
|
||||
complete -c mkdir -s m -l mode -d 'Set file mode (as in chmod)' -x
|
||||
complete -c mkdir -s p -l parents -d 'Make parent directories as needed'
|
||||
|
@ -14,6 +14,6 @@ else
|
|||
end
|
||||
|
||||
# Checks if SELinux is installed
|
||||
if command -s sestatus > /dev/null ^ /dev/null
|
||||
if command -s sestatus > /dev/null 2>/dev/null
|
||||
complete -c mkdir -l context -s Z -d 'Set SELinux security context of each created directory to the default type'
|
||||
end
|
||||
|
|
38
share/completions/mkdocs.fish
Normal file
38
share/completions/mkdocs.fish
Normal file
|
@ -0,0 +1,38 @@
|
|||
# completion for mkdocs
|
||||
|
||||
complete -f -c mkdocs -s h -l help -d 'Show help and exit'
|
||||
complete -f -c mkdocs -s v -l verbose -d 'Enable verbose output'
|
||||
complete -f -c mkdocs -s q -l quiet -d 'Silence warnings'
|
||||
complete -n 'not __fish_seen_subcommand_from build gh-deploy new serve' -f -c mkdocs -s V -l version -d 'Show the version and exit'
|
||||
|
||||
## build
|
||||
complete -n 'not __fish_seen_subcommand_from build gh-deploy new serve' -f -c mkdocs -a 'build' -d 'Build the MkDocs documentation'
|
||||
complete -n 'contains build (commandline -poc)' -f -c mkdocs -s c -l clean -d 'Remove old site_dir before building (the default)'
|
||||
complete -n 'contains build (commandline -poc)' -c mkdocs -s f -l config-file -r -d 'Provide a specific MkDocs config'
|
||||
complete -n 'contains build (commandline -poc)' -f -c mkdocs -s s -l strict -d 'Enable strict mode. This will cause MkDocs to abort the build on any warnings'
|
||||
complete -n 'contains build (commandline -poc)' -c mkdocs -s t -l theme -d 'The theme to use when building your documentation' -xa 'mkdocs readthedocs material'
|
||||
complete -n 'contains build (commandline -poc)' -c mkdocs -s e -l theme-dir -r -d 'The theme directory to use when building your documentation'
|
||||
complete -n 'contains build (commandline -poc)' -c mkdocs -s d -l site-dir -r -d 'The directory to output the result of the documentation build'
|
||||
|
||||
## gh-deploy
|
||||
complete -n 'not __fish_seen_subcommand_from build gh-deploy new serve' -f -c mkdocs -a 'gh-deploy' -d 'Deploy your documentation to GitHub Pages'
|
||||
complete -n 'contains gh-deploy (commandline -poc)' -f -c mkdocs -s c -l clean -d 'Remove old site_dir before building (the default)'
|
||||
complete -n 'contains gh-deploy (commandline -poc)' -c mkdocs -s f -l config-file -r -d 'Provide a specific MkDocs config'
|
||||
complete -n 'contains gh-deploy (commandline -poc)' -f -c mkdocs -s m -l message -r -d 'A commit message to use when commiting to the Github Pages remote branch'
|
||||
complete -n 'contains gh-deploy (commandline -poc)' -f -c mkdocs -s b -l remote-branch -r -d 'The remote branch to commit to for Github Pages'
|
||||
complete -n 'contains gh-deploy (commandline -poc)' -f -c mkdocs -s r -l remote-name -r -d 'The remote name to commit to for Github Pages'
|
||||
complete -n 'contains gh-deploy (commandline -poc)' -f -c mkdocs -l force -d 'Force the push to the repository'
|
||||
|
||||
## new
|
||||
complete -n 'not __fish_seen_subcommand_from build gh-deploy new serve' -f -c mkdocs -a 'new' -r -d 'Create a new MkDocs project'
|
||||
|
||||
## serve
|
||||
complete -n 'not __fish_seen_subcommand_from build gh-deploy new serve' -f -c mkdocs -a 'serve' -d 'Run the builtin development server'
|
||||
complete -n 'contains serve (commandline -poc)' -c mkdocs -s f -l config-file -r -d 'Provide a specific MkDocs config'
|
||||
complete -n 'contains serve (commandline -poc)' -c mkdocs -s a -l dev-addr -r -d 'IP address and port to serve documentation locally (default: localhost:8000)'
|
||||
complete -n 'contains serve (commandline -poc)' -f -c mkdocs -s s -l strict -d 'Enable strict mode. This will cause MkDocs to abort the build on any warnings'
|
||||
complete -n 'contains serve (commandline -poc)' -c mkdocs -s t -l theme -d 'The theme to use when building your documentation' -xa 'mkdocs readthedocs material'
|
||||
complete -n 'contains serve (commandline -poc)' -c mkdocs -s e -l theme-dir -r -d 'The theme directory to use when building your documentation'
|
||||
complete -n 'contains serve (commandline -poc)' -f -c mkdocs -l livereload -d 'Enable the live reloading in the development server (this is the default)'
|
||||
complete -n 'contains serve (commandline -poc)' -f -c mkdocs -l no-livereload -d 'Disable the live reloading in the development server'
|
||||
complete -n 'contains serve (commandline -poc)' -f -c mkdocs -l dirtyreload -d 'Enable the live reloading in the development server, but only re-build files that have changed'
|
|
@ -1,4 +1,4 @@
|
|||
if mktemp --version >/dev/null ^/dev/null # GNU
|
||||
if mktemp --version >/dev/null 2>/dev/null # GNU
|
||||
complete -c mktemp -s d -l directory -d 'create a directory, not a file'
|
||||
complete -c mktemp -s u -l dry-run -d 'do not create anything; merely print a name (unsafe)'
|
||||
complete -c mktemp -s q -l quiet -d 'suppress diagnostics about file/dir-creation failure'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
if command -s uname > /dev/null ^/dev/null
|
||||
if command -s uname > /dev/null 2>/dev/null
|
||||
if test (uname) = "Linux"
|
||||
complete -c modinfo -a "(__fish_print_modules)"
|
||||
complete -c modinfo -l author -s a -d "Print only 'author'"
|
||||
|
|
|
@ -63,21 +63,18 @@ complete -c mvn -f -o V -l show-version -d "Display version
|
|||
complete -c mvn -f -o v -l version -d "Display version information"
|
||||
complete -c mvn -f -o X -l debug -d "Produce execution debug output"
|
||||
|
||||
#
|
||||
#
|
||||
# Profiles
|
||||
#
|
||||
#
|
||||
function __fish_mvn_profiles_from_settings
|
||||
grep -e "<profile>" -A 1 ~/.m2/settings.xml | grep -e "<id>.*</id>" | sed 's/.*<id>//' | sed 's/<\/id>.*//g'
|
||||
end
|
||||
|
||||
#TODO search pom.xml hierarchy
|
||||
function __fish_mvn_profiles_from_pom
|
||||
[ -e pom.xml ]; and grep -e "<profile>" -A 1 pom.xml | grep -e "<id>.*</id>" | sed 's/.*<id>//' | sed 's/<\/id>.*//g'
|
||||
function __fish_mvn_profiles
|
||||
# find line opening the profile-tag
|
||||
# read next line
|
||||
# extract contents of id-tag
|
||||
sed -n -e '/<profile>/{n; s!^.*<id>\([^<]*\)</id>.*$!\1!; p}' ~/.m2/settings.xml pom.xml ^/dev/null
|
||||
end
|
||||
|
||||
complete -c mvn -f -r -o P -l activate-profiles -a "(__fish_mvn_profiles_from_pom) (__fish_mvn_profiles_from_settings)" -d "Comma-delimited list of profiles to activate"
|
||||
complete -c mvn -f -r -o P -l activate-profiles -a "(__fish_mvn_profiles)" -d "Comma-delimited list of profiles to activate"
|
||||
|
||||
|
||||
#default properties for some plugins / profiles
|
||||
|
|
|
@ -4,6 +4,22 @@
|
|||
# see also Fish's large set of completions for examples:
|
||||
# https://github.com/fish-shell/fish-shell/tree/master/share/completions
|
||||
|
||||
# If all-the-package-names is installed, it will be used to generate npm completions.
|
||||
# Install globally with `sudo npm install -g all-the-package-names`. Keep it up to date.
|
||||
function __npm_list_packages
|
||||
if not type -q all-the-package-names
|
||||
return
|
||||
end
|
||||
|
||||
all-the-package-names
|
||||
end
|
||||
|
||||
# Entire list of packages is too long to be used in a `complete` subcommand
|
||||
# Search it for matches instead
|
||||
function __npm_filtered_list_packages
|
||||
__npm_list_packages | grep (commandline -ct) | head -n 50
|
||||
end
|
||||
|
||||
function __fish_npm_needs_command
|
||||
set cmd (commandline -opc)
|
||||
|
||||
|
@ -59,7 +75,7 @@ function __fish_complete_npm -d "Complete the commandline using npm's 'completio
|
|||
set COMP_CWORD (math $COMP_CWORD + 1)
|
||||
set COMP_LINE $COMP_LINE ""
|
||||
end
|
||||
command npm completion -- $COMP_LINE ^/dev/null
|
||||
command npm completion -- $COMP_LINE 2>/dev/null
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -192,3 +208,4 @@ complete -f -c npm -n '__fish_npm_needs_command' -a 'unpublish' -d 'Remove a pac
|
|||
complete -f -c npm -n '__fish_npm_needs_command' -a 'unstar' -d 'Remove star from a package'
|
||||
complete -f -c npm -n '__fish_npm_needs_command' -a 'version' -d 'Bump a package version'
|
||||
complete -f -c npm -n '__fish_npm_needs_command' -a 'whoami' -d 'Display npm username'
|
||||
complete -f -c npm -n '__fish_seen_subcommand_from install' -a '(__npm_filtered_list_packages)'
|
||||
|
|
41
share/completions/optipng.fish
Normal file
41
share/completions/optipng.fish
Normal file
|
@ -0,0 +1,41 @@
|
|||
complete -x -c optipng
|
||||
complete -x -c optipng -n '__fish_should_complete_switches; and __fish_is_first_arg' -a '-?\t"show help"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches; and __fish_is_first_arg' -a '-h\t"show help"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches; and __fish_is_first_arg' -a '-help\t"show help"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-v\t"run in verbose mode"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-backup\t"keep a backup of the modified files"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-keep\t"keep a backup of the modified files"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-clobber\t"overwrite existing files"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-fix\t"enable error recovery"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-force\t"enforce writing of a new output file"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-preserve\t"preserve file attributes if possible"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-quiet\t"run in quiet mode"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-silent\t"run in quiet mode"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-simulate\t"run in simulation mode"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-full\t"produce a full IDAT report (might reduce speed)"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-nb\t"no bit depth reduction"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-nc\t"no color type reduction"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-np\t"no palette reduction"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-nx\t"no reductions"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-nz\t"no IDAT recoding"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-snip\t"cut one image out of multi-image or animation files"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-strip\t"strip specified metadata objects (e.g. "all")"'
|
||||
|
||||
for n in (seq 0 9)
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a "-o$n\t\"PNG optimization level $n\""
|
||||
end
|
||||
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-i0\t"PNG interlace type 0"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-i1\t"PNG interlace type 1"'
|
||||
|
||||
for n in (seq 0 5)
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a "-f$n\t'PNG delta filters $n'"
|
||||
end
|
||||
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-out\t"write output file to <file>"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-dir\t"write output file(s) to <directory>"'
|
||||
complete -x -c optipng -n '__fish_should_complete_switches' -a '-log\t"log messages to <file>"'
|
||||
|
||||
complete -x -c optipng -n 'not __fish_prev_arg_in -out -dir -log' \
|
||||
-a '(__fish_complete_suffix ".{png,PNG,pnm,PNM,tiff,TIFF,bmp,BMP}")'
|
||||
complete -x -c optipng -n '__fish_prev_arg_in -dir' -a '(__fish_complete_suffix \'{}\')' # hack to list directories only
|
|
@ -27,11 +27,11 @@ end
|
|||
|
||||
function __fish_pa_list_ports
|
||||
# Yes, this is localized
|
||||
env LC_ALL=C pactl list cards ^/dev/null | sed -n -e '/Ports:/,$p' | string match -r '^\t\t\w.*$' | string replace -r '\s+([-+\w:]+): (\w.+)' '$1\t$2'
|
||||
env LC_ALL=C pactl list cards 2>/dev/null | sed -n -e '/Ports:/,$p' | string match -r '^\t\t\w.*$' | string replace -r '\s+([-+\w:]+): (\w.+)' '$1\t$2'
|
||||
end
|
||||
|
||||
function __fish_pa_list_profiles
|
||||
env LC_ALL=C pactl list cards ^/dev/null | sed -n -e '/Profiles:/,/Active Profile/p' | string match -r '\t\t.*' | string replace -r '\s+([-+\w:]+): (\w.+)' '$1\t$2'
|
||||
env LC_ALL=C pactl list cards 2>/dev/null | sed -n -e '/Profiles:/,/Active Profile/p' | string match -r '\t\t.*' | string replace -r '\s+([-+\w:]+): (\w.+)' '$1\t$2'
|
||||
end
|
||||
|
||||
# This is needed to filter out loaded modules
|
||||
|
|
|
@ -7,7 +7,7 @@ function __fish_passwd_darwin_infosystem
|
|||
echo -e "nis\tRemote NIS server"
|
||||
end
|
||||
|
||||
if passwd --help >/dev/null ^&1
|
||||
if passwd --help >/dev/null 2>&1
|
||||
complete -c passwd -n '__fish_contains_opt -s S status' -s a -l all -f -d "Display password state for all users"
|
||||
complete -c passwd -s d -l delete -f -d "Delete user password"
|
||||
complete -c passwd -s e -l expire -f -d "Immediately obsolete user password"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
begin
|
||||
set -l unicode 'commandline | string match -qr -- "-[a-zA-Z]*C[a-zA-Z]*\$"'
|
||||
set -l noopt 'commandline | not string match -qr -- "-[a-zA-Z]*C[a-zA-Z]*\$"'
|
||||
set -l modules "(find (perl -lE'print for @INC') -name '*.pm' -printf '%P\n' ^/dev/null \
|
||||
set -l modules "(find (perl -lE'print for @INC') -name '*.pm' -printf '%P\n' 2>/dev/null \
|
||||
| sed -e 's,/,::,g; s,\.pm\$,,' | sort -u)"
|
||||
complete -c perl -s 0 -n $noopt -d 'Specify record separator'
|
||||
complete -c perl -s a -n $noopt -d 'Turn on autosplit mode'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
if command -sq pip
|
||||
pip completion --fish | source
|
||||
pip completion --fish 2>/dev/null | source
|
||||
end
|
||||
|
||||
|
|
|
@ -3,5 +3,5 @@ if command -sq pip2
|
|||
# See discussion at https://github.com/fish-shell/fish-shell/pull/4448
|
||||
# and pip bug at https://github.com/pypa/pip/pull/4755
|
||||
# Keep this even after pip fix is upstreamed for users not on the latest pip
|
||||
pip2 completion --fish | string replace -r -- " -c\s+pip\b" " -c pip2" | source
|
||||
pip2 completion --fish 2>/dev/null | string replace -r -- " -c\s+pip\b" " -c pip2" | source
|
||||
end
|
||||
|
|
|
@ -3,5 +3,5 @@ if command -sq pip3
|
|||
# See discussion at https://github.com/fish-shell/fish-shell/pull/4448
|
||||
# and pip bug at https://github.com/pypa/pip/pull/4755
|
||||
# Keep this even after pip fix is upstreamed for users not on the latest pip
|
||||
pip3 completion --fish | string replace -r -- " -c\s+pip\b" " -c pip3" | source
|
||||
pip3 completion --fish 2>/dev/null | string replace -r -- " -c\s+pip\b" " -c pip3" | source
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
if command -sq pipenv
|
||||
pipenv --completion | source
|
||||
pipenv --completion 2>/dev/null | source
|
||||
end
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
|
||||
function __fish_complete_pg_database
|
||||
psql -AtqwlF \t ^/dev/null | awk 'NF > 1 { print $1 }'
|
||||
psql -AtqwlF \t 2>/dev/null | awk 'NF > 1 { print $1 }'
|
||||
end
|
||||
|
||||
function __fish_complete_pg_user
|
||||
psql -Atqwc 'select usename from pg_user' template1 ^/dev/null
|
||||
psql -Atqwc 'select usename from pg_user' template1 2>/dev/null
|
||||
end
|
||||
|
||||
complete -c psql --no-files -a '(__fish_complete_pg_database)'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#Completions for rm
|
||||
if rm --version >/dev/null ^/dev/null # GNU
|
||||
if rm --version >/dev/null 2>/dev/null # GNU
|
||||
complete -c rm -s d -l directory -d "Unlink directory (Only by superuser)"
|
||||
complete -c rm -s f -l force -d "Never prompt before removal"
|
||||
complete -c rm -s i -l interactive -d "Prompt before removal"
|
||||
|
|
|
@ -130,6 +130,6 @@ complete -c rsync -d "Remote path" -n "commandline -ct | string match -q '*:*'"
|
|||
__rsync_remote_target
|
||||
)(
|
||||
# Get the list of remote files from the specified rsync server.
|
||||
rsync --list-only (__rsync_remote_target) ^/dev/null | string replace -r '^d.*' '\$0/' | tr -s ' ' | cut -d' ' -f 5-
|
||||
rsync --list-only (__rsync_remote_target) 2>/dev/null | string replace -r '^d.*' '\$0/' | tr -s ' ' | cut -d' ' -f 5-
|
||||
)
|
||||
"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# Test if we are using GNU sed
|
||||
|
||||
set -l is_gnu
|
||||
sed --version >/dev/null ^/dev/null; and set is_gnu --is-gnu
|
||||
sed --version >/dev/null 2>/dev/null; and set is_gnu --is-gnu
|
||||
|
||||
# Shared ls switches
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
if seq --version ^ /dev/null > /dev/null #GNU
|
||||
if seq --version 2>/dev/null > /dev/null #GNU
|
||||
complete -c seq -s f -l format -d 'Use printf style floating-point FORMAT'
|
||||
complete -c seq -s s -l separator -d 'Use STRING to separate numbers'
|
||||
complete -c seq -s w -l equal-width -d 'Equalize width with leading zeroes'
|
||||
|
|
|
@ -40,6 +40,7 @@ function __fish_set_is_locale -d 'Test if We are specifying a locale value for t
|
|||
return 0
|
||||
|
||||
case '-*'
|
||||
continue
|
||||
|
||||
case '*'
|
||||
return 1
|
||||
|
@ -65,9 +66,25 @@ complete -c set -n '__fish_is_first_token' -s q -l query -d "Test if variable is
|
|||
complete -c set -n '__fish_is_first_token' -s h -l help -d "Display help and exit"
|
||||
complete -c set -n '__fish_is_first_token' -s n -l names -d "List the names of the variables, but not their value"
|
||||
|
||||
#TODO: add CPP code to generate list of read-only variables and exclude them from the following completions
|
||||
|
||||
# Complete using preexisting variable names
|
||||
complete -c set -n '__fish_is_first_token' -x -a "(set|sed -e 's/ /'\t'Variable: /')"
|
||||
complete -c set -n '__fish_is_first_token; and not __fish_seen_argument -s e -l erase; and not __fish_seen_argument -s l -s g -s U -l local -l global -l universal' -x -a "(set -l | string match -rv '^__' | string replace ' ' \t'Local Variable: ')"
|
||||
complete -c set -n '__fish_is_first_token; and not __fish_seen_argument -s e -l erase; and not __fish_seen_argument -s l -s g -s U -l local -l global -l universal' -x -a "(set -g | string match -rv '^__' | string replace ' ' \t'Global Variable: ')"
|
||||
complete -c set -n '__fish_is_first_token; and not __fish_seen_argument -s e -l erase; and not __fish_seen_argument -s l -s g -s U -l local -l global -l universal' -x -a "(set -U | string match -rv '^__' | string replace ' ' \t'Universal Variable: ')"
|
||||
# Complete scope-specific variables
|
||||
complete -c set -n '__fish_is_first_token; and __fish_seen_argument -s l -l local' -x -a "(set -l | string match -rv '^__' | string replace ' ' \t'Local Variable: ')"
|
||||
complete -c set -n '__fish_is_first_token; and __fish_seen_argument -s g -l global' -x -a "(set -g | string match -rv '^__' | string replace ' ' \t'Global Variable: ')"
|
||||
complete -c set -n '__fish_is_first_token; and __fish_seen_argument -s U -l universal' -x -a "(set -U | string match -rv '^__' | string replace ' ' \t'Universal Variable: ')"
|
||||
|
||||
# Complete using preexisting variable names for `set --erase`
|
||||
complete -c set -n '__fish_seen_argument -s e -l erase; and not __fish_seen_argument -s l -s U -s g -l local -l global -l Universal' -f -a "(set -g | string match -rv '^_|^fish_' | string replace ' ' \tGlobal\ Variable:\ )"
|
||||
complete -c set -n '__fish_seen_argument -s e -l erase; and not __fish_seen_argument -s l -s U -s g -l local -l global -l Universal' -f -a "(set -l | string match -rv '^_|^fish_' | string replace ' ' \tLocal\ Variable:\ )"
|
||||
complete -c set -n '__fish_seen_argument -s e -l erase; and not __fish_seen_argument -s l -s U -s g -l local -l global -l Universal' -f -a "(set -U | string match -rv '^_|^fish_' | string replace ' ' \tUniversal\ Variable:\ )"
|
||||
# Complete scope-specific variables for `set --erase`
|
||||
complete -c set -n '__fish_seen_argument -s e -l erase; and __fish_seen_argument -s g -l global' -f -a "(set -g | string match -rv '^_|^fish_' | string replace ' ' \t'Global Variable: ')"
|
||||
complete -c set -n '__fish_seen_argument -s e -l erase; and __fish_seen_argument -s U -l universal' -f -a "(set -u | string match -rv '^_|^fish_' | string replace ' ' \t'Universal Variable: ')"
|
||||
complete -c set -n '__fish_seen_argument -s e -l erase; and __fish_seen_argument -s l -l local' -f -a "(set -l | string match -rv '^_|^fish_' | string replace ' ' \t'Local Variable: ')"
|
||||
|
||||
# Color completions
|
||||
complete -c set -n '__fish_set_is_color' -x -a '(set_color --print-colors)' -d Color
|
||||
|
@ -75,6 +92,5 @@ complete -c set -n '__fish_set_is_color' -s b -l background -x -a '(set_color --
|
|||
complete -c set -n '__fish_set_is_color' -s o -l bold -d 'Make font bold'
|
||||
|
||||
# Locale completions
|
||||
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 -n '__fish_set_is_locale; and not __fish_seen_argument -s e -l erase' -x -a '(locale -a)' -d (_ "Locale")
|
||||
complete -c set -s L -l long -d 'Do not truncate long lines'
|
||||
|
|
|
@ -19,7 +19,7 @@ complete -c ssh -s a -d "Disables forwarding of the authentication agent"
|
|||
complete -c ssh -s A -d "Enables forwarding of the authentication agent"
|
||||
# TODO: Improve this since /proc/net/arp is not POSIX compliant.
|
||||
complete -x -c ssh -s b -d "Interface to transmit from" -a "
|
||||
(cut -d ' ' -f 1 /proc/net/arp ^/dev/null | string match -r -v '^IP')
|
||||
(cut -d ' ' -f 1 /proc/net/arp 2>/dev/null | string match -r -v '^IP')
|
||||
"
|
||||
|
||||
complete -x -c ssh -s e -d "Escape character" -a "\^ none"
|
||||
|
@ -41,3 +41,14 @@ complete -c ssh -s X -d "Enable X11 forwarding"
|
|||
complete -c ssh -s L -d "Locally forwarded ports"
|
||||
complete -c ssh -s R -d "Remotely forwarded ports"
|
||||
complete -c ssh -s D -d "Dynamic port forwarding"
|
||||
|
||||
# Also look up hosts from the history
|
||||
function __ssh_history_completions --argument limit
|
||||
if string match -q ""
|
||||
set limit 100
|
||||
end
|
||||
|
||||
history --prefix ssh | sed -n "s/.* \([A-Za-z0-9._:-]\+@[A-Za-z0-9._:-]\+\).*/\1/p" | head -n $limit
|
||||
end
|
||||
|
||||
complete -k -c ssh -a '(__ssh_history_completions 100)' -f
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
if stat --version ^ /dev/null > /dev/null # GNU
|
||||
if stat --version 2>/dev/null > /dev/null # GNU
|
||||
complete -c stat -s L -l dereference -d 'follow links'
|
||||
complete -c stat -s f -l file-system -d 'display file system status instead of file status'
|
||||
complete -c stat -s c -l format -x -d 'use the specified FORMAT instead of the default; output a newline after each use of FORMAT'
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
if type -q -f sysctl
|
||||
# Only GNU and BSD sysctl seem to know "-h", so others should exit non-zero
|
||||
if sysctl -h >/dev/null ^/dev/null
|
||||
if sysctl -h >/dev/null 2>/dev/null
|
||||
# Print sysctl keys and values, separated by a tab
|
||||
function __fish_sysctl_values
|
||||
sysctl -a ^/dev/null | string replace -a " = " \t
|
||||
sysctl -a 2>/dev/null | string replace -a " = " \t
|
||||
end
|
||||
|
||||
complete -c sysctl -a '(__fish_sysctl_values)' -f
|
||||
|
@ -32,7 +32,7 @@ if type -q -f sysctl
|
|||
else
|
||||
# OSX sysctl
|
||||
function __fish_sysctl_values
|
||||
sysctl -a ^/dev/null | string replace -a ":" \t
|
||||
sysctl -a 2>/dev/null | string replace -a ":" \t
|
||||
end
|
||||
|
||||
complete -c sysctl -a '(__fish_sysctl_values)' -f
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
if tail --version > /dev/null ^ /dev/null
|
||||
if tail --version > /dev/null 2>/dev/null
|
||||
complete -c tail -s c -l bytes -x -d 'output the last K bytes; alternatively, use -c +K to output bytes starting with the Kth of each file'
|
||||
complete -c tail -s f -l follow -a 'name descriptor' -d 'output appended data as the file grows; -f -l follow, and --follow=descriptor are equivalent'
|
||||
complete -c tail -s F -d 'same as --follow=name --retry'
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
function __fish_tmux_sessions -d 'available sessions'
|
||||
tmux list-sessions -F "#S #{session_windows} windows created: #{session_created_string} [#{session_width}x#{session_height}]#{session_attached}" | sed 's/0$//;s/1$/ (attached)/' ^/dev/null
|
||||
tmux list-sessions -F "#S #{session_windows} windows created: #{session_created_string} [#{session_width}x#{session_height}]#{session_attached}" | sed 's/0$//;s/1$/ (attached)/' 2>/dev/null
|
||||
end
|
||||
|
||||
function __fish_tmux_clients -d 'connected clients'
|
||||
tmux list-clients -F "#{client_tty} #S: Created: #{client_created_string} [#{client_width}x#{client_height} #{client_termname}]" ^/dev/null
|
||||
tmux list-clients -F "#{client_tty} #S: Created: #{client_created_string} [#{client_width}x#{client_height} #{client_termname}]" 2>/dev/null
|
||||
end
|
||||
|
||||
function __fish_tmux_panes -d 'window panes'
|
||||
#fully qualified pane names
|
||||
tmux list-panes -F '#S:#W.#P session:window.pane' ^/dev/null
|
||||
tmux list-panes -F '#S:#W.#P session:window.pane' 2>/dev/null
|
||||
|
||||
#panes by themselves
|
||||
tmux list-panes -F '#P pane' ^/dev/null
|
||||
tmux list-panes -F '#P pane' 2>/dev/null
|
||||
|
||||
#windows by themselves
|
||||
tmux list-panes -F '#W window' ^/dev/null
|
||||
tmux list-panes -F '#W window' 2>/dev/null
|
||||
end
|
||||
|
||||
#don't allow dirs in the completion list...
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
if touch --version ^ /dev/null > /dev/null # GNU
|
||||
if touch --version 2>/dev/null > /dev/null # GNU
|
||||
complete -c touch -s a -d "Change access time"
|
||||
complete -c touch -s B -l backward -x -d "Set date back"
|
||||
complete -c touch -s c -l no-create -d "Do not create file"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
|
||||
# Test if we are using GNU tr
|
||||
if command tr --version >/dev/null ^/dev/null
|
||||
if command tr --version >/dev/null 2>/dev/null
|
||||
complete -c tr -x
|
||||
complete -c tr -s c -s C -l complement -d 'use the complement of SET1'
|
||||
complete -c tr -s d -l delete -d 'delete characters in SET1, do not translate'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
if uniq --version > /dev/null ^ /dev/null
|
||||
if uniq --version > /dev/null 2>/dev/null
|
||||
complete -c uniq -s c -l count -d "Print number of occurences"
|
||||
complete -c uniq -s d -l repeated -d "Only print duplicates"
|
||||
complete -c uniq -s D -l all-repeated -d "Remove non-duplicate lines" -f -x -a "
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Don't go invoking valgrind unless it is installed
|
||||
|
||||
set -l skin tool
|
||||
if type -q valgrind; and valgrind --version ^/dev/null | string match -qr -- '-2\.[012]\.'
|
||||
if type -q valgrind; and valgrind --version 2>/dev/null | string match -qr -- '-2\.[012]\.'
|
||||
# In older versions of Valgrind, the skin selection option was
|
||||
# '--skin'
|
||||
# But someone decided that it would be fun to change this to
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# Check if vi exists at all ( needed for vi --version )
|
||||
if type -q vi
|
||||
# Check if vi is really vim
|
||||
if vi --version > /dev/null ^ /dev/null
|
||||
if vi --version > /dev/null 2>/dev/null
|
||||
complete -c vi -w vim
|
||||
else
|
||||
complete -c vi -s s -d 'Suppress all interactive user feedback'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
if which -v > /dev/null ^ /dev/null # GNU
|
||||
if which -v > /dev/null 2>/dev/null # GNU
|
||||
complete -c which -s a -l all -d "Print all matching executables in PATH, not just the first"
|
||||
complete -c which -s i -l read-alias -d "Read aliases from stdin, reporting matching ones on stdout"
|
||||
complete -c which -l skip-alias -d "Ignore option '--read-alias'"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue