[SOLVED] Re: ein versuch mit nano
Späte selbst antwort...
Am 2006-05-22 17:26:46, schrieb Michelle Konzack:
> Hi,
>
> wie ich in einer vorherigen E-Mail geschrieben habe, hat 'dialog'
> keine --editbox, also versuchte ich mich mit einem Behelf wie:
>
> ----8<--------------------------------------------------------------
> dlg1()
> {
> # echo -e "$BODY" |dialog --begin 3 3 --clear --stdout \
> # --title "TDMailBody" \
> # --backtitle "`gettext 'Please edit the Text to your needs.
> You can add multiple TAGS one per line, where each TAG can be one or more words.'`" \
> # --editbox - 20 74
> TMPFILE=`mktemp -t XXXXXX || exit 1`
> echo -e "$BODY" >$TMPFILE
> nano --smooth --mouse --nowrap $TMPFILE
> if [ $? -eq 0 ] ; then
> cat $TMPFILE
> echo "rm -f $TMPFILE" 1>&2
> exit 0
> fi
> echo "rm -f $TMPFILE" 1>&2
> exit 1
> }
> ----8<--------------------------------------------------------------
>
> nur beendet nano mit SIGHUP oder SIGTERM.
...was normal ist, denn wenn ich den dialog als
RET=$(dlg1)
aufrufe, wohin soll nano die Anzeige senden?
Richtig ist:
dlg1()
{
...
nano --smooth --mouse --nowrap $TMPFILE >/dev/tty
...
}
RET=$(dlg1)
Grüße
Michelle Konzack
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
50, rue de Soultz MSM LinuxMichi
0033/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
Reply to: