display background job completion status conspicuously: xterm-color - Redhat

This is a discussion on display background job completion status conspicuously: xterm-color - Redhat ; On completion of background jobs my tcshell issues missives of the sort: [1] + Done foo_command bar_arg1 bar_arg2 This single-line output gets woven into the normal output lines and so is sometimes hard to see. Is there a way to ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: display background job completion status conspicuously: xterm-color

  1. display background job completion status conspicuously: xterm-color

    On completion of background jobs my tcshell issues missives of the sort:


    [1] + Done foo_command bar_arg1 bar_arg2

    This single-line output gets woven into the normal output lines and so is
    sometimes hard to see. Is there a way to make this more conspicuous by
    using "red" or "inverse text" or "bold" or some such? I am using xterm-
    color and already have a lot of "eye-candy" (ls color listings; vim syntax
    highlighting etc.) so this might also be possible?

    Any settings / hacks that people can recommend?

    --
    Rahul

  2. Re: display background job completion status conspicuously:xterm-color

    2008-07-1, 16:22(+00), Rahul:
    > On completion of background jobs my tcshell issues missives of the sort:
    >
    >
    > [1] + Done foo_command bar_arg1 bar_arg2
    >
    > This single-line output gets woven into the normal output lines and so is
    > sometimes hard to see. Is there a way to make this more conspicuous by
    > using "red" or "inverse text" or "bold" or some such? I am using xterm-
    > color and already have a lot of "eye-candy" (ls color listings; vim syntax
    > highlighting etc.) so this might also be possible?
    >
    > Any settings / hacks that people can recommend?


    I think you'll have to patch the source code of the shell. I
    don't know of any shell that allows to customise that output. In
    a number of shells, you can choose for those messages to be
    displayed asynchronously (that is only just before displaying a
    prompt) I don't know if it's the case for tcsh.

    --
    Stéphane

  3. Re: display background job completion status conspicuously: xterm-color

    Stephane CHAZELAS wrote in
    news:slrng6kppa.qe4.stephane.chazelas@spam.is.inva lid:

    >
    > I think you'll have to patch the source code of the shell. I
    > don't know of any shell that allows to customise that output.


    Can I do this as a user or do I need to be root? Never patched a shell
    before.

    --
    Rahul

  4. Re: display background job completion status conspicuously: xterm-color

    In article ,
    Rahul wrote:

    > Stephane CHAZELAS wrote in
    > news:slrng6kppa.qe4.stephane.chazelas@spam.is.inva lid:
    >
    > >
    > > I think you'll have to patch the source code of the shell. I
    > > don't know of any shell that allows to customise that output.

    >
    > Can I do this as a user or do I need to be root? Never patched a shell
    > before.


    You'll need to be root if you want to install the modified shell in
    /bin. But you could put the modified shell in your own directory. You
    can have your .tcshrc run your modified shell.

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    *** PLEASE don't copy me on replies, I'll read them in the group ***

  5. Re: display background job completion status conspicuously: xterm-color

    Barry Margolin wrote in news:barmar-
    4183E1.23050703072008@newsgroups.comcast.net:

    > You'll need to be root if you want to install the modified shell in
    > /bin. But you could put the modified shell in your own directory. You
    > can have your .tcshrc run your modified shell.
    >


    I have the source to tcsh version 6.15 now. Does anybody have an idea where
    / what I need to look for to patch the lines that'd control the color of
    those messages?


    --
    Rahul

  6. Re: display background job completion status conspicuously:xterm-color

    2008-07-9, 21:13(+00), Rahul:
    > Barry Margolin wrote in news:barmar-
    > 4183E1.23050703072008@newsgroups.comcast.net:
    >
    >> You'll need to be root if you want to install the modified shell in
    >> /bin. But you could put the modified shell in your own directory. You
    >> can have your .tcshrc run your modified shell.
    >>

    >
    > I have the source to tcsh version 6.15 now. Does anybody have an idea where
    > / what I need to look for to patch the lines that'd control the color of
    > those messages?

    [...]

    as a quick and dirty implementation, you could do:

    diff -pur tcsh-6.15.00/sh.proc.c tcsh-6.15.00.new/sh.proc.c
    --- tcsh-6.15.00/sh.proc.c 2006-09-27 17:59:04.000000000 +0100
    +++ tcsh-6.15.00.new/sh.proc.c 2008-07-11 13:59:22.000000000 +0100
    @@ -940,6 +940,8 @@ pprint(struct process *pp, int flag)
    tp = pp;
    status = reason = -1;
    jobflags = 0;
    + if (flag & REASON)
    + xprintf("%a%s", QUOTE, "\033[31;1m");
    do {
    #ifdef BACKPIPE
    /*
    @@ -1148,6 +1150,8 @@ prcomd:
    xprintf(" ");
    ptprint(tp);
    }
    + if (flag & REASON)
    + xprintf("%a%s", QUOTE, "\033[m");
    return (jobflags);
    }


    --
    Stéphane

+ Reply to Thread