Irc-Unix.net

Главная | Actual Topics | Обратная связь | Guest Book | В избранное | Сделать домашней
Категории
 System & Utilities
 Unix News
 OS Emulator
 Developing
 Learning/Education
 Games
 Humour
Каталог статей
Все статьи

Antispam
Статьи
Биллу Гейтсу тоже предлагают избавиться ...
Вымогательство в борьбе со спамом
Календарь

January, 2018
ПнВтСрЧтПтСбВс
1234567
891011121314
15161718192021
22232425262728
293031
Опросы
Какой из этих ОС Вы отдаете большее предпочтение?

QNX
FreeBSD
Linux(any)
Solaris
Mac OS
Windows XP
Windows 2003
Что такое ОС? :)


Результаты
Другие опросы

Всего голосов: 325
Комментарии: 0
Ссылки

Архив Новостей
 January 2018 (5)
 December 2017 (14)
 November 2017 (15)
 October 2017 (19)
 September 2017 (18)
 August 2017 (13)
 February 2017 (14)
 January 2017 (19)
 December 2016 (16)
 November 2016 (16)
 October 2016 (21)
 September 2016 (18)
 August 2016 (16)
 July 2016 (16)
 June 2016 (20)
 May 2016 (18)
 April 2016 (15)
 March 2016 (22)
 February 2016 (17)
 January 2016 (15)
 December 2015 (15)
 November 2015 (22)
 October 2015 (20)
 September 2015 (17)
 August 2015 (25)
 July 2015 (20)
 June 2015 (23)
 May 2015 (21)
 April 2015 (17)
 March 2015 (19)
 February 2015 (9)
 January 2015 (23)
 December 2014 (9)
 November 2014 (13)
 October 2014 (12)
 September 2014 (18)
 August 2014 (20)
 July 2014 (10)
 June 2014 (12)
 May 2014 (12)
 April 2014 (10)
 March 2014 (22)
 February 2014 (10)
 January 2014 (8)
 December 2013 (26)
 November 2013 (53)
 October 2013 (40)
 September 2013 (48)
 August 2013 (63)
 July 2013 (56)
 June 2013 (52)
 May 2013 (49)
 April 2013 (67)
 March 2013 (74)
 February 2013 (63)
 January 2013 (62)
 December 2012 (62)
 November 2012 (66)
 October 2012 (68)
 September 2012 (48)
 August 2012 (75)
 July 2012 (60)
 June 2012 (71)
 May 2012 (69)
 April 2012 (85)
 March 2012 (86)
 February 2012 (90)
 January 2012 (81)
 December 2011 (103)
 November 2011 (118)
 October 2011 (74)
 September 2011 (2)
 June 2011 (110)
 May 2011 (118)
 April 2011 (111)
 March 2011 (112)
 February 2011 (101)
 January 2011 (119)
 December 2010 (117)
 November 2010 (118)
 October 2010 (131)
 September 2010 (117)
 August 2010 (226)
 July 2010 (351)
 June 2010 (305)
 May 2010 (319)
 April 2010 (343)
 March 2010 (329)
 February 2010 (311)
 January 2010 (312)
 December 2009 (266)
 November 2009 (156)
 July 2009 (101)
 June 2009 (279)
 May 2009 (365)
 April 2009 (348)
 March 2009 (347)
 February 2009 (323)
 January 2009 (318)
 December 2008 (237)
 November 2008 (155)
 October 2008 (334)
 September 2008 (310)
 August 2008 (343)
 July 2008 (362)
 June 2008 (322)
 May 2008 (576)
 April 2008 (1276)
 March 2008 (1658)
 February 2008 (250)
 January 2008 (6)
 November 2007 (1)
 September 2007 (1)
 June 2007 (1)
 May 2007 (1)
 March 2007 (1)
 January 2007 (2)
 December 2006 (1)
 October 2006 (2)
 September 2006 (1)
 August 2006 (2)

Fancy Terminal Prompt

System & Utilities

By default, the terminal looks as follows on my Linux distribution:

However, if you are working a lot on the terminal, there are a lot of scripts and tricks available in the net that improve the information displayed in the terminal in many ways. For instance, since many many years, I have the following at the end of my ~/.bashrc:

# use a fancy prompt
PS1=\"[\033[01;32m]u@h[\033[00m]:[\033[01;34m]W[\033[00m]\"
PS1=\"$PS1 `if [ $? = 0 ]; then echo -e '[\033[01;32m]:-)';\"
PS1=\"$PS1 else echo -e '[\033[01;31m]:-(' $?; fi`[\033[00m]\"
PS1=\"$PS1 $(__git_ps1 \"(%s)\") $ \"

Once you open a new terminal, then the appearance is as follows:

As you can see, now I have nice colors: The hostname is green, the folder is blue, the return value of the last executed command is a green �� in case of success (exit code = 0), and a red �� in case of errors (exit code != 0). In addition, the last part shows the current git branch (master). Showing the git branch is very useful especially if you are using arc a lot and work with many branches.

I am sure there are many more cool additions to the terminal. If you have some nice additions, please share – maybe also as a new blog?





  


Разместил: Planet KDE | Дата: 09.01.2018 | Прочитано: 9 | Раздел: System & Utilities   

Рейтинг статьи

Средняя оценка: 0.00/0Средняя оценка: 0Всего голосов:0

Отлично
Хорошо Нормально Пойдёт Плохо


Смотрите также связанные темы

