开发者

Alternatives to BASH/SHELL or ZSHRC

开发者 https://www.devze.com 2023-03-24 16:00 出处:网络
I want an advanced开发者_如何学JAVA shell or command line in Unix which has the following features:

I want an advanced开发者_如何学JAVA shell or command line in Unix which has the following features:

  • output to err and out are in different colours.
  • I should be able to highlight (or find) keywords in the output of the executing command.
  • indicator in the OS task-bar/title as a command is running or completed.

I am looking at an advanced shell that boosts productivity. Is there any alternative?


Re: output to err and out are in different colours ... can be done in Bash.

# colourize stderr in current shell
# note: use sed in line-buffering mode
(
exec 2> >(sed -l -e $'s/.*/\033[31m&\033[m/')
ls -ld / xxxxx
)

# colourize stderr & stdout in current shell
(
exec  1> >(sed -l -e $'s/.*/\033[32m&\033[m/')  2> >(sed -l -e $'s/.*/\033[31m&\033[m/')
ls -ld / xxxxx
)


That isn't a trivial proposition.

There are shells that work with the terminal to echo the currently executing command in the title bar, such as bash on MacOS X.

The commands are autonomous and do not, in general, colour-code their output. So, to get colour-coded output, the shell will have to capture the error outputs of the commands it runs, and arrange to display that information appropriately colour-coded.

Searching the output requires the terminal program to keep the output it displays in a searchable form, and some program (probably the terminal program or possibly the shell) will have to respond to searching operations.


Emacs allows you to run interactive shells such as bash or zsh.

rc works similarly when run in Plan9 -- I'm not sure about its Unix ports.

0

精彩评论

暂无评论...
验证码 换一张
取 消