mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-26 14:01:13 -03:00
Also prepend "./" for filter if a filename starts with "-"
This is now added to the two commands that definitely deal with relative paths. It doesn't work for e.g. `path basename`, because after removing the dirname prepending a "./" doesn't refer to the same file, and the basename is also expected to not contain any slashes.
This commit is contained in:
@@ -170,6 +170,8 @@ The filter options can either be given as multiple options, or comma-separated -
|
||||
|
||||
With ``--invert``, the meaning of the filtering is inverted - any path that wouldn't pass (including by not existing) passes, and any path that would pass fails.
|
||||
|
||||
When a path starts with ``-``, ``path filter`` will prepend ``./`` to avoid it being interpreted as an option otherwise.
|
||||
|
||||
It returns 0 if at least one path passed the filter.
|
||||
|
||||
``path is`` is shorthand for ``path filter -q``, i.e. just checking without producing output, see :ref:`The is subcommand <cmd-path-is>`.
|
||||
|
||||
Reference in New Issue
Block a user