[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bash: Fehler auch über Pipes hinweg abfangen



* Andreas Pakulat <apaku@gmx.de> wrote:
> On 21.11.05 14:53:45, Sebastian Kayser wrote:
> > * Frank Küster <frank@debian.org> wrote:
> > > ,---- set -e
> > > | Exit immediately if a simple command (see SHELL GRAMMAR above) exits
> > > | with a non-zero status.  The shell does not exit if the command that
> > > | fails is part of an until or while loop, part of an if statement, part
> > > | of a && or || list, or if the command's return value is being inverted
> > > | via !.  A trap on ERR, if set, is executed before the shell exits.
> > > `----
> > 
> > P.S.: Hat jemand ein mutt-Macro für einen schönen "Inline-Kasten"
> > ähnlich dem, in den Frank das "set -e" gesetzt hast?!
> 
> Das hat nichts mit mutt zu tun sondern wird vom Editor erzeugt, fuer vim
> gibts dazu "boxquote.vim". Aber ich glaube nicht als Debian-Paket, musst
> mal nach boxquote googlen. Die .vim-Datei einfach unter
> $HOME/.vim/plugin ablegen und mittel Bq oder Bqf nutzen.

Perfekt, danke. Fündig geworden bin ich per "vim textbox" auf
groups.google.de und habe nun eine leicht abgewandelte Variante eines
Mappings von dort im Einsatz (boxquote.vim habe ich nicht gefunden).

vmap bx s,----  <CR>`----<ESC>Pv`]:s/^/\| /<CR>'[k$i

Ist optisch zwar etwas kryptisch, aber funktioniert bestens.

Jetzt fehlt mir nur noch ein Tip wegen der Pipe-Fehlerbehandlung, dann
bin ich glücklich ;)

- sebastian



Reply to: