Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 211202

Zsh is a shell with many advanced command-line and scripting features.

6
votes
2answers
: caffeinate sleep 1, for instance, (where sleep is the utility). Is there any way for it to accept a zsh function as well, without modifying the tool itself? For example: function mysleep { sleep … 2 } caffeinate mysleep # mysleep: No such file or directory Edit: This question is indeed a duplicate for Bash—thanks for pointing me to the answer. For zsh, however, export -f doesn't work. Is there a way to do this in zsh? (I'm removing the bash tag to reduce confusion.) …
asked Jun 1 '17 by Daniel Li
3
votes
1answer
I have a zsh script that prompts for keyboard entry: read -rs 'pw?Password: ' This script also needs to read the contents of a file from stdin. But the read command takes the first line of stdin … and uses it as input for the password: myscript <<< 'line1\nline2' # pw == 'line1' Any way to get around this? I'd prefer a zsh or bash solution, though I'm open to others too. (FWIW, gpg2 does this, so I know it's possible... just don't know how.) …
asked May 21 '17 by Daniel Li