Skip to content

Commit 289fa22

Browse files
committed
fix: pipe-scenario use fixes
1 parent 831b833 commit 289fa22

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

smart-consoles/iqnc

+7-4
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,7 @@ if ((!$+Opts[--refresh])); then
587587
if int/nc::test-stdin Q0_SAVE_PIPE REPLY;then
588588
ZUI[FIRST_0_INPUT]=$REPLY
589589
ZUI[HAVE_0_INPUT]=1 ZUI[IO_COUNT]=15 ZUI[IO_SUM_UP]=0
590+
iqnc_cmd_next -q $CIN0
590591
fi
591592
iqnc_create_histories
592593
#cmd-exec-prompt
@@ -729,10 +730,12 @@ iqnc_fill_cmd(){
729730
reply=()
730731

731732
ZUI[COMMAND]=${1:-$ZUI[COMMAND]}
732-
[[ $ZUI[COMMAND] != [[:space:]$'\1'-$'\x1b']# ]]&&ZUI[HAVE_0_INPUT]=0
733-
iqnc_get_command
734-
: ${ZUI[COMMAND]:=$REPLY}
733+
if [[ $Q0_SAVE_PIPE -eq 0 ]];then
734+
iqnc_get_command
735+
: ${ZUI[COMMAND]:=$REPLY}
736+
fi
735737
if [[ -n $ZUI[COMMAND] ]];then
738+
[[ $ZUI[COMMAND] != [[:space:]$'\1-\x1b']# ]]&&ZUI[HAVE_0_INPUT]=0
736739
#[[ -e $ZUI[QPATH] ]]&&ZUI[COMMAND]=${ZUI[COMMAND]//\%s/${(q)ZUI[QPATH]}}
737740
#[[ -e $ZUI[QPATH] ]]||ZUI[COMMAND]=${ZUI[COMMAND]//\%s/}
738741
cmd=("${(z@)ZUI[COMMAND]}")
@@ -817,7 +820,7 @@ iqnc_fill_0(){
817820
integer QFLAG QEC
818821
REPLY=
819822
((Q0_SAVE_PIPE))&&\
820-
{int/nc::read-all -u$Q0_SAVE_PIPE -t0 -x50;QEC=$?;}
823+
{int/nc::read-all-sys -u$Q0_SAVE_PIPE -t0 -x3000 -r1;QEC=$?;}
821824
if ((!Q0_SAVE_PIPE));then
822825
if command ps -p "$ZUI[CMD_PID]"&>/dev/null;then
823826
ZUI[CMD_SEEN]=$EPOCHREALTIME

0 commit comments

Comments
 (0)