From 83a993a28e37545e00984c46231778f6ceaf0225 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sun, 27 Feb 2022 11:36:40 +0100 Subject: [PATCH] Remove references to match/expand in the docs --- doc_src/cmds/path.rst | 4 +--- doc_src/fish_for_bash_users.rst | 2 +- doc_src/language.rst | 14 -------------- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/doc_src/cmds/path.rst b/doc_src/cmds/path.rst index 458656b0b..a3ac92e1a 100644 --- a/doc_src/cmds/path.rst +++ b/doc_src/cmds/path.rst @@ -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 `. To run a glob pattern to generate paths, see :ref:`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) diff --git a/doc_src/fish_for_bash_users.rst b/doc_src/fish_for_bash_users.rst index 68f743c37..66bacac73 100644 --- a/doc_src/fish_for_bash_users.rst +++ b/doc_src/fish_for_bash_users.rst @@ -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 ` for more. For more involved globbing, the :ref:`path ` builtin has the ``path expand`` and ``path match`` subcommands that feature the familiar globs from bash, plus ``**``. +See :ref:`Wildcards ` for more. Quoting ------- diff --git a/doc_src/language.rst b/doc_src/language.rst index 97ad213f3..060e51cf2 100644 --- a/doc_src/language.rst +++ b/doc_src/language.rst @@ -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 ` 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