Prompt text for mac terminal Modification

Source: Internet
Author: User


The prompt text environment variable PS1 of the mac terminal is the prompt text format of the terminal. The default value is \ h: \ W \ u \ $. You can use echo to view the prompt text: echo $ PS1 www.2cto.com PS2 is the prompt after the line break, the default is "> ". Some of the formats available are ): \ d-current system date \ t-current system time \ h-Host Name \ #-command Number (Comannd Number) \ u-USERNAME \ W-current path \ w-current complete path. If you only want to display the command number, enter the following command: PS1 = "\#: "changed to Linux style and run: PS1 =" [\ u @ \ h \ W] \ $ ". However, after exiting, these environment variables are lost. To take effect permanently, you can ~ /. Bash_profile ,~ /. Bash_login ,~ /. Profile or/etc/profile (Administrator permission required). Set echo 'ps1 = "[\ u @ \ h \ W] \ $" '> ~ /. If you want to modify the host name for bash_profile, you can open "share" in "system preference settings" and edit the computer name. --------------------------------------------------------------------- PS1 = "$ c2 \ W $ c3 (\ $ (~ /. Rvm/bin/rvm-prompt v g) $ c1 \ $ (parse_git_branch) $ c_1 $ "$ echo '[[-s" $ HOME /. rvm/scripts/rvm "] &. "$ HOME /. rvm/scripts/rvm "# This loads RVM into a shell session. '> ~ /. Bash_profile

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.