zoukankan      html  css  js  c++  java
  • tcsh shell configuration --- .tcshrc / .tcshrc.user / .......

    contents of file "~/.tcshrc"

    # in the beginning
    set user_tcshrc="$HOME/.tcshrc.user"
    
    #in the end
    if (-r "${user_tcshrc}") then
          source "${user_tcshrc}"
    endif
    

    contents of the file "~/.tcshrc.user"

    set cn = "%{e[0m%}" # default color and form setting
    set cr = "%{e[31m%}"
    set cp = "%{e[4;35m%}"   # 4 for underline text
    set cg = "%{e[1;32m%}"   # 1 for brighter color
    
    set prompt = "$cg%B%U%h %b%u$cg%U[%~]%u$cn "
    
    # %B (%b): start (end) boldfacing mode      %B,%b can be used in pair, or it may influence next setting
    # %U (%u): start (end) underline mode       %U,%u can be used in pair, or it may influence next setting
    # %n: the user name
    # @: show @ itself
    # %m: hostname up to the first dot "."
    # %M: the full hostname
    # %~: the full working directory
    # %h: history number of command
    :<<!
    the color settings:
    
    1: brighter color
    4: underline text
    5: flashing text
    
    foreground      background      color
    30              40              black
    31              41              red 
    32              42              green 
    33              43              yellow 
    34              44              blue
    35              45              purple
    36              46              cyan
    37              47              white(grey)
    !
    
    alias g 'gvim'
    alias .. 'cd ..'
    alias - 'cd -'
    alias la 'ls -al'
    
    alias checkout 'source ../../xxx.csh'   # "" and '' are both correct
    alias cd 'cd !* ; ls'  # ls while cd to the very directory
    
    # setenv 设置全局变量,可以传递给子shell,类似于bash中的export;
    # set 设置局域变量,不能传递给子shell,而当同时使用set和setenv来设置同一个变量时,当前进程中,会优先使用set设置的值,所以要注意使用
    
    set prompt = "$cg%B%U%h %b%u$cg%U[%~]%u$cn "  # shown as follows
    

    NOTE: after being modified, don't forget to 'source' it

    --------------------------------------------- Study needs record, record needs review ---------------------------------------------
  • 相关阅读:
    linux内核中GNU C和标准C的区别
    linux内核中GNU C和标准C的区别
    Getting start with dbus in systemd (02)
    Getting start with dbus in systemd (01)
    Getting start with dbus in systemd (03)
    物理内存相关的三个数据结构
    数据类型对应字节数(32位,64位 int 占字节数)
    Linux kernel 内存
    共模电感的原理以及使用情况
    [原创]DC-DC输出端加电压会烧毁
  • 原文地址:https://www.cnblogs.com/georgemxx/p/13616493.html
Copyright © 2011-2022 走看看