Skip to content

Commit

Permalink
fix: pipe-scenario use fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
psprint committed May 26, 2023
1 parent 831b833 commit 289fa22
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions smart-consoles/iqnc
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,7 @@ if ((!$+Opts[--refresh])); then
if int/nc::test-stdin Q0_SAVE_PIPE REPLY;then
ZUI[FIRST_0_INPUT]=$REPLY
ZUI[HAVE_0_INPUT]=1 ZUI[IO_COUNT]=15 ZUI[IO_SUM_UP]=0
iqnc_cmd_next -q $CIN0
fi
iqnc_create_histories
#cmd-exec-prompt
Expand Down Expand Up @@ -729,10 +730,12 @@ iqnc_fill_cmd(){
reply=()

ZUI[COMMAND]=${1:-$ZUI[COMMAND]}
[[ $ZUI[COMMAND] != [[:space:]$'\1'-$'\x1b']# ]]&&ZUI[HAVE_0_INPUT]=0
iqnc_get_command
: ${ZUI[COMMAND]:=$REPLY}
if [[ $Q0_SAVE_PIPE -eq 0 ]];then
iqnc_get_command
: ${ZUI[COMMAND]:=$REPLY}
fi
if [[ -n $ZUI[COMMAND] ]];then
[[ $ZUI[COMMAND] != [[:space:]$'\1-\x1b']# ]]&&ZUI[HAVE_0_INPUT]=0
#[[ -e $ZUI[QPATH] ]]&&ZUI[COMMAND]=${ZUI[COMMAND]//\%s/${(q)ZUI[QPATH]}}
#[[ -e $ZUI[QPATH] ]]||ZUI[COMMAND]=${ZUI[COMMAND]//\%s/}
cmd=("${(z@)ZUI[COMMAND]}")
Expand Down Expand Up @@ -817,7 +820,7 @@ iqnc_fill_0(){
integer QFLAG QEC
REPLY=
((Q0_SAVE_PIPE))&&\
{int/nc::read-all -u$Q0_SAVE_PIPE -t0 -x50;QEC=$?;}
{int/nc::read-all-sys -u$Q0_SAVE_PIPE -t0 -x3000 -r1;QEC=$?;}
if ((!Q0_SAVE_PIPE));then
if command ps -p "$ZUI[CMD_PID]"&>/dev/null;then
ZUI[CMD_SEEN]=$EPOCHREALTIME
Expand Down

0 comments on commit 289fa22

Please sign in to comment.