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

Re: stdios confused by a function scope ?



On Mar 20,  9:57pm, Marc Chantreux wrote:
} 
} Here is a tmux capture i want to share with you as it completly got me
} lost. it seems that a command which works well directly from the
} interactive shell is loosing stdin when it is called from a function.

Your explanation of what is (not) happening could have been clearer;
I'm still not sure I'm correctly understanding what you expect.

However, this particular construction is very odd:

         < ~/.uds/rt/credentials | fill RTUSER RTPASSWD RTSERVER

This is relying on READNULLCMD to pass the contents of the credentials
file through the pipe to the fill function.  Why would you want to do
that?  Why not simply redirect straight into fill?  You don't even
need to reorder the words (though putting the redirection at the end
would be more typical); just remove the "|" like so:

         < ~/.uds/rt/credentials fill RTUSER RTPASSWD RTSERVER

What is the value of $READNULLCMD ?



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