zsh

Mac 终端配置(Mac OSX + iTerm2 + Zsh + Oh-My-Zsh)

限于喜欢 提交于 2019-12-02 12:47:15
我的 Mac 终端配置(Mac OSX + iTerm2 + Zsh + Oh-My-Zsh) 相关工具介绍 iTerm2:Mac 下 Terminal 终端的替代品,拥有更多强大的功能,想了解更多请戳 iTerm2 官网 ; zsh:Linux 的一种 shell 外壳,和 bash 属于同类产品; Oh-My-Zsh:用来管理 zsh 的配置,同时还有很多社区贡献的主题配置以及好用的插件可供使用,了解更多请戳 Oh-My-Zsh 官网 配置方案总览 iTerm2 终端工具; iTerm2 Solarized Dark Higher Contrast 配色方案; Monaco for Powerline 字体; zsh (Mac 系统自带,无需安装); Oh-My-Zsh; Oh-My-Zsh powerlevel9k 主题; 最终效果 详细步骤 具体配置步骤 1. 安装 iTerm2 终端工具: 打开 iTerm2 官网 直接点击 Download 下载并安装即可。 2. 安装 iTerm2 Solarized Dark Higher Contrast 配色方案: 将该配色方案文件(Solarized Dark Higher Contrast.itermcolors)复制出来,保存到本地,文件命名为 SolarizedDarkHigherContrast.itermcolors

command not found: pip3 pip 报错

雨燕双飞 提交于 2019-12-02 12:39:51
报错: zsh: command not found: pip3 zsh: command not found: pip 原因:好像我pip更新失败以后就出现了这个问题。 解决方法: 官网解决方案 先在终端执行: curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py 在当前目录下得到 get-pip.py 文件 然后在当前目录执行: sudo python3 get-pip.py 然后pip就安装成功了。 来源: https://www.cnblogs.com/PowerTips/p/11745594.html

What is the format of shell history files

╄→гoц情女王★ 提交于 2019-12-02 10:56:20
My ~/.zsh_history shows: : 1449561637:0;echo "foobar" I'm guessing it goes unix timestamp : exit code ; command but what about the space before the timestamp and first colon? Is there an official spec? As already noted in the comments, the format of the history file depends on the shell and sometimes even on specific settings of the shell. In your case you are using zsh with the EXTENDED_HISTORY option enabled (either by explicitly setting it or by using csh -emulation). According to the ZSH manual the format of history entries with EXTENDED_HISTORY is as follows: : <beginning time>:<elapsed

filter file content to sorted tables

依然范特西╮ 提交于 2019-12-02 07:58:15
I have a file that contains the following lines of code. here the file displays a schedules which are sorted one by one . at 12:00 the schedule of james version1 is : first_task:eating:nothing second_task:rest:onehour third_task:watching:nothing at 12:00 the schedule of james version2 is : first_task:eating:fruits second_task:rest:twohour third_task:watching:manga at 12:00 the schedule of alex version1 is : first_task:eating:fruit second_task:rest:halfhour third_task:watching:horrorfilm at 12:00 the schedule of alex version2 is : first_task:eating:meal second_task:rest:nothing third_task

Linux各种软件的安装

杀马特。学长 韩版系。学妹 提交于 2019-12-02 07:29:37
Linux各种软件的安装(Ubuntu18.04为例) 1.google浏览器的安装 2.anaconda的安装 3.markdown文档的安装 4.NVIDA,CUDA等的安装 5.WPS的安装 6.网易云音乐的安装 7.搜狗输入法的安装 8.pycharm的安装 9.guake的安装 10.QQ的安装 11.Shell软件(ZSH的安装) 12.安装sublime 13.华科有线校园网客户端 14.音乐软件cocomusic的下载 15.vscode的下载 1.google浏览器的安装 参见 我的博客 2.anaconda的安装 参见 我的博客 3.markdown文档的安装 参见 我的博客 4.NVIDA,CUDA等的安装 参见 我的博客 5.WPS的安装 进入 wps官网 ,下载linux版(.deb格式),双击直接安装即可 6.网易云音乐的安装 进入网易云音乐官网,下载linux版(.deb格式),双击直接安装即可 7.搜狗输入法的安装 进入 搜狗输入法官网 ,下载linux版(.deb格式),双击直接安装。 进入到系统设置,语言设置,进入Manage installed languages,即这个界面 将Keyboard input method system 更改为fcitx。 重启计算机,点击右上角的图标 进入congfigure,点击左下角加号 将Only

