Zsh command tips

Source: Internet
Author: User

10 Zsh command tips:

1: Use ** as the wildcard for the sub-directory:

$ Ls **/*. pyc

Foo. pyc bar. pyc lib/wibble. pyc

$ Rm **/*. pyc

$ Ls **/*. pyc

2: Use the matching mode in file filtering:

$ Ls *. (py | sh)

3: Use modifiers in file filtering, for example: (@) only match the symbolic link:

$ Ls-l *(@)

4: Use the TAB to automatically complete the task. For example, when using man:

$ Man zsh [TAB]

5: You can also use tabs to automatically complete command options:

$ Python-[TAB]

6: or automatically completed during kill:

$ Kill Dock [TAB]

7: When the tab is automatically supplemented, you can use the cursor key (top, bottom, left, and so on ):

$ Man zsh [TAB] [DOWN] [RIGHT] [LEFT] [UP]

8: automatically modify the incorrect input:

$ Pythn-V

Zsh: correct 'pythn' to 'python' [nyae]? Y

Python 2.7.1

9: Use r to repeat the previous command. The replacement method can be used!

$ Touch foo.htm bar.htm

$ Mv foo.htm foo.html

$ R foo = bar

Mv bar.htm bar.html

10: highly customizable prompt. You can use RPROMPT to set the prompt on the right!

$ RPROMPT = "% t"

Zsh installation and Configuration Guide

Nine reasons for using Zsh

Zsh usage tips

Install the ultimate Shell Zsh in Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.