From 920d16436e0d5f37e9f6d31236ee87b716f3c82f Mon Sep 17 00:00:00 2001 From: johannst Date: Thu, 25 Jan 2024 07:33:01 +0000 Subject: deploy: f7fb4c7303a5776ddb421d182a92f679a8b0f868 --- print.html | 16 ++++++++++++++++ searchindex.js | 2 +- searchindex.json | 2 +- tools/bash.html | 5 +++++ tools/fish.html | 4 ++++ tools/zsh.html | 7 +++++++ 6 files changed, 34 insertions(+), 2 deletions(-) diff --git a/print.html b/print.html index 1c0030a..99c9581 100644 --- a/print.html +++ b/print.html @@ -335,6 +335,13 @@ echo ${(kv)vec} # a aa b bb # Iterate over key value pairs. for k v in ${(kv)vec)}; do ...; done +

I/O redirections

+

See bash - I/O redirection

+

Process substitution

+

Process substitution allows to redirect the stdout of multiple processes at +once.

+
vim -d <(grep foo bar) <(grep foo moose)
+

Argument parsing with zparseopts

zparseopts [-D] [-E] [-A assoc] specs
 
@@ -589,6 +596,11 @@ contains some nice visualization to explain bash redirections.

  • duplicate fd 1 to fd 2, effectively redirecting stderr to stdout
  • redirect stdout to file
  • +

    Process substitution (ref)

    +

    Process substitution allows to redirect the stdout of multiple processes at +once.

    +
    vim -d <(grep foo bar) <(grep foo moose)
    +

    Argument parsing with getopts

    The getopts builtin uses following global variables: