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?
16 | System & Utilities | https://kate-editor.org/2018/01/08/fancy-terminal-prompt/ | Planet KDE |
Смотрите также связанные темы
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.
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
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.