Git Bash 配置 zsh

博客食用更佳 博客链接

安装 zsh

安装 Zsh

|450

安装 Oh-my-zsh

github仓库

sh -c "$(curl -fsSL https://install.ohmyz.sh/)"
|550

让 zsh 成为 git bash 默认终端

vi ~/.bashrc

写入:

if [ -t 1 ]; thenexec zsh
fi
source ~/.bashrc

再重启即可。

更换主题

主题选择

安装主题 powerlevel10k

git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k

打开配置文件

vi ~/.zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"

使得主题生效

source ~/.zshrc

如果想重新配置 powerlevel10k 界面

p10k configure

插件安装

高亮插件

zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

自动补全插件

zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

使插件生效

vi ~/.zshrc

插件生效

plugins=( git zsh-syntax-highlighting zsh-autosuggestions )
source ~/.zshrc

使用 lsd 配色

官方仓库

|575

安装 lsd

可以使用 scoop 方式,其他方式见官方文档

scoop install lsd

$HOME/.config/lsd 下创建配置文件 config. yml

|325
# == Classic ==
# This is a shorthand to override some of the options to be backwards compatible
# with `ls`. It affects the "color"->"when", "sorting"->"dir-grouping", "date"
# and "icons"->"when" options.
# Possible values: false, true
classic: false# == Blocks ==
# This specifies the columns and their order when using the long and the tree
# layout.
# Possible values: permission, user, group, context, size, date, name, inode, links, git
blocks:- permission- user- group- size- date- name# == Color ==
# This has various color options. (Will be expanded in the future.)
color:# When to colorize the output.# When "classic" is set, this is set to "never".# Possible values: never, auto, alwayswhen: auto# How to colorize the output.# When "classic" is set, this is set to "no-color".# Possible values: default, custom# When "custom" is set, lsd will look in the config directory for `colors.yaml`.theme: default# == Date ==
# This specifies the date format for the date column. The freeform format
# accepts a strftime like string.
# When "classic" is set, this is set to "date".
# Possible values: date, locale, relative, '+<date_format>'
# `date_format` will be a `strftime` formatted value. e.g. `date: '+%d %b %y %X'` will give you a date like this: 17 Jun 21 20:14:55
date: date# == Dereference ==
# Whether to dereference symbolic links.
# Possible values: false, true
dereference: false# == Display ==
# What items to display. Do not specify this for the default behavior.
# Possible values: all, almost-all, directory-only
# display: all# == Icons ==
icons:# When to use icons.# When "classic" is set, this is set to "never".# Possible values: always, auto, neverwhen: auto# Which icon theme to use.# Possible values: fancy, unicodetheme: fancy# Separator between icon and the name# Default to 1 spaceseparator: " "# == Ignore Globs ==
# A list of globs to ignore when listing.
# ignore-globs:
#   - .git# == Indicators ==
# Whether to add indicator characters to certain listed files.
# Possible values: false, true
indicators: false# == Layout ==
# Which layout to use. "oneline" might be a bit confusing here and should be
# called "one-per-line". It might be changed in the future.
# Possible values: grid, tree, oneline
layout: grid# == Recursion ==
recursion:# Whether to enable recursion.# Possible values: false, trueenabled: false# How deep the recursion should go. This has to be a positive integer. Leave# it unspecified for (virtually) infinite.# depth: 3# == Size ==
# Specifies the format of the size column.
# Possible values: default, short, bytes
size: default# == Permission ==
# Specify the format of the permission column
# Possible value: rwx, octal, attributes (windows only), disable
permission: rwx# == Sorting ==
sorting:# Specify what to sort by.# Possible values: extension, name, time, size, versioncolumn: name# Whether to reverse the sorting.# Possible values: false, truereverse: false# Whether to group directories together and where.# When "classic" is set, this is set to "none".# Possible values: first, last, nonedir-grouping: none# == No Symlink ==
# Whether to omit showing symlink targets
# Possible values: false, true
no-symlink: false# == Total size ==
# Whether to display the total size of directories.
# Possible values: false, true
total-size: false# == Hyperlink ==
# Attach hyperlink to filenames
# Possible values: always, auto, never
hyperlink: never# == Symlink arrow ==
# Specifies how the symlink arrow display, chars in both ascii and utf8
symlink-arrow:# == Header ==
# Whether to display block headers.
# Possible values: false, true
header: true# == Literal ==
# Whether to show quotes on filenames.
# Possible values: false, true
literal: false# == Truncate owner ==
# How to truncate the username and group names for a file if they exceed a certain
# number of characters.
truncate-owner:# Number of characters to keep. By default, no truncation is done (empty value).after:# String to be appended to a name if truncated.marker: ""

