You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Writing #159 I thought that it could be good to have a way to use the stdout of a command executed with Exec as parameter of a following Exec call.
For being even more useful, it could be possible to support several Exec calls.
And to even go further (sorry, I'm blowing my mind), they could also be used as values to replace on a specific format string.
NOTE I'm not familiar with the script implementation, so I don't know if this is feasible, or if it's hard to implement or not.
Let me write some example of an hypothetical API for each of the above wacky ideas.
I'm exposing an example with shell script that I think that I cannot translate using script to a pipe execution as before; each numbered item relates, in the same order, to the three things that I exposed at the beginning of this issue.
For keeping the examples concise, they are ilustrative examples rather than a specific use case that I'm having.
In script isn't currently possible without having to execute each of them speartelly. I'm going to show how script could offer it with some unexisting methods without stating if their names are good nor if it's a good idea to have them.
There should be somehow to indicates that the output of the previous Exec is passed as an argument on the following Exec call.
In this case I used echo inside of an Exec, but it could be extended to each source functions that receive a string as a parameter, hence it could be also done as
Writing #159 I thought that it could be good to have a way to use the stdout of a command executed with
Exec
as parameter of a followingExec
call.For being even more useful, it could be possible to support several
Exec
calls.And to even go further (sorry, I'm blowing my mind), they could also be used as values to replace on a specific format string.
NOTE I'm not familiar with the
script
implementation, so I don't know if this is feasible, or if it's hard to implement or not.Let me write some example of an hypothetical API for each of the above wacky ideas.
Right now,
script
allows to do thisThis translate to the shell script
I'm exposing an example with shell script that I think that I cannot translate using
script
to a pipe execution as before; each numbered item relates, in the same order, to the three things that I exposed at the beginning of this issue.For keeping the examples concise, they are ilustrative examples rather than a specific use case that I'm having.
ls $(lsb_release -cs)
In
script
isn't currently possible without having to execute each of them speartelly. I'm going to show howscript
could offer it with some unexisting methods without stating if their names are good nor if it's a good idea to have them.Exec
is passed as an argument on the followingExec
call.Exec
calls.In this case I used
echo
inside of anExec
, but it could be extended to each source functions that receive a string as a parameter, hence it could be also done asThe text was updated successfully, but these errors were encountered: