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.rhkb.cn/news/6752.html

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

相关文章

【问题】Chrome安装不受支持的扩展 解决方案

此扩展程序已停用&#xff0c;因为它已不再受支持 Chromium 建议您移除它。详细了解受支持的扩展程序 此扩展程序已停用&#xff0c;因为它已不再受支持 详情移除 解决 1. 解压扩展 2.打开manifest.json 3.修改版本 将 manifest_version 改为3及以上 {"manifest_ver…

在 Windows 系统上,将 Ubuntu 从 C 盘 迁移到 D 盘

在 Windows 系统上&#xff0c;如果你使用的是 WSL&#xff08;Windows Subsystem for Linux&#xff09;并安装了 Ubuntu&#xff0c;你可以将 Ubuntu 从 C 盘 迁移到 D 盘。迁移过程涉及导出当前的 Ubuntu 发行版&#xff0c;然后将其导入到 D 盘的目标目录。以下是详细的步骤…

qt QNetworkRequest详解

1、概述 QNetworkRequest是Qt网络模块中的一个核心类&#xff0c;专门用于处理网络请求。它封装了网络请求的所有关键信息&#xff0c;包括请求的URL、HTTP头部信息等&#xff0c;使得开发者能够方便地在Qt应用程序中执行网络操作&#xff0c;如文件下载、网页内容获取等。QNe…

Python!从0开始学爬虫:(一)HTTP协议 及 请求与响应

前言 爬虫需要基础知识&#xff0c;HTTP协议只是个开始&#xff0c;除此之外还有很多&#xff0c;我们慢慢来记录。 今天的HTTP协议&#xff0c;会有助于我们更好的了解网络。 一、什么是HTTP协议 &#xff08;1&#xff09;定义 HTTP&#xff08;超文本传输协议&#xff…

后盾人JS -- Map与WeakMap类型在JavaScript中的使用

Map类型特点与创建方法 <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0"><title>Document</title> &l…

python实现http文件服务器访问下载

//1.py import http.server import socketserver import os import threading import sys# 获取当前脚本所在的目录 DIRECTORY os.path.dirname(os.path.abspath(__file__))# 设置服务器的端口 PORT 8000# 自定义Handler&#xff0c;将根目录设置为脚本所在目录 class MyHTT…

[STM32 - 野火] - - - 固件库学习笔记 - - -十一.电源管理系统

一、电源管理系统简介 电源管理系统是STM32硬件设计和系统运行的基础&#xff0c;它不仅为芯片本身提供稳定的电源&#xff0c;还通过多种电源管理功能优化功耗、延长电池寿命&#xff0c;并确保系统的可靠性和稳定性。 二、电源监控器 作用&#xff1a;保证STM32芯片工作在…

二叉树相关oj题 1. 检查两颗树是否相同。

二叉树相关oj题 检查两颗树是否相同。OJ链接 另一颗树的子树。OJ链接 if(rootnull)易漏掉 会导致空指针异常翻转二叉树。OJ链接

批量提取多个 Excel 文件内指定单元格的数据

这篇文章将介绍如何从多个相同格式的Excel文件中&#xff0c;批量提取指定单元格的数据&#xff0c;合并后保存到新的工作薄。 全程0代码&#xff0c;可视化操作。 提取前&#xff1a; 提取后&#xff1a; 准备数据 这里准备了3个测试数据 开始提取 打开的卢易表&#xff0…

【真机调试】前端开发:移动端特殊手机型号有问题,如何在电脑上进行调试?

目录 前言一、怎么设置成开发者模式&#xff1f;二、真机调试基本步骤&#xff1f; &#x1f680;写在最后 前言 edge浏览器 edge://inspect/#devices 谷歌浏览器&#xff08;开tizi&#xff09; chrome://inspect 一、怎么设置成开发者模式&#xff1f; Android 设备 打开设…

GA-CNN-LSTM-Attention、CNN-LSTM-Attention、GA-CNN-LSTM、CNN-LSTM四模型多变量时序预测一键对比