What is the zsh equivalent of a bash script getting the script's directory?

夙愿已清 提交于 2019-12-02 03:31:55
I want to translate this bash-script intro a zsh-script. Hence I have no experience with this I hope I may get help here: bash script: SCRIPT_PATH="${BASH_SOURCE[0]}"; if([ -h "${SCRIPT_PATH}" ]) then while([ -h "${SCRIPT_PATH}" ]) do SCRIPT_PATH=`readlink "${SCRIPT_PATH}"`; done fi pushd . > /dev/null cd `dirname ${SCRIPT_PATH}` > /dev/null SCRIPT_PATH=`pwd`; popd > /dev/null What I already know is that I can use SCRIPT_PATH="$0"; to get the path were the script is located at. But then I get errors with the "readlink" statement. Thanks for your help Except for BASH_SOURCE I see no changes

安装zsh配置oh-my-zsh和自动补全插件

流过昼夜 提交于 2019-12-02 00:47:35
Linux学习笔记 Centsos 安装zsh配置oh-my-zsh和自动补全工具 查看当前shell echo $SHELL 安装zsh yum install -y zsh 切换默认shell chsh -s /bin/zsh 安装git yum install -y git 安装oh-my-zsh 自动安装 sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" 手动安装 git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh 复制配置文件 cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc 修改主题 ZSH_THEME="ys” 安装自动补全插件 官网: Incremental completion on zsh wget -O incr-0.2.zsh https://mimosa-pudica.net/src/incr-0.2.zsh source incr*.zsh 重新打开终端,以使配置生效 来源: https://www.cnblogs.com/ShawnChan/p

running ssh process in background gets paused

旧时模样 提交于 2019-12-02 00:46:16
I have some scripts that I'm developing on a vm but sometimes needs to run on a production server to be properly tested. I need the output from the scripts for debugging so I've tinkered together the following solution: function test_remote() { scp $1 Prod:/home/xxx/tmp/ n=${1:t:r} f=${1:t} cmd="ssh Prod \"/usr/bin/php /home/xxx/tmp/$f\" > /home/xxx/tests/$n-remote-test.html" eval ${cmd} ssh Prod "rm /home/xxx/tmp/$f" echo "done" } which I have placed in my .zshrc file I would like to run it in the background using test_remote path_to_file/php_file.php & but as I do I always get the following

Is there any established order for 'ls' arguments?

杀马特。学长 韩版系。学妹 提交于 2019-12-01 19:48:48
I'm a student and as part of my cursus I must recode the ls command and reproduce its behaviour the best possible. On Mac (El Capitan 10.11.6), using the terminal iTerm 2(zsh), I get: user> ls . -R ls: -R: No such file or directory And on Arch (latest version), using the default text interface(bash) I get: user> ls . -R <current directory content> Although I'd rather trust Arch, is it correct for ls to refuse its option after a directory has been specified ? And is there any documentation declaring the arguments order ? See POSIX utility syntax guidelines , entry #9: Guideline 9: All options

How to specify a custom path for my .zshrc file?

无人久伴 提交于 2019-12-01 18:11:46
I'm trying to move .zshrc to a folder where I keep this kind of files synced with Github. But now whenever I start a zsh session it doesn't use that config file. Assuming I changed the file to ~/.dotfiles how can I add ~/.dotfiles/.zshrc to the PATH(?!) to make zsh start with that config? Doing source ~./dotfiles/.zshrc only works for that session. Doesn't work anymore if I close the terminal. You can symlink : ln -s /path/to/original /path/to/symlink For the zshrc you can do something like: ln -s ~/.dotiles/.zshrc ~/.zshrc One alternative to a symlink is to put this in ~/.zshenv : ZDOTDIR=~/