Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: set -F kills read -t



# rayandrews@xxxxxxxxxxx / 2014-03-18 22:00:49 -0700:
> Ok, then how else would one write a function that could use arguments 
> *or* piped input?

repeating another post on this thread:

mygrep() {                                                                               
    if [ -t 0 ]; then                                                 
        echo terminal                                                                                             
    else                                                                      
        read input                                                  
        echo $input input                                         
    fi                                                                
}                                                                     

-- 
roman



Messages sorted by: Reverse Date, Date, Thread, Author