emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Grant Rettke <gcr@wisdomandwonder.com>
To: Loris Bennett <loris.bennett@fu-berlin.de>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: babel: fancy prompt messes up results of shell block
Date: Fri, 11 Sep 2015 12:59:40 -0500	[thread overview]
Message-ID: <CAAjq1mcAdi0FAiC5W0iKgsEAXGZ4qpZi0LZJ=HCSmsnqJeSDbA@mail.gmail.com> (raw)
In-Reply-To: <87k2rxbbqd.fsf@hornfels.zedat.fu-berlin.de>

On Fri, Sep 11, 2015 at 3:29 AM, Loris Bennett
<loris.bennett@fu-berlin.de> wrote:
> Hi,
>
> I have a bit of a fancy bash prompt and so the output of evaluating a
> block of shell script ends up a little messy:
>
> #+BEGIN_SRC sh :session install :results output
> echo blah
> #+END_SRC
>
> #+RESULTS:
> : blah
> : ]2;loris@soroban [35m[10:21:45] [31mloris@soroban [36m(1058) [33m/home/loris/tmp[34m[0m
>
> Is there any way to avoid this short of resetting PS1 within the babel
> session?

It looks like `org-babel-sh-strip-weird-long-prompt' removed the
prompt from the output. Your prompt doesn't match that regex? Maybe
redefine it there.

  reply	other threads:[~2015-09-11 17:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11  8:29 babel: fancy prompt messes up results of shell block Loris Bennett
2015-09-11 17:59 ` Grant Rettke [this message]
2015-09-18 12:16   ` Loris Bennett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAjq1mcAdi0FAiC5W0iKgsEAXGZ4qpZi0LZJ=HCSmsnqJeSDbA@mail.gmail.com' \
    --to=gcr@wisdomandwonder.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=loris.bennett@fu-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).