This question is related to this one in case someone is interested.

I want to write script like that

$@ | tee /tmp/unique_name
if [[ "${pipestatus[1]}" -eq 0 ]]; then
    sleep 2
    tmux select-pane -t.0 \; resize-pane -Z
elif [[ $(wc -l /tmp/unique_name | awk '{print $1}') -gt $LINES ]] && [[ $(grep pdb /tmp/unique_name) ]]; then
    tmux copy-mode

Checking with grep would be just a heuristic that works only for one language, so I'd like to avoid that and to know for sure that program asked user for input.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.