惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
Google DeepMind News
Google DeepMind News
Apple Machine Learning Research
Apple Machine Learning Research
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
爱范儿
爱范儿
L
LangChain Blog
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog
Hugging Face - Blog
Hugging Face - Blog
G
Google Developers Blog
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net
Recent Announcements
Recent Announcements
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - TopCoder.NET

工作随想20260727 内存操作的几个函数 Windows消息目录 映射网络驱动器命令 均值、中位数、众数 修改Android 界面颜色 设置Android程序图标和程序标题 Android中的EditText默认时不弹出软键盘的方法 解决spring boot中rest接口404,500等错误返回统一的json格式 UTF-8的BOM含义 详解BOM头以及去掉BOM头的方法 2017年总结 Unknown SSL protocol error in connection to xxx:443 springmvc请求参数获取的几种方法 苹果手机输入中文不会触发onkeyup事件 LVS负载均衡DR模式部署 pycharm激活 windows7环境下使用pip安装MySQLdb python 国内镜像 mui 单页面下拉刷新
Mac 终端命令行颜色高亮显示
TopCoder.NET · 2017-07-30 · via 博客园 - TopCoder.NET

一、颜色高亮显示

针对terminal采用bash模式:

  1. 编辑 ~/.bash_profile, 加入以下代码:
    export CLICOLOR=1
    export LSCOLORS=gxfxaxdxcxegedabagacad
  2. 保存,然后重启terminal,搞定,恢复正常了.

详细讲解代码中的涵义:

  1. CLICOLOR: 前景色和背景色的字符串合并值
  2. LSCOLORS: 对于不同变量所采用的颜色方案,具体看如下表格:
    a       black
    b       red
    c       green
    d       brown
    e       blue
    f        magenta
    g      cyan
    h       light grey
    A      bold black, usually shows up as dark grey
    B       bold red
    C      bold green
    D      bold brown, usually shows up as yellow
    E       bold blue
    F       bold magenta
    G     bold cyan
    H      bold light grey; looks like bright white
    x       default foreground or background
    而文件类型列表如下:
    1. directory
    2. symbolic link
    3. socket
    4. pipe
    5. executable
    6. block special
    7. character special
    8. executable with setuid bit set
    9. executable with setgid bit set
    10. directory writable to others, with sticky bit
    11. directory writable to others, without sticky

所以对照这张表就可以得知:

gxfxaxdxcxegedabagacad

就是对于directory而言,它的前景色就是: g(cyan),而背景色就是:x(默认的背景色).

二、自动补全忽略大小写

打开终端,输入:
nano .inputrc

在里面粘贴上以下语句:

set completion-ignore-case on
set show-all-if-ambiguous on
TAB: menu-complete

Control+O,保存,重启终端,OK!