oh-my-zsh

homestead安装zsh,解决oh-my-zsh安装失败问题

删除回忆录丶 提交于 2020-07-28 08:04:33
homestead安装zsh提高终端使用体验 zsh是辅助工具,提高用户体验,有非常便捷的提示,很多好用的插件,小编也是折腾好久,跳了好多坑,最终才安装成功的。这里把我安装过程及爬坑经过和大家分享一下,希望小伙伴不会再掉到坑里边浪费时间。 下面正式开始。 首先启动homestead homestead up 等待启动成功之后,ssh进行登录 homestead ssh 然后进入虚拟机中。 安装zsh 官方提供的homestead盒子是ubuntu系统,使用命令安装 # 安装zsh sudo apt install zsh # 查看版本号,检测安装是否成功 zsh --version # 设置默认shell chsh -s $(which zsh) # 注销帐号后执行,查看当前shell是否是zsh echo $SHELL 如果出现上图的效果说明成功了。 接下来就要安装oh-my-zsh 这里是个大坑,好多次安装不上去,发现官网给的地址不对,访问不了,然后搜集很多资料发现正确安装命令如下: sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" 或者 sh -c "$(wget https://raw.githubusercontent.com

ohmyzsh的安装过程中失败拒绝连接问题的解决

浪尽此生 提交于 2020-07-26 02:15:58
1. 打开官网 https://ohmyz.sh/ 在官网能看到下面的界面 有这两种自动安装的方式 个人本次选择的是: wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O - 1.打开终端输入安装的指令 sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" 安装过程中出现了失败拒绝连接的问题 解决办法: 1. 查询 IP 去这里 https://site.ip138.com/ ,输入 raw.githubusercontent.com 进行查询: 2. 将 IP 加入 /etc/hosts 从上述搜索结果中选一个 , 终端输入: sudo vi /etc/hosts 在里面输入 151.101.76.133 raw.githubusercontent.com 保存退出 4. 再次执行sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" 成功完成安装。 来源: oschina 链接: https://my.oschina.net/u/4285706/blog

真 ● 禁秘技 ● 奥义 ● 终端美化

点点圈 提交于 2020-07-26 00:06:47
1 概述 作为一个程序员,可以没钱,没车,没房,没老婆,没女朋友。 但是,一定要有一个漂亮骚气的终端。 没错,大骚特骚。 说什么大实话。 先来看看原生的终端: 真漂亮啊。 再看看美化过的: 这才叫终端嘛。 美化过的就是不一样。 如果您也想要这样的终端,那这篇文章要仔细看,同时顺手点个赞。 文章讲述了如何使用zsh+oh-my-zsh,配合主题Powerlevel9k/Powerlevel10k(以下简称p9k/p10k)进行终端美化的过程,不废话了,进入正题。 2 环境 笔者环境: Manjaro 20.0 Xfce 自带的Xfce terminal 其他linux基本适用,安装zsh+oh-my-zsh即可,mac用户可以通过homebrew安装zsh+p9k/p10k,至于win用户,自行搜索吧。 3 准备工作 安装zsh+oh-my-zsh。 3.1 zsh Manjaro/Arch: sudo pacman -S zsh Debian系: sudo apt install zsh RedHat系: sudo yum install -y zsh 其他可以来到官方github安装, 戳这里 。 设为默认shell: chsh -s $(which zsh) 再把原来的别名复制到 ~/.zshrc 3.2 oh-my-zsh 通过脚本安装即可,使用curl或wget: sh

zsh command cannot found pip

时光总嘲笑我的痴心妄想 提交于 2020-07-16 23:25:34
问题 How can I use pip in oh-my-zsh? I was trying to install nltk through pip, but it told me zsh: command not found: pip . When I check plugins under .oh-my-zsh/custom/plugins , there is a folder named pip . I don't know what the problem is. Edit : $ echo $PATH /home/xxx/bin:/usr/local/bin:/home/xxx/bin:/home/xxx/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin $ type pip pip is an alias for noglob pip 回答1: Maybe you have installed both

npm global install commands not found on zsh

安稳与你 提交于 2020-07-05 10:57:07
问题 I just installed the package live-server using npm install -g live server I checked and the package is currently installed at /Users/username/.npm-global/lib/node_modules/live-server/live-server.js However, when I try to run live-server from the command line I get the error zsh: command not found: live-server What do I need to do to be able to run live-server? I have oh-my-zsh installed and I'm worried that may be causing my issue. I understand it should have something to do with setting my

WARNING: this script is deprecated, please see git-completion.zsh

廉价感情. 提交于 2020-07-05 05:23:24
问题 I'm using oh-my-zsh and I get this error every time I open terminal: WARNING: this script is deprecated, please see git-completion.zsh is there any solution to that? 回答1: Might seems silly, but make sure that you source your ~/.zshrc file (create one if it does not exists). On OSX I completely forgot that I had switched to zsh, and got the error you mentioned because I was doing source ~/.bashrc The easiest way to get auto-completion working is to install it through Homebrew with brew install

WARNING: this script is deprecated, please see git-completion.zsh

℡╲_俬逩灬. 提交于 2020-07-05 05:22:49
问题 I'm using oh-my-zsh and I get this error every time I open terminal: WARNING: this script is deprecated, please see git-completion.zsh is there any solution to that? 回答1: Might seems silly, but make sure that you source your ~/.zshrc file (create one if it does not exists). On OSX I completely forgot that I had switched to zsh, and got the error you mentioned because I was doing source ~/.bashrc The easiest way to get auto-completion working is to install it through Homebrew with brew install

Shortening my prompt in Zsh

放肆的年华 提交于 2020-06-24 08:24:05
问题 I'm having a lot of trouble getting zsh to shorten my prompt. I'm currently using zsh with the agnoster theme and oh-my-zsh package manager. My prompt currently gets annoyingly long during work, usually around 110 characters, taking up the entire length of my terminal, which is just not very aesthetically pleasing. I've looked at a few other people's .zshrc's and attempts to modify their prompt, but nothing seems to work in mine. I've tried copying many, many things into my .zshrc and have

Oh My Zsh multiple commands with one alias

て烟熏妆下的殇ゞ 提交于 2020-06-10 02:45:16
问题 I'm using Oh My Zsh, and was wondering if there is a way to create a function or alias to run multiple commands. Just as an example, running an 'update' command will update specific gems, but not all of them. 回答1: As you've discovered, you can chain commands in a single alias using ; : alias update_my_gems="echo foo; echo bar" Alternatively, you can write a function very easily in your ~/.zshrc file: update_my_gems() { echo foo echo bar } For readability, I'd personally go for a function for

Oh My Zsh multiple commands with one alias

三世轮回 提交于 2020-06-10 02:45:10
问题 I'm using Oh My Zsh, and was wondering if there is a way to create a function or alias to run multiple commands. Just as an example, running an 'update' command will update specific gems, but not all of them. 回答1: As you've discovered, you can chain commands in a single alias using ; : alias update_my_gems="echo foo; echo bar" Alternatively, you can write a function very easily in your ~/.zshrc file: update_my_gems() { echo foo echo bar } For readability, I'd personally go for a function for