In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to use tmux and Git to customize my Linux terminal, many novices are not very clear about this, in order to help you solve this problem, the following small series will explain in detail for everyone, there are people who need this to learn, I hope you can harvest.
Set up your console so you know which directory you are in and what to do.
I use GNOME Terminal mainly because it is the default setting for my distribution. But my terminal is far from "default." Before I start explaining how to customize it, it looks like this:
I use terminal multiplexing technology tmux to manage my terminal experience.
At the bottom of the image above, you can see my green tmux bar. The [3] at the bottom indicates that it is the third terminal: each terminal runs its own tmux session. (I created a new session to enlarge the font so it's easier to see in screenshots; that's the only difference between it and other terminals.)
The prompt looks fun, right? After cramming 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 passes five times, it doesn't go beyond the screen limits. The cost of this is that simple command sequences (new, copy, move) scroll off my screen faster.
At the end of the line is the Aleph null character, which is the smallest infinite cardinality. I wanted the end of the content line to be obvious, and when I realized that "Alev" and subscript 0 were Unicode characters, I couldn't resist the temptation to use "Alev zero" as part of the prompt. Math geeks, unite!
Before that was my username. Since I use the same dot file (saved in Git) on multiple computers with different user names, this is useful.
Before my username 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 was the name of the machine. All my machines are named after my favorite TV show. My old laptop is mcgyver.
The first digit 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," then G. If the directory is OK and no action is required, then K. If there are files unknown to Git that need to be added or ignored, then yes! If it needs to be submitted, it is C. If there is no upstream, then U. If there is an upstream, but I didn't push, then it's P. The scenario is not based on the current state, but describes the next action I want to take. (To review Git terminology, read this article.)
Terminal functionality is accomplished through an interesting Python program. It runs python -m howsit (after I install howsit in the virtual environment).
You can see the rendering in the image above, but for completeness, here's my PS1:
[$(~/.virtualenvs/howsit/bin/python -m howsit)]\h:\W \u $Did it help you to read the above? If you still want to have further understanding of related knowledge or read more related articles, please pay attention to the industry information channel, thank you for your support.
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.