oh my zsh的安装
oh my zsh的安装
curl安装
sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"
设置固定主题
vim ~/.zshrc
# 找到 ZSH_THEME
# robbyrussell 是默认的主题
ZSH_THEME="robbyrussell"
# ZSH_THEME="样式名称"
Powerlevel10k安装
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
Powerlevel10k 配置
vim ~/.zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"
使得左侧显示用户名和主机
- 打开
/home/username中的.p10k.zsh文件找到其中的配置
# The list of segments shown on the left. Fill it with the most important segments.
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
# os_icon # os identifier
dir # current directory
vcs # git status
# prompt_char # prompt symbol
)
- 向其中添加一个
context
# The list of segments shown on the left. Fill it with the most important segments.
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
context #user@hostname
# os_icon # os identifier
dir # current directory
vcs # git status
# prompt_char # prompt symbol
)
- 如果想只显示用户名而不显示主机名
# Context format when running with privileges: user@hostname.
typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%n@%m'
# Context format when in SSH without privileges: user@hostname.
typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'
# Default context format (no privileges, no SSH): user@hostname.
typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'
改为:
# Context format when running with privileges: user@hostname.
typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%n'
# Context format when in SSH without privileges: user@hostname.
typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'
# Default context format (no privileges, no SSH): user@hostname.
typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n'
就可以在ssh和local的非root环境中不显示主机名
oh my zsh的安装的更多相关文章
- [转]Oh My Zsh,安装,主题配置
https://swp-song.com/2017/08/20/Tools/OhMyZsh%E5%AE%89%E8%A3%85%E5%92%8C%E4%B8%BB%E9%A2%98%E9%85%8D% ...
- Mac下brew/memcached/nginx/iterm/zsh的安装
brew https://www.cnblogs.com/fireworld/p/8609190.html memcached https://blog.csdn.net/whereismatrix ...
- 2019.1.9 Mac安装Iterm2 终端(oh my zsh的安装与配置)
Mac安装Iterm2 终端(oh my zsh的安装与配置) 安装 curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tool ...
- [转载]备忘:oh my zsh 的安装、更新、删除
备忘:oh my zsh 的安装.更新.删除 傅易君 关注 0.8 2016.09.25 00:56* 字数 68 阅读 14920评论 0喜欢 4 查看系统当前 shell $ cat /etc/ ...
- Zsh和oh my zsh的安装和使用
Zsh 兼容 Bash,据传说 99% 的 Bash 操作 和 Zsh 是相同的,默认 CentOS / Ubuntu / Mac 系统用的是 Bash,倒也不是说 Bash 不好,而是说我们有更好的 ...
- linux shell——zsh的安装与使用
Shell是在程序员与服务器间建立一个桥梁,它对外提供一系列命令,让我们得以控制服务器.常用的Bash就是Shell的一种,也是Linux下默认Shell程序.这里介绍一种更强大的.更人性化的Shel ...
- Mac在zsh环境安装Maven
Mac OS先安装了oh-my-zsh和iterm2,设置系统的默认语言为zsh.再安装Maven的时候,发现添加profile文件,关闭iterm后,mvn的环境变量一直没有生效. 折腾了好久,突然 ...
- macosx zsh下安装rvm和ruby
1)curl -L get.rvm.io | bash -s stable 2)把下面一行加到~/.zshrc中: [[ -s "$HOME/.rvm/scripts/rvm" ] ...
- zsh的安装与配置
参考: http://cnbin.github.io/blog/2015/06/01/mac-zsh-an-zhuang-he-shi-yong/ http://www.cnblogs.com/ios ...
- Ubuntu下安装配置zsh和oh my zsh
zsh优势:自动补全功能强大和很高的可配置性 1.查看当前系统装了哪些shell cat /etc/shells 2.当前正在运行的是哪个版本的shell echo $SHELL 3.安装 ...
随机推荐
- [arc133e]Cyclic Medians
E - Cyclic Medians 看到中位数,就是经典套路:将\(\geq\)中位数的都赋值为\(1\),\(<\)的赋值为\(0\) 那么对于数\(A\),就等于\(\sum_{i=1}^ ...
- Java源码分析系列笔记-7.Lock之Condition
目录 1. 是什么 2. 如何使用 3. 实现原理 3.1. uml 3.2. 创建Condition对象 3.2.1. 创建AQS.ConditionObject对象 3.2.1.1. Condit ...
- C#支持格式最多的解压缩开源库SharpCompress
string archivePath = "path/to/"; string extractPath = "path/to/extract/folder"; ...
- webpack专题
一.编译 编译命令 直接cmd下执行webpack 即可,但是配置成为node项目,就可以使用npm的快捷脚本了, 那么我再提供一个在npm下好用的script命令(只支持windows) " ...
- Educational Codeforces Round 74 (Rated for Div. 2) ABC 题解
A. Prime Subtraction 题意:问你能不能找到一个质数p,使得 b = a - np, 其中a.b给出. 思路: 1.若a - b本身就是质数,那肯定可以. 2.若a - b本身是合数 ...
- sql 查找最晚入职员工信息
简介 order by 然后 limit select * from employees order by hire_date desc limit 1;
- MySQL数据一键同步至ClickHouse数据库
随着数据量的爆炸式增长和业务场景的多样化,传统数据库系统如MySQL虽然稳定可靠,但在海量数据分析场景下逐渐显露出性能瓶颈.这时,ClickHouse凭借其列式存储架构和卓越的OLAP(在线分析处理) ...
- 通过ETL从MySQL同步到GaussDB
在数字化转型深化的背景下,企业会面临数据源异构化的孤立存储和分散管理难题,需要构建统一的数据治理体系以实现跨系统数据资产的整合与价值挖掘.我们可以通过ETL其低代码/无代码架构,有效解决了多源异构数据 ...
- SciTech-HybridSoftwareEngineering-Software Engineering2ndEditionISBN13:9781260721706
Part 1: Introduction and System Engineering Chapter 1: Introduction Chapter 2: Software Process and ...
- spring-ai 学习系列(1)-调用本地ollama
spring-ai框架为java程序员快速融入AI大潮提供了便利,下面演示如何调用本地deepseek模型 一.安装ollama https://www.ollama.com/ 首页下载安装即可 选择 ...