要注意 permission,改成其他的可能会导致用户名和组别显示 ?

vi ~/.zshrc

添加别名

alias ls='lsd'
alias l='ls -l'
alias la='ls -a'
alias lla='ls -la'
alias lt='ls --tree'

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/68488.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Controller 层优化四步曲

Controller 层优化四步曲 前言 在开发过程中&#xff0c;Controller 层作为系统与外界交互的桥梁&#xff0c;承担着接收请求、解析参数、调用业务逻辑、处理异常等职责。 然而&#xff0c;随着业务复杂度的增加&#xff0c;Controller 层的代码往往会变得臃肿且难以维护。 …

面试经典150题——图

文章目录 1、岛屿数量1.1 题目链接1.2 题目描述1.3 解题代码1.4 解题思路 2、被围绕的区域2.1 题目链接2.2 题目描述2.3 解题代码2.4 解题思路 3、克隆图3.1 题目链接3.2 题目描述3.3 解题代码3.4 解题思路 4、除法求值4.1 题目链接4.2 题目描述4.3 解题代码4.4 解题思路 5、课…

第25章 项目启航前的密谈

在那弥漫着严谨与专注气息的会议室里&#xff0c;苏睿所长端坐在会议桌前&#xff0c;宛如一座沉稳的山峰&#xff0c;散发着一种让人安心的力量。他的神情认真而庄重&#xff0c;目光中透着几分感慨&#xff0c;仿佛在时光的长河中回溯着项目的点点滴滴。微微侧身看向东方艾艾…

FLTK - FLTK1.4.1 - 搭建模板,将FLTK自带的实现搬过来做实验

文章目录 FLTK - FLTK1.4.1 - 搭建模板&#xff0c;将FLTK自带的实现搬过来做实验概述笔记my_fltk_test.cppfltk_test.hfltk_test.cxx用adjuster工程试了一下&#xff0c;好使。END FLTK - FLTK1.4.1 - 搭建模板&#xff0c;将FLTK自带的实现搬过来做实验 概述 用fluid搭建UI…

npm cnpm pnpm npx yarn的区别

npm、cnpm、pnpm、npx、yarn 这几个工具都与 Node.js 项目的包管理和命令执行相关&#xff0c;它们的区别具体如下&#xff1a; 本质与功能定位 npm&#xff1a;是 Node.js 官方的包管理工具&#xff0c;提供了安装、卸载、更新、发布等全方位的包管理功能&#xff0c;还能通…

【外文原版书阅读】《机器学习前置知识》1.线性代数的重要性,初识向量以及向量加法

目录 ​编辑 ​编辑 1.Chapter 2 Why Linear Algebra? 2.Chapter 3 What Is a Vector? 个人主页&#xff1a;Icomi 大家好&#xff0c;我是Icomi&#xff0c;本专栏是我阅读外文原版书《Before Machine Learning》对于文章中我认为能够增进线性代数与机器学习之间的理解的…

为AI聊天工具添加一个知识系统 之76 详细设计之17 正则表达式 之4 正则表达式模板

Q712、三“化” &#xff08;使用三种不同的定义方法&#xff1a;规定定义法 -线性回归/内涵定义法--一阶迭代/外延定义法--单调递归&#xff09; 整体形成 一个双人零和 的局面 <Class()外延式, Type()内涵式> Method()规定式。给出 问题“law 是什么”的三种答案&#…

Python设计模式 - 组合模式

定义 组合模式&#xff08;Composite Pattern&#xff09; 是一种结构型设计模式&#xff0c;主要意图是将对象组织成树形结构以表示"部分-整体"的层次结构。这种模式能够使客户端统一对待单个对象和组合对象&#xff0c;从而简化了客户端代码。 组合模式有透明组合…

Java 基于 SpringBoot 的校园外卖点餐平台微信小程序(附源码,部署,文档)

博主介绍&#xff1a;✌程序员徐师兄、7年大厂程序员经历。全网粉丝12w、csdn博客专家、掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java技术领域和毕业项目实战✌ &#x1f345;文末获取源码联系&#x1f345; &#x1f447;&#x1f3fb; 精彩专栏推荐订阅&#x1f447;…

作業系統:設計與實現-母本

2023 南京大學《作業系統:設計與實現》 課程主頁(含講義):https://jyywiki.cn/OS/2023/ 【Python 实现操作系统模型 [南京大学2023操作系统-P4] (蒋炎岩)-哔哩哔哩】 https://b23.tv/jakxDbh 用Python实现操作系统模型讲义 一、操作系统基础概念 1.1 定义 操作系统(Oper…

当高兴、尊重和优雅三位一体是什么情况吗?

英语单词 disgrace 表示“失脸&#xff0c;耻辱&#xff0c;不光彩&#xff0c;名誉扫地”一类的含义&#xff0c;可做名词或动词使用&#xff0c;含义基本一致&#xff0c;只是词性不同。 disgrace n.丢脸&#xff1b;耻辱&#xff1b;不光彩&#xff1b;令人感到羞耻的人(或…

2218. 从栈中取出 K 个硬币的最大面值和

2218. 从栈中取出 K 个硬币的最大面值和 题目链接&#xff1a;2218. 从栈中取出 K 个硬币的最大面值和 代码如下&#xff1a; class Solution { public:int maxValueOfCoins(vector<vector<int>>& piles, int k) {vector<vector<int>> memo(pile…

RTOS面试合集

目录 啥是RTOS 进程的状态 RTOS的调度 什么是时间片轮转调度&#xff1f; 如何实现基于优先级的抢占调度&#xff1f; 任务调度中的“时间窗”概念是什么&#xff1f; 任务和线程 如何在RTOS中创建和删除任务&#xff1f; 任务间如何共享数据&#xff1f; 如何管理任务…

AI学习指南Ollama篇-Ollama性能优化与监控

一、引言 (一)背景介绍 随着大语言模型(LLM)在本地部署中的广泛应用,性能优化和监控成为提升效率的关键。大语言模型通常对计算资源和内存有较高要求,而本地部署环境可能受到硬件资源的限制。因此,优化模型的性能并实时监控其运行状态,对于确保高效运行至关重要。 (…

知识体系、知识管理角度的赚钱思考

从知识管理和知识体系的角度出发&#xff0c;赚钱的问题思考清单可以帮助你系统地梳理和优化自己在财富创造方面的策略。 以下是一个详细的清单&#xff0c;涵盖从知识获取、技能提升到实际应用的各个环节&#xff0c;帮助你在赚钱的道路上更加高效和有条理。 一、赚钱的目标与…

LeetCode热题100(八)—— 438.找到字符串中所有字母异位词

LeetCode热题100&#xff08;八&#xff09;—— 438.找到字符串中所有字母异位词 题目描述代码实现思路解析 你好&#xff0c;我是杨十一&#xff0c;一名热爱健身的程序员在Coding的征程中&#xff0c;不断探索与成长LeetCode热题100——刷题记录&#xff08;不定期更新&…

八股——Java基础(四)

目录 一、泛型 1. Java中的泛型是什么 ? 2. 使用泛型的好处是什么? 3. Java泛型的原理是什么 ? 什么是类型擦除 ? 4.什么是泛型中的限定通配符和非限定通配符 ? 5. List和List 之间有什么区别 ? 6. 可以把List传递给一个接受List参数的方法吗&#xff1f; 7. Arra…

naivecv的设计与实现(2): 读写gray和rgb图像

图像读写并不是图像处理的核心&#xff0c;仅仅作为调试工具&#xff0c; 是一种手段而非目的。 图像文件格式的选择 正因如此&#xff0c;对gray和rgb图像的读写&#xff0c;存在多种方法。 最常见的三种图像文件格式&#xff1a; bmppngjpg 实际上有更简单的方式&#xf…

【llm对话系统】LLM 大模型Prompt 怎么写?

如果说 LLM 是一个强大的工具&#xff0c;那么 Prompt 就是使用这个工具的“说明书”。一份好的 Prompt 可以引导 LLM 生成更准确、更相关、更符合你期望的输出。 今天&#xff0c;我们就来聊聊 LLM Prompt 的编写技巧&#xff0c;掌握这把解锁 LLM 潜能的钥匙&#xff01; 一…

设计壁纸时,色彩选择是至关重要的一步

在设计壁纸时&#xff0c;色彩选择是至关重要的一步&#xff0c;它直接影响到壁纸的整体视觉效果和情感传达。以下是一些色彩选择的技巧&#xff0c;帮助你在设计中更好地运用色彩&#xff1a; 一、了解色彩理论 色彩轮&#xff1a; 基本颜色&#xff1a;红、黄、蓝是三原色&am…