fish-shell/doc_src/cmds
Fabian Boehm 4612343d6e
Merge pull request #8958 from faho/builtin-path
This adds a path builtin to deal with paths.

It offers the following subcommands:

    filter to go through a list of paths and only print the ones that pass some filter - exist, are a directory, have read permission, ...
    is as a shortcut for filter -q to only return true if one of the paths passed the filter
    basename, dirname and extension to print certain parts of the path
    change-extension to change the extension to a different one (as a string operation)
    normalize and resolve to canonicalize the paths in various flavors
    sort to sort paths, also only using the basename or dirname as a key

The definition of "extension" here was carefully considered and should line up with how extensions are actually used - ~/.bashrc doesn't have an extension, but ~/.conf.d does (".d").

These subcommands all compose well - they can read from arguments or stdin (like string), they can use null-delimited input or output (input is autodetected - if a NULL happens in the first PATH_MAX bytes it switches automatically).

It is both a failglob exception (so like set if a glob passed to it fails it just doesn't get any arguments for it instead of triggering an error), and passes output to command substitution buffers explicitly split (like string split0) so newlines are easy to handle.
2022-05-29 20:15:03 +02:00
..
_.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
abbr.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
alias.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
and.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
argparse.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
begin.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
bg.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
bind.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
block.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
break.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
breakpoint.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
builtin.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
case.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
cd.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
cdh.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
command.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
commandline.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
complete.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
contains.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
continue.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
count.rst docs synopsis: make all placeholder arguments uppercase 2022-01-19 22:56:41 +08:00
dirh.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
dirs.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
disown.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
echo.rst docs: removed enumeration item from echo docs 2022-04-22 20:16:14 +02:00
else.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
emit.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
end.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
eval.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
exec.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
exit.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
false.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
fg.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
fish.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
fish_add_path.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
fish_breakpoint_prompt.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
fish_command_not_found.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
fish_config.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
fish_git_prompt.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
fish_greeting.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
fish_hg_prompt.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
fish_indent.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
fish_is_root_user.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
fish_key_reader.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
fish_mode_prompt.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
fish_opt.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
fish_prompt.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
fish_right_prompt.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
fish_status_to_signal.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
fish_svn_prompt.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
fish_title.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
fish_update_completions.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
fish_vcs_prompt.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
for.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
funced.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
funcsave.rst Put funcsave long option back 2022-03-24 20:11:39 +01:00
function.rst Allow trapping SIGINT and SIGTERM in scripts 2022-05-28 17:44:13 -07:00
functions.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
help.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
history.rst docs: standardise on definition lists for options 2022-03-12 00:21:12 +08:00
if.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
isatty.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
jobs.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
math.rst docs/math: Some simple changes 2022-05-14 10:59:41 +02:00
nextd.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
not.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
open.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
or.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
path.rst Rename sort --invert to sort --reverse/-r 2022-05-29 17:53:03 +02:00
popd.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
prevd.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
printf.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
prompt_hostname.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
prompt_login.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
prompt_pwd.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
psub.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
pushd.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
pwd.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
random.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
read.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
realpath.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
return.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
set.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
set_color.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
source.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
status.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
string-collect.rst Fix more lost string documentation 2022-05-14 10:05:02 +02:00
string-escape.rst string docs: format options and arguments in line with other pages 2022-03-12 22:22:02 +08:00
string-join.rst New -n flag for string join. (#8774) 2022-03-13 11:47:33 +01:00
string-join0.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string-length.rst string docs: format options and arguments in line with other pages 2022-03-12 22:22:02 +08:00
string-lower.rst string docs: format options and arguments in line with other pages 2022-03-12 22:22:02 +08:00
string-match.rst Fix more lost string documentation 2022-05-14 10:05:02 +02:00
string-pad.rst string docs: format options and arguments in line with other pages 2022-03-12 22:22:02 +08:00
string-repeat.rst string docs: format options and arguments in line with other pages 2022-03-12 22:22:02 +08:00
string-replace.rst string docs: format options and arguments in line with other pages 2022-03-12 22:22:02 +08:00
string-split.rst Docs: be more consistent about argument formatting 2022-05-14 10:05:02 +02:00
string-split0.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string-sub.rst Fix more lost string documentation 2022-05-14 10:05:02 +02:00
string-trim.rst string docs: format options and arguments in line with other pages 2022-03-12 22:22:02 +08:00
string-unescape.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string-upper.rst string docs: format options and arguments in line with other pages 2022-03-12 22:22:02 +08:00
string.rst Docs: be more consistent about argument formatting 2022-05-14 10:05:02 +02:00
suspend.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
switch.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
test.rst Is this a typo? 2022-03-23 15:04:25 +01:00
time.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
trap.rst Allow trapping SIGINT and SIGTERM in scripts 2022-05-28 17:44:13 -07:00
true.rst docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
type.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
ulimit.rst ulimit: add new limits from FreeBSD/NetBSD 2022-03-24 10:23:04 +08:00
umask.rst docs: standardise on definition lists for options 2022-03-12 00:21:12 +08:00
vared.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
wait.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00
while.rst docs: omnibus cleanup 2022-03-12 00:21:13 +08:00