替代BASH / SHELL或ZSHRC [英] Alternatives to BASH/SHELL or ZSHRC

查看:100
本文介绍了替代BASH / SHELL或ZSHRC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Unix的一种先进的shell或命令行具有以下特点:

I want an advanced shell or command line in Unix which has the following features:


  • 输出犯错进出都在不同的颜色。

  • 我应该能够突出(或查找)在执行命令的输出关键字。

  • 在操作系统任务栏/标题为命令指示正在运行或已完成。

我在看一个先进的外壳,提高了生产效率。有没有什么别的选择吗?

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
)

这篇关于替代BASH / SHELL或ZSHRC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