zsh

Why do you need to source .zshrc for every new shell in iTerm?

◇◆丶佛笑我妖孽 提交于 2020-02-23 13:09:26
问题 I've used Iterm2 with zsh everyday for the past 3 years, but I got a new computer and had to set it up again. The problem is that when I run ~/.zshrc it works fine, but I have to do it on every new terminal window I open. Not a good experience. I noticed that I don't have any bashrc , bash_profile , or profile (dot)files on my new machine. Here's the code in ~/.zshrc : export ZSH=/Users/healy/.oh-my-zsh plugins=( git ) ZSH_THEME="agnoster" source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions

rpm 程序包管理介绍

拟墨画扇 提交于 2020-02-15 17:53:40
API:application program interface ABI:application binary interface linux系统的ABI文件是ELF格式的 windows系统的ABI文件是exe,msi格式的 系统级开发语言:c/c++ ​ 作品:httpd,vsftpd,nginx 应用级开发:java/python/php ​ java作品:hadoop,hbase ​ python作品:openstack 在linux安装软件非常费劲,分源代码编译安装,二进制安装 编译安装:需要有编译环境,比如需要有gcc等。 源代码-->目标系统下的二进制格式(可执行程序,库文件,配置文件,帮助文件)-->组织成一个或多个“包”文件 二进制安装(已经把源代码编译成了可以直接执行的程序了) 程序包管理器 Debian:dpt,dpkg。文件名后缀是".deb" redhat:rpm。文件名后缀是".rpm" S.U.S.E:rpm。文件名后缀是".rpm" Gentoo:ports ArchLinux 源代码文件名解读:name-version.tar.gz version:major.minor.release major:主版本号,当有大的变动时,才更新主版本号 minor:添加一些小的功能,更新小版本号 release:修正bug,更新此号 rpm文件名解读

Ubuntu 16.04下 正常安装zsh和oh-my-zsh

孤街浪徒 提交于 2020-02-15 05:32:14
Ubuntu 16.04下安装zsh和oh-my-zsh 原创Lioonlove 最后发布于2019-10-29 21:07:11 阅读数 134 收藏 展开 说明:Ubuntu下默认没有安装zsh。 注意:安装了oh-my-zsh之后的环境变量入口就会从./bashrc变成./zshrc,在配置环境变量的时候要特别小心。 1、安装zsh sudo apt-get install zsh 2、把默认的Shell改成zsh chsh -s /bin/zsh 3、配置密码文件,解决chsh: PAM认证失败的问题 sudo vim /etc/passwd 把第一行的root❌0:0:root:/root:/bin/bash改成root❌0:0:root:/root:/bin/zsh,这个是root用户的。 把最后一行的lyp❌1000:1000:lyp,:/home/lyp:/bin/bash改成lyp❌1000:1000:lyp,:/home/lyp:/bin/zsh,这个应该是每台电脑的登录用户名+计算机名组成的。 4、安装git sudo apt-get install git 5、安装oh-my-zsh 用于快速配置zsh。 sh -c “$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master

Mac安装iterm2主题教程及遇到的问题

