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

Re: detect pipe



On 2021-01-27 20:57:36 -0800, Ray Andrews wrote:
>    test1 ()
>    {
>         if [[ -p /dev/fd/0 ]]; then

The semicolon after ]] is invalid. I get an error

zsh: parse error near `then'

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




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