In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use tmux and Git custom Linux terminals. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
I use the GNOME terminal mainly because it is the default setting for my distribution. But my terminal is far from the "default value". Before I start to explain how to customize it, it now looks like this:
Moshe Zadka's terminal
Start at the bottom
I use terminal multiplexing technology tmux to manage my terminal experience.
At the bottom of the picture above, you can see my green tmux bar. [3] at the bottom indicates that it is the third terminal: each terminal is running its own tmux session. I created a new session to enlarge the font to make it easier to see in the screenshot; this is the only difference between it and other terminals. )
The prompt looks interesting, too, doesn't it? After stuffing too much information into the prompt, I like to insert a newline character so that if I want to improvise shell programming or write a pipeline that has been passed five times, I don't go beyond the screen boundaries. The price is that a simple sequence of commands (new, copy, move) scrolls out of my screen faster.
At the end of the line is the Alef zero Aleph null character, which is the smallest infinite cardinality. I want the end of the content line to be obvious, and when I realize that "Alif" and subscript 0 are both Unicode characters, I can't resist the temptation to use "Alev Zero" as part of the prompt. Math geeks, unite! )
Before that, it was my user name. This is useful because I use the same dot file (saved in Git) on multiple computers with different usernames.
Before my user name, it is the last part of my directory. The full path is usually too long and useless, and the current directory is useful for people like me who often forget what they are doing. Before that is the name of the machine. All my machines are named after my favorite TV programs. My old notebook is mcgyver.
The first bit in the prompt is my favorite: a letter that lets me know the Git status of the directory. If the directory is "not in Git", it is G. If the directory is "No problem" (OK) and no action is required, it is K. If there are files that are unknown to Git that need to be added or ignored, yes. If you need to submit, it is C. If there is no upstream, then it is U. If there is an upstream, but I do not push, then it is P. The solution is not based on the current state, but describes the next action I'm going to do. (to review Git terminology, read this article. )
The terminal function is done through an interesting Python program. It runs python-m howsit (after I installed howsit in a virtual environment).
You can see the rendering in the image above, but for completeness, this is my PS1:
[$(~ / .virtualenvs / howsit/bin/python-m howsit)]\ h:\ W\ u ℵterminal $on "how to use tmux and Git custom Linux terminals" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.