Remove references to match/expand in the docs

This commit is contained in:
Fabian Homborg 2022-02-27 11:36:40 +01:00
parent 55c34cbb7c
commit 83a993a28e
3 changed files with 2 additions and 18 deletions

View file

@ -154,8 +154,6 @@ Examples
``path filter`` returns all of the given paths that match the given checks. In all cases, the paths need to exist, nonexistent paths are always filtered.
This is useful when you have a list of paths that you need to check. To match a list of paths against a glob pattern, see :ref:`path match <cmd-path-match>`. To run a glob pattern to generate paths, see :ref:`path expand <cmd-path-expand>`.
The available filters are:
- ``-t`` or ``--type`` with the options: "dir", "file", "link", "block", "char", "fifo" and "socket", in which case the path needs to be a directory, file, link, block device, character device, named pipe or socket, respectively.
@ -340,7 +338,7 @@ This is why
Some examples of combining ``path``::
# Expand all paths in the current directory, leave only executable files, and print their resolved path
path expand '*' -Z | path filter -zZ --perm=exec --type=file | path resolve -z
path filter -zZ -xf -- * | path resolve -z
# The same thing, but using find (note -maxdepth needs to come first or find will scream)
# (this also depends on your particular version of find)

View file

@ -94,7 +94,7 @@ will not match any files.
There are no options to control globbing so it always behaves like that.
See :ref:`Wildcards <expand-wildcard>` for more. For more involved globbing, the :ref:`path <cmd-path>` builtin has the ``path expand`` and ``path match`` subcommands that feature the familiar globs from bash, plus ``**``.
See :ref:`Wildcards <expand-wildcard>` for more.
Quoting
-------

View file

@ -492,20 +492,6 @@ Unlike bash (by default), fish will not pass on the literal glob character if no
apt install "ncurses-*"
For more capable wildcards, see the :ref:`path <cmd-path>` builtin, that features the ``path expand`` and ``path match`` subcommands that have full-featured globs, including ``[a-z]`` character ranges (and sets), ``[[:alnum:]]`` character classes and ``?`` for single-character matches. An example::
# I want all photos I took in October to December 2019, but not the ".raw" versions
> path expand 'IMG_20191[012]*' | path match -v '*.raw'
IMG_20191002_154337675_HDR.jpg
IMG_20191002_193313306.png
IMG_20191102_195530400_HDR.gif
IMG_20191104_122747460_HDR.jpg
IMG_20191105_195601152 (1).jpg
IMG_20191201_195601152.jpg
# Okay, now delete them
> rm (path expand 'IMG_20191[012]*' | path match -v '*.raw')
.. _expand-variable:
Variable expansion