zoukankan      html  css  js  c++  java
  • How to change your shell prompt

     http://www.understudy.net/custom.html

    Descriptioncsh*kshbashtcsh*zsh
    Current working directory $CWD $PWD \w %/ %/
    Current working directory, with one's home directory by `~' $CWD:t $PWD##*/ \W %~ %~
    Full hostname 'uname -n' 'uname -n' N/A %M %M
    Hostname up to the first '.' `hostname -s` `hostname -s` \h %m %m
    Start (stop) boldfacing mode %B (or %b) N/A N/A %B (or %b) %B (or %b)
    Start (stop) standout mode %S (or %s) N/A N/A %S (or %s) %S (or %s)
    Start (stop) underline mode %U (or %u) N/A N/A %U (or %u) %U (or %u)
    User name `whoami` `logname` \u %n %n
    The shell's tty that the user is logged in on %l N/A N/A %| %|
    The current history number %h N/A \! %h (or %!) %h (or %!)
    Name of the shell N/A N/A \s N/A N/A
    Time of day in 12-hour hh:mm AM/PM %t N/A \@ %t (or %@) %t (or %@)
    Time of day in 24-hour hh:mm %T N/A \A %T %T
    Time of day in 12-hour with seconds hh:mm:ss AM/PM %p N/A \T %p N/A
    Time of day in 24-hour with seconds hh:mm:nn %P N/A \t %P %*
    The day in 'dd' format %D N/A N/A %D N/A
    The month in 'Mon' format %w N/A N/A %w N/A
    The month in 'mm' format %W N/A N/A %W N/A
    The year in 'yy' format %y N/A N/A %y N/A
    The year in 'yyyy' format %Y N/A N/A %Y N/A
    The date in "Weekday Month Date" format N/A N/A \d N/A N/A
    The date in day-dd format N/A N/A N/A N/A %w
    The date in Mon/dd/yy format N/A N/A N/A N/A %W
    The date in yy-mm-dd format N/A N/A N/A N/A %D
    The weekday in 'Day' format %d N/A N/A %d N/A
    Descriptioncsh*kshbashtcsh*zsh


    set prompt = "`whoami`%B[%@]%b@%m[%/]# "
    当前用户 加粗 当前时间 不加粗 @ 机器名 [当前工作目录]

  • 相关阅读:
    vue路由懒加载
    Git文档
    Redis启动多个实例,并以windows服务方式运行
    windwos service安装命令
    sqlserver随机查询
    Redis 主从配置
    Unity3D 学习资料
    MAC常用终端命令
    服务器证书安装配置指南(IIS7)
    sql Exists与in 的区别
  • 原文地址:https://www.cnblogs.com/wucg/p/2733608.html
Copyright © 2011-2022 走看看