In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what is the uplink extension command of Linux". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn what the Linux uplink extension command is.
Oh My Zsh is a community-driven command-line tool, and as its home page says, Oh My Zsh is a way of life. It is based on the zsh command line, provides theme configuration, plug-in mechanism, and has built-in convenient operation. Give us a whole new way to use the command line.
What is Oh My Zsh?
The name Oh My Zsh sounds interesting. It is an extension toolset based on the zsh command line and provides rich extension capabilities. On Oh My Zsh's home page, there is a clear explanation of its definition: http://ohmyz.sh
About zsh, it is a command line program. The bash command line is used by default on our MAC system, and zsh is another command line environment. About zsh, you can go to its official website: http://www.zsh.org/
We can enter this command on the command line to see if the zsh command line is installed on our computers:
The code is as follows:
Zsh-version
If installed, this command outputs the current version number of zsh. Once we have confirmed that zsh has been installed, we can continue to install Oh My Zsh.
Oh My Zsh is nothing.
When it comes to command-line tools, our first feeling, Oh My Zsh is this?
Mm-hmm. No, no, no. This is only half true. Oh My Zsh is just a configuration wrapper framework for the zsh command line environment, but it does not provide a command line window, let alone a separate APP.
The command line interface in the figure above can be a Terminal program that comes with the Mac system, or a third-party command line program, such as iTerm.
In short, Oh My Zsh is not a substitute for a command-line tool, but complements them. You can use Oh My Zsh with iTerm so that you can get the convenience features of the Oh My Zsh command line environment, as well as the operational support of the command line GUI tool provided by iTerm.
As Oh My Zsh's home page says: "when you use these cool command-line tools, people will come to your computer and praise your command line. Welcome a lot of likes."
Install Oh My Zsh
We know the general situation of Oh My Zsh, so let's start the installation.
The installation of Oh My Zsh is very simple, and it is clearly stated on its home page: http://ohmyz.sh
It can be installed by curl or wget with a single command.
Curl mode:
The code is as follows:
$sh-c "$(curl-fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Wget mode:
The code is as follows:
$sh-c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh-O -)"
The output during installation is as follows:
The code is as follows:
Cloning Oh My Zsh...
Cloning into'/ Users/icafe/.oh-my-zsh'...
Remote: Counting objects: 712, done.
Remote: Compressing objects: 100% (584 Universe), done.
Remote: Total 712 (delta 15), reused 522 (delta 4), pack-reused 0
Receiving objects: 100% (712 KiB), 443.58 KiB/s, done.
Resolving deltas: 100% (15 ppm 15), done.
Checking connectivity... Done.
Looking for an existing zsh config...
Using the Oh My Zsh template file and adding it to / .zshrc
Copying your current PATH and adding it to the end of /. Zshrc for you.
Time to change your default shell to zsh!
_
_ / / _ / / _
/ / / ``/ / /
/ / (_ _) /
\ /
/ _ /.... is now installed!
Please look over the / .zshrc file to select plugins, themes, and options.
P.s. Follow us at https://twitter.com/ohmyzsh.
P.p.s. Get stickers and t-shirts at http://shop.planetargon.com.
At this point, Oh My Zsh is installed successfully. Now you can see that our command line prompt looks like this:
Set theme
After the installation, we can use it. Let's simply configure it first.
Oh My Zsh provides many theme styles. We can set the theme style according to our preferences. The theme configuration can be seen in the ~ / .zshrc file. If you open this file with an editor you are familiar with, you can find this item:
The code is as follows:
ZSH_THEME= "robbyrussel"
As you can see, the theme we use by default is called robbyrussel. Its display effect is something like this:
Oh My Zsh comes with some default themes by default, which are stored in the ~ / .oh-my-zsh/themes directory. We can look at these topics:
The code is as follows:
Themes git: (master) ls
3den.zsh-theme essembeh.zsh-theme junkfood.zsh-theme rgm.zsh-theme
Soliah.zsh-theme evan.zsh-theme kafeitu.zsh-theme risto.zsh-theme
Adben.zsh-theme example.zsh-theme kardan.zsh-theme rixius.zsh-theme
Af-magic.zsh-theme fino-time.zsh-theme kennethreitz.zsh-theme rkj-repos.zsh-theme
Afowler.zsh-theme fino.zsh-theme kiwi.zsh-theme rkj.zsh-theme
Agnoster.zsh-theme fishy.zsh-theme kolo.zsh-theme robbyrussell.zsh-theme
Alanpeabody.zsh-theme flazz.zsh-theme kphoen.zsh-theme sammy.zsh-theme
Amuse.zsh-theme fletcherm.zsh-theme lambda.zsh-theme simonoff.zsh-theme
Apple.zsh-theme fox.zsh-theme linuxonly.zsh-theme simple.zsh-theme
Arrow.zsh-theme frisk.zsh-theme lukerandall.zsh-theme skaro.zsh-theme
....
Well, there are quite a large number of default themes. This is the power of community drivers, which can be reflected in the Logo of Oh My Zsh.
There are so many themes that can satisfy your preferences. We just need to configure the desired theme in the. / zshrc file. For example, if we want to use the lambda.zsh-theme theme, we just need to configure it like this:
The code is as follows:
ZSH_THEME= "lambda"
Then save the file and open a new command line window to see the effect. So how to quickly find out which ones we like with so many themes, we can also set them like this:
The code is as follows:
ZSH_THEME= "random"
We set the theme to random so that every time we open the command line window, we randomly select one of the default themes. In this way, if we prefer the current theme, we can directly use the echo command to output the name of the current topic:
The code is as follows:
Echo $ZSH_THEME
Then set it to the configuration file.
Quickly select directories and files
The subject has been understood, and we are moving on. We use another command line environment, obviously not only to use more theme styles, but more importantly, this command line environment makes it easier for us to use. So, let's continue to take a look at the convenience provided by Oh My Zsh.
When we use command-line tools to switch between directories and files with commands like cd, one of the pain points is that we have to look at the directory structure and file names first. For example, if we want to enter a directory with the cd command, we must first know the name of the directory. This is less accustomed to friends who are used to using GUI tools like Finder. In bash, we usually use the ls command to list the current directory, and then use the cd command to enter a directory:
The code is as follows:
Ls-l
~
Drwx- 4 icafe staff 136 Aug 9 12:34 Applications
Drwx-+ 40 icafe staff 1360 Oct 31 11:15 Desktop
Drwx-+ 13 icafe staff 442 Oct 30 19:49 Documents
Drwx-+ 46 icafe staff 1564 Oct 31 08:15
Drwx-@ 57 icafe staff 1938 Oct 27 05:45 Library
Cd Library/
The bash on Mac has also made some optimizations. After entering part of the directory prefix, we can press the Tab key to automatically complete it to help us match the directory name at the beginning of this prefix:
The code is as follows:
Cd Li
Press the Tab key:
The code is as follows:
Cd Library/
The directory name will be completed for us according to the prefix matching function. But this still has some inconvenience, such as this auto-completion function is exactly matching case, join us to enter cd lib and then press the Tab key, it will not be able to match to the Library directory, because their case does not match.
Oh My Zsh provides a better solution by typing cd lib on the command line of Oh My Zsh and pressing the Tab key:
The code is as follows:
Cd Library/
Successfully matched to the Library directory. If we add a space after the cd command and press the Tab key:
The code is as follows:
Cd
Applications/ System/ bin/ dev/ net/ sbin/ var@
Library/ Users/ cores/ etc@ opt/ tmp@ user Information @
Network/ Volumes/ data/ home/ private/ usr/
Directly lists all the subdirectories and files in the current directory, in this state, if we continue to press a Tab key.
You will find that in this directory and file list, we can move the cursor and select:
This feature of Oh My Zsh is still very convenient.
At this point, I believe you have a deeper understanding of what the Linux uplink extension command is, so you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.