12/30/2023 0 Comments Fish shell loop listt -or -tokenizeĬauses read to split the input into variables by the shell’s tokenization rules. NOTE: Prior to fish 3.0, the short opt for -shell was -s, but it has been changed for compatibility with bash’s -s short opt for -silent. S or -shellĮnables syntax highlighting, tab completions and command termination suitable for entering shellscript code in the interactive mode. There is no default right prompt command. Uses the output of the shell command RIGHT_PROMPT_CMD as the right prompt for the interactive mode. All special characters in the string are automatically escaped before being passed to the echo command. It is equivalent to echo $PROMPT_STR and is provided solely to avoid the need to frame the prompt as a command. Uses the PROMPT_STR as the prompt for the interactive mode. The default prompt command is set_color green echo read set_color normal echo "> " -P or -prompt-str PROMPT_STR Uses the output of the shell command PROMPT_CMD as the prompt for the interactive mode. Makes read return after reading NCHARS characters or the end of the line, whichever comes first. Outside of a block, this is the same as -function. Scopes the variable to the currently executing block. Scopes the variable to the currently executing function. This is useful for reading things like passwords or other sensitive information. Masks characters written to the terminal, replacing them with asterisks. DELIMITER will be used as an entire string to split on, not a set of characters. Sets the initial string in the interactive mode command buffer to CMD. The following options are available: -c CMD or -command CMD Unlike other shells, there is no default variable (such as REPLY) for storing the result - instead, it is printed on standard output. Alternatively, a null character or a maximum number of characters can be used to terminate the input, and other delimiters can be given. By default, read reads a single line and splits it into variables on spaces or tabs. Read reads from standard input and either writes the result back to standard output (for use in command substitution), or stores the result in one or more shell variables.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |