|
|
Subscribe / Log in / New account

Fish shell 2.1

Fish shell 2.1

Posted Nov 28, 2013 8:06 UTC (Thu) by kleptog (subscriber, #1183)
Parent article: Fish shell 2.1

Sounds like they've done some good work on input side. What I'm wondering is if there is a shell that has done something with the output side.

That is, a shell that captures the output of each command run and keeps them separate. So you can do things like:

- If the output is really large (for example locate found more than you expected) you can hide it/cut it short/remove it from your screen (rather than blowing away your scrollback buffer).

- You can do things like 'send output of last command to $CMD', easier than repeating the whole pipeline so far.

- Preserve the output as far as possible if the size of the terminal changes.

- Open output of last command in $EDITOR.

Is there a shell which has attempted any of this?


to post comments

Fish shell 2.1

Posted Nov 29, 2013 12:09 UTC (Fri) by k8to (guest, #15413) [Link]

zsh has some features in this direction, but I'm not a zsh user so my knowledge is very vague.

If you use emacs

Posted Dec 9, 2013 12:59 UTC (Mon) by alex (subscriber, #1355) [Link]

eshell (which is a shell in elisp, rather than emacs access to the shell) can do an lot of this sort of thing. For example I have the following:
(eval-after-load "eshell"
  '(progn
     (defun my-eshell-kill-output ()
       "Really kill (not delete) all output from interpreter since last input.
Does not delete the prompt."
       (interactive)
       (save-excursion
         (goto-char (eshell-beginning-of-output))
         (insert "*** output flushed ***\n")
         (kill-region (point) (eshell-end-of-output))))

     (add-hook 'eshell-mode-hook #'(lambda ()
                                     (define-key eshell-mode-map (kbd "C-c C-o") 'my-eshell-kill-output)))))


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds