2

The fish shell uses many escape sequences as you type, especially if you ever make a mistake or use completion.

'script' just captures them literally, making quite a mess. More of a mess than col -b can repair.

Is there some other way to record command lines and their results (other than just using an emacs shell buffer, which I might resort to)?

Is there a way to configure fish to, ahem, scale back it's fancy display?

3
  • No, and that is not specific to fish or some other shell bash; indeed emacs shell buffer is a good alternative. You could configure your shell's history. Jul 11, 2015 at 12:58
  • I know it's not fish-specific, but I wondered if fish in particular had some configuration.
    – bmargulies
    Jul 11, 2015 at 13:05
  • To kill ANSI junk: sed 's/[\([0-9]\{1,2\}\(;[0-9]\{1,2\}\)\?\)\?[mK]//g' -- file
    – lcd047
    Jul 11, 2015 at 18:42

1 Answer 1

3

You'll lose many of the nice features of fish - colourisation, autosuggestions, etc., but you can start script with the environment variable TERM set to dumb. This will result in a much cleaner output. script really is a dumb terminal - the manpage suggests that it is supposed to emulate an old-style hardcopy terminal!

env TERM=dumb script

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.