Re: [dev] [st] Start with text already input

2017-09-15 Thread Hadrien Lacour
On Fri, Sep 15, 2017 at 09:24:55PM +, Eric Pruitt wrote: > On Fri, Sep 15, 2017 at 09:41:32PM +0200, Hadrien Lacour wrote: > > I basically wanted a way to open a terminal with the beginning of a > > command ("pass -c " in my case) already typed. > > > > I finally settled for the dmenu integrati

Re: [dev] [st] Start with text already input

2017-09-15 Thread Eric Pruitt
On Fri, Sep 15, 2017 at 09:41:32PM +0200, Hadrien Lacour wrote: > I basically wanted a way to open a terminal with the beginning of a > command ("pass -c " in my case) already typed. > > I finally settled for the dmenu integration, but this still could be > useful. I'll probably have better chance

Re: [dev] [st] Start with text already input

2017-09-15 Thread Hadrien Lacour
On Fri, Sep 15, 2017 at 07:24:51PM +, Kamil Cholewiński wrote: > echo 'echo mytext' >> .zshrc > > P.S. please remove "in-reply-to" headers when starting a new thread > Yeah, sorry. Just noticed. Your solution isn't "input" text, it's just displayed. I basically wanted a way to open a terminal

Re: [dev] [st] Start with text already input

2017-09-15 Thread Kamil Cholewiński
echo 'echo mytext' >> .zshrc P.S. please remove "in-reply-to" headers when starting a new thread

[dev] [st] Start with text already input

2017-09-15 Thread Hadrien Lacour
Hello, I'm trying to do what the subject says but I have some troubles. Maybe someone already have a solution. Here's what I tried: #!/bin/sh tty=$(mktemp) st -e sh -c "tty >\"$tty\"; exec \"$SHELL\"" sleep 1 printf 'mytext' >"$(cat "$tty")" rm -- "$tty" I get the text, but the shell (zsh here)