From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Rettke Subject: Re: babel: fancy prompt messes up results of shell block Date: Fri, 11 Sep 2015 12:59:40 -0500 Message-ID: References: <87k2rxbbqd.fsf@hornfels.zedat.fu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaSbu-0003Ni-JU for emacs-orgmode@gnu.org; Fri, 11 Sep 2015 13:59:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZaSbt-00050y-Hc for emacs-orgmode@gnu.org; Fri, 11 Sep 2015 13:59:42 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:35517) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaSbt-00050f-BP for emacs-orgmode@gnu.org; Fri, 11 Sep 2015 13:59:41 -0400 Received: by wicge5 with SMTP id ge5so72427898wic.0 for ; Fri, 11 Sep 2015 10:59:40 -0700 (PDT) In-Reply-To: <87k2rxbbqd.fsf@hornfels.zedat.fu-berlin.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Loris Bennett Cc: "emacs-orgmode@gnu.org" On Fri, Sep 11, 2015 at 3:29 AM, Loris Bennett 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.