30.04.2008 x11/terminator - 0.8.1
Terminator is a Python terminal program, using the same widget as gnome-terminal to provide a tiled set of terminals in as little space as possible. WWW: http://www.tenshu.net/terminator/ PR: ports/122489 Submitted by: Thomas Hurst <tom at hur.st>
02.08.2016 3 graphical tools for Git
In this article, we'll take a look at some convenience add-ons to help you integrate Git comfortably into your everyday workflow. I learned Git before many of these fancy interfaces existed, and my workflow is frequently text-based anyway, so most of the inbuilt conveniences of Git suit me pretty well.
19.10.2017 Top 7 open source terminal emulators for Linux
Do you spend a good amount of your time at the command line? These terminal emulators will help make it a better experience. Are you a system administrator, Linux power user, or someone who just spends a lot of time at the command line? Chances are your choice of terminal emulator says something about you.
29.02.2008 print/hs-hscolour - 1.9
hscolour is a small Haskell script to colourise Haskell code. It currently has four output formats: ANSI terminal codes, HTML 3.2 with <font> tags, HTML 4.01 with CSS, and LaTeX. author: Malcolm Wallace maintainer: Malcolm Wallace license: GPL WWW: http://www.cs.york.ac.uk/fp/darcs/hscolour package-url: ftp://ftp.cs.york.ac.uk/pub/haskell/contrib/ Exposed-Modules: Language.Haskell.HsColour, Language.Haskell.HsColour.ANSI, Language.Haskell.HsColour.Anchors, Language.Haskell.HsColour.Classify, Language.Haskell.HsColour.ColourHighlight, Language.Haskell.HsColour.Colourise, Language.Haskel...
22.03.2008 net/p5-Net-Jifty - 0.06
Jifty is a full-stack web framework. It provides an optional REST interface for applications. Using this module, you can interact with that REST interface to write client-side utilities. You can use this module directly, but you'll be better off subclassing it. This module also provides a number of convenient methods for writing short scripts. For example, passing use_config => 1 to new will look at the config file for the username and password (or SID) of the user. If neither is available, it will prompt the user for them. WWW: http://search.cpan.org/dist/Net-Jifty/
09.04.2008 Drawing assistant : ruler
Sure you can draw line with the line tool. But I have never felt confortable with that, I think that's because the resulting line looks too perfect, as you can see on the screenshots below (it's the top right line). What I want is to have the virtual version of physical tools (rulers, compas, we can even imagine more fancy stuff). That's what a drawing assistant is. It controls the drawing on the image, depending on the mouse/stylus movement. So for the ruler drawing assistant, it will force to draw a line. There is a control over the magnetism of the tools, this control how much freedom the a...
13.12.2008 The Linux CLI for Beginners, or, Fear Not the Linux Command Line
On KDE look in your start menus for Konsole, and on Gnome look for Terminal or Gnome-Terminal. There are dozens of different terminals: xterm, aterm, rxvt, eterm, and many more.
31.01.2009 Virtualizing XenApp on XenServer 5.0 and ESX 3.5
New performance results are out that show ESX supports more XenApp users with lower CPU usage than XenServer. Click through for the whole thing, including the details of the user-centric workload. For perormance testing of desktop or terminal services virtualization,...
07.06.2009 Recovering an ESX host from GRUB prompt (1007908)
· ESX host stops booting at GRUB prompt. The screen displays grub> , and it seems to be waiting for commands · ESX host does not recover after the GRUB prompt · The /boot/grub/grub.conf file not...
23.06.2009 Down
Screen is a program that allows you to have multiple logins on one terminal. It is useful in situations where you are telnetted into a machine or connected via a dumb terminal and want more than just one login.screen-profiles includes a set of profiles for the GNU screen window manager.
Нет комментариев. Почему бы Вам не оставить свой?
Вы не можете отправить комментарий анонимно, пожалуйста зарегистрируйтесь.
Google Search
Google

Web irc-unix.net

Топ Новостей
1: Interview with Pierre Geier
Hot NEWS!
Просмотров - 584


2: Interview with Laura
Просмотров - 525

3: Use ownCloud provided Packages, then VM, then Zip, no distro packages.
Просмотров - 520

4: Plasma Components on Android: Accelerating Subsurface Mobile Development
Просмотров - 507

5: KWrite on Mac – Application Bundle
Просмотров - 474

6: Plasma 5 Powers KaOS Productivity
Просмотров - 471

7: Netrunner Desktop 16.09 "Avalon" Linux OS Is Out with Kernel 4.7, KDE Plasma 5.7
Просмотров - 470

8: New Year Calligra Words Sprint
Просмотров - 451

9: My experience at Randa Meetings, 2015
Просмотров - 444

10: FOSDEM Desktops DevRoom 2016 Call for Participation
Просмотров - 442

11: digiKam 5.0.0-beta2 is released
Просмотров - 437

12: KDevelop 5.0.2 released for Windows and Linux
Просмотров - 419

13: Amarok is slowly catching up
Просмотров - 411

14: HIG about Simple vs. Advanced Settings
Просмотров - 401

15: Game Art Quest Kickstarter!
Просмотров - 394

Google 120X240
Ссылки

Главная | Actual Topics | Статьи | Обратная связь | Guest Book
Генерация: 1.174 сек. и 13 запросов к базе данных за 1.124 сек.
Powered by SLAED CMS © 2005-2007 SLAED. All rights reserved.