只愿长相守 提交于 2020-02-11 17:15:13
安装 首先上图: ![在这里插入图片描述](https://img-blog.csdnimg.cn/20200211125429771.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NDE5NTE3NQ==,size_16,color_FFFFFF,t_70) 安装iterm2, 下载 下载oh-my-zsh,命令输入 sh -c " $( curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh ) " 安装agnoster主题, vim ~/.zshrc 然后 输入/ZSH_THEME,定位到ZSH_THEME字段,按i进入编辑模式,修改ZSH_THEME字段的值为agnoster,改完后按esc建退出编辑模式,输入:wq 推出保存 问题 如果出现乱码,那肯定是字符集的问题,在 配置font字体跟我一样就行了 另外本地终端乱码的话,把字体也改为上图的字体 来源: CSDN 作者: YZBPXX 链接: https://blog.csdn.net/weixin_44195175/article

[iTerm] 终端 iTerm2 的简单使用

半城伤御伤魂 提交于 2020-02-04 12:19:18
直接在其官方的下载地址进行下载:https://www.iterm2.com/downloads.html,下载的直接就是一个 .app 的应用程序,直接拖到 Application 文件夹即可; 加粗样式 或者在终端使用下面的指令安装: $ brew cask install iterm2 iTerm 内的文本/指令选中后即自动复制的,不需要再使用 command + c 来进行复制; 安装 Oh My Zsh iTerm2 配合 Oh My Zsh 使用,可以设置丰富的主题,以及插件 Oh My Zsh 的 GitHub 地址为:https://github.com/robbyrussell/oh-my-zsh 在其 Readme 文件内介绍可使用下面的指令一键安装: sh -c “$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)” 在使用这个指令进行安装的时候,没有安装成功,跟目录下没有生成 .zshrc 文件,最后使用的是下面的手动安装 // 将 oh-my-zsh 下载到指定文件夹,如果是自定义的文件夹,后面加上路径即可 git clone https://github.com/robbyrussell/oh-my-zsh.git ~

Custom Oh My Zsh theme: long prompts disappear / cut off

心已入冬 提交于 2020-02-03 04:19:30
问题 I had a go at making my own Oh My Zsh theme earlier. All is well, except when I type long lines in the prompt (any longer than the line seen below), the line disappears. The line re-appears if I resize the window, however. Is there something in my theme that is causing this to happen? If I type an additional character and then erase one, the cursor appears at the edge of the window. You can view the code for the theme here. Here’s the bit I think we are concerned with: # Build the prompt

oh-my-zsh安装与配置

孤人 提交于 2020-02-01 02:38:28
基本组件: yum install -y zsh git 安装 oh my zsh wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh 查看 zsh 的安装目录:which zsh 使用 chsh 命令切换使用的 shell 程序 chsh -s /usr/bin/zsh 安装 ZSH 图标字体: git clone https://github.com/powerline/fonts.git 更换 ZSH 主题: 使用 vi 工具编辑 .zshrc文件,更改 ZSH_THEME=“robbyussell” 字段为 ZSH_THEME=“你想要的主题” source ~/.zshrc 命令更新配置文件。 安装插件: wd、zsh-syntax-highlighting、zsh-autosuggestions 。 依次执行: cd ~/.oh-my-zsh/custom/plugins git clone https://github.com/zsh-users/zsh-syntax-highlighting.git git clone https://github.com/zsh-users/zsh-autosuggestions.git vi 编辑 ~/

记录Termuxの安装过程

天大地大妈咪最大 提交于 2020-01-27 18:48:23
Termuxの初体验 前言 安装 Termux 主要是为了用手机写Python,以及熟悉Linux,当然也可以使用 QPython 以及 Pydroid 进行编写,其实我是更推荐Pydroid的。虽说这两个都足以满足我的日常学习需要,只是奈何Termux(Linux)太迷人 ^ _ ^ (๑• . •๑)这篇文章纯粹为了记录,方便自己日后再次安装 更多详细的教程可以参考这两篇文章,我就是按照这两个教程安装的 作者:国光ㅤㅤ Termux 高级终端安装使用配置教程 作者:P3TERX Termux 使用教程 #2 - 打造手机上的最强终端 下载链接 Termux官网 Termux Google Play Termux Wiki QPython官网 Pydroid3 Google Play Termux Wiki有Termux及其插件在F-Droid平台的下载地址 更换国内源 默认的软件源一般下载都比较慢,所以安装完成之后第一件事自然是换源啦。 先设置默认编辑器 export EDITOR=vi 编辑源文件 apt edit-sources 将原来的官方源 https://termux.org/packages/ 替换为 清华源 http://mirrors.tuna.tsinghua.edu.cn/termux 或者 中科大源 https://mirrors.ustc.edu.cn

mac重启后位于~/.bash_profile配置不生效问题

南笙酒味 提交于 2020-01-24 22:16:54
首先来说,正常情况下,不会发生这种情况。 启动终端我发现 现象异常: 这个终端标题上出现一个与原来不一样的东东,原来是个 ./.bash_profile 思考: 基于对.bash_profile 这个的了解,这个zsh下环境变量应该发生的变化。 尝试解决: 尝试修改/etc/profile文件重启,发现重启后修改的配置依然不生效,也就是说, 有两种可能 1)启动终端过程未加载/etc/profile文件; 2)受其他设置影响,修改的设置被覆盖(还原)。 继续思考: 尝试删除可能影响环境变量的修改,发现即使在没有其他修改的情况下(仅在/etc/profile内修改),也不会生效,这就是说, 很有可能我未正确找到配置文件,环境变量未按我的设想生效。 研究一下zsh(原谅我之前没有研究过mac下的终端),尝试找一下其配置文件,结果未发现配置文件,这就尴尬了。想想我好像也没有安装过zsh,那么这个。。。 可能是系统升级或者安装其他软件的时候带入了这个,这里尝试新建其配置文件 ~/.zshrc, 重启发现,好使了。 在mac 使用zsh作为shell时,未发现其配置文件,确实是有问题的,补全其配置文件即可解决问题,至此环境问题也就解决了。 那么 zsh什么时候生效的呢?好奇的我去apple上找找看看: 原来如此: https://support.apple.com/zh-cn

How should I use argcomplete in zsh?

一曲冷凌霜 提交于 2020-01-24 04:25:29
问题 I'm using argcomplete to have Tab completion in Bash. argcomplete offers global completion for bash , but doesn't for zsh . I would like to create a file ~/.zsh_completion , to contain the to be completed files. This file should generate autocompletion for those files when it's sourced from ~/.zshrc . How do I do that? 回答1: Alright there is a way to do it, but it's not the way I really wanted it to be. Anyway, here goes: Install argcomplete : $ pip install argcomplete Activate argcompolete :