From d991096cb453c55785a0d7c7604f2d96de9f0843 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sun, 24 Oct 2021 20:01:07 +0200 Subject: [PATCH] Add some more links in the docs --- doc_src/cmds/path.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc_src/cmds/path.rst b/doc_src/cmds/path.rst index d6ddf791f..a940bcc99 100644 --- a/doc_src/cmds/path.rst +++ b/doc_src/cmds/path.rst @@ -135,6 +135,8 @@ Examples >_ path extension ~/.config. # one empty line, status 0 +.. _cmd-path-filter: + "filter" subcommand -------------------- @@ -146,6 +148,8 @@ 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. @@ -263,6 +267,7 @@ Examples ^^^^^^^^ :: + >_ path real /bin//sh # The "//" is squashed, and /bin is resolved if your system links it to /usr/bin. # sh here is bash (on an Archlinux system) @@ -272,7 +277,9 @@ Examples ----------------------------- :: - path change-extension [(-z | --null-in)] [(-Z | --null-out)] [(-q | --quiet)] EXTENSION [PATH...] + + path change-extension [(-z | --null-in)] [(-Z | --null-out)] \ + [(-q | --quiet)] EXTENSION [PATH...] ``path change-extension`` returns the given paths, with their extension changed to the given new extension. The extension is the part after (and excluding) the last ".", unless that "." followed a "/" or the basename is "." or "..", in which case there is no previous extension and the new one is simply added.