GA-CNN-LSTM-Attention、CNN-LSTM-Attention、GA-CNN-LSTM、CNN-LSTM四模型多变量时序预测一键对比 目录 GA-CNN-LSTM-Attention、CNN-LSTM-Attention、GA-CNN-LSTM、CNN-LSTM四模型多变量时序预测一键对比预测效果基本介绍程序设计参考资料 预测效果 基本介绍 基于GA-CNN-LST…

C++入门14——set与map的使用

在本专栏的往期文章中&#xff0c;我们已经学习了STL的部分容器&#xff0c;如vector、list、stack、queue等&#xff0c;这些容器统称为序列式容器&#xff0c;因为其底层是线性序列的数据结构&#xff0c;里面存储的是元素本身。而本篇文章我们要来认识一下关联式容器。 &am…

从崩溃难题看 C 标准库与 Rust:线程安全问题引发的深度思考

在软件开发的世界里&#xff0c;每一次技术的变革和尝试都伴随着未知的挑战。EdgeDB 团队在将部分网络 I/O 代码从 Python 迁移到 Rust 的过程中&#xff0c;就遭遇了一场棘手的问题&#xff0c;这个问题不仅暴露了 C 标准库的线程安全隐患&#xff0c;也让我们对 Rust 的 “安…

班迪录屏:一款好用的屏幕录制软件

Bandicam&#xff08;班迪录屏&#xff09;是一款4K超清屏幕录像软件&#xff0c;最新版Bandicam v8.1.0.2516 绿色正式版已经集成授权信息&#xff0c;用户无需联网验证授权&#xff0c;启动软件即可直接使用已授权版本&#xff0c;享受良好的录制体验。这款软件完全摆脱了试用…

2025年国产化推进.NET跨平台应用框架推荐

2025年国产化推进.NET跨平台应用框架推荐 1. .NET MAUI NET MAUI是一个开源、免费&#xff08;MIT License&#xff09;的跨平台框架&#xff08;支持Android、iOS、macOS 和 Windows多平台运行&#xff09;&#xff0c;是 Xamarin.Forms 的进化版&#xff0c;从移动场景扩展到…

PBFT算法

在我的博客中对于RAFT算法也有详细的介绍&#xff0c;raft算法包含三种角色&#xff0c;分别是&#xff1a;跟随者&#xff08; follower &#xff09;&#xff0c;候选人&#xff08;candidate &#xff09;和领导者&#xff08; leader &#xff09;。集群中的一个节点在某一…

用Python和Tkinter标准模块建立密码管理器

用Python和Tkinter标准模块建立密码管理器 创建一个简单的密码管理器应用程序&#xff0c;帮助用户存储和管理他们的密码。使用Python的tkinter模块来创建一个图形用户界面&#xff08;GUI&#xff09;。 本程序支持 添加、查看、搜索、复制、修改、删除 功能。 本程序使用 …

OpenAI模块重构

文章目录 1.common-openai-starter1.目录结构2.OpenAiProperties.java 新增apiUrl3.OpenAIAutoConfiguration.java4.OpenAiClient.java 使用gson重构 2.common-openai-starter-demo1.目录结构2.application.yml 新增api-url3.OpenAiController.java4.OpenAiApplication.java5.测…

数据标注开源框架 Label Studio

数据标注开源框架 Label Studio Label Studio 是一个开源的、灵活的数据标注平台&#xff0c;旨在帮助开发者和数据科学家轻松创建高质量的训练数据集。它支持多种类型的数据&#xff08;如文本、图像、音频、视频等&#xff09;以及复杂的标注任务&#xff08;如分类、命名实体…

详解:TCP/IP五层(四层)协议模型

一.五层&#xff08;四层&#xff09;模型 1.概念 TCP/IP协议模型分为五层&#xff1a;物理层、数据链路层、网络层、传输层和应用层。这五层每一层都依赖于其下一层给它提供的网络去实现需求。 1&#xff09;物理层&#xff1a;这是最基本的一层&#xff0c;也是最接近硬件…