oh-my-zsh

How to run “nvm” in “oh my zsh”?

六月ゝ 毕业季﹏ 提交于 2020-01-30 14:15:07
问题 In the system there is a nodejs , installed through nvm . The command is not running npm . Console is Oh my zsh 回答1: You can use zsh-nvm or enable it yourself by adding following lines to your ~/.zshrc export NVM_DIR=~/.nvm [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" Extra: For faster shell initialization, I use lazynvm which only loads node when needed lazynvm() { unset -f nvm node npm export NVM_DIR=~/.nvm [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm } nvm() {

zsh禁用共享命令记录

时光总嘲笑我的痴心妄想 提交于 2019-12-29 21:55:34
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 转载请注明文章出处: https://tlanyan.me/zsh-disable-share-history zsh默认启用了命令记录(history)共享。打开多个终端tab,在某个tab中输入命令,该命令记录会马上共享到其他tab,然后设置为最后一条命令(按上箭头⬆️就能看到)。因本人长期使用多个终端同时操作,这个特性会打断同一终端历史命令的连续性,所以非常讨厌这个特性。 这是zsh的特性,和oh my zsh无关。禁用共享命令记录也很简单,在~/.zshrc末尾加入如下设置: setopt no_share_history 关掉终端重新打开或者重新加载.zshrc文件,烦人的历史命令同步问题就解决了。 参考 https://github.com/ohmyzsh/ohmyzsh/issues/2537 来源: oschina 链接: https://my.oschina.net/u/1030865/blog/3149321

~RVM_PROJECT_PATH in oh-my-zsh prompt

瘦欲@ 提交于 2019-12-23 06:57:23
问题 Recently installed .oh-my-zsh on a new machine on which RVM was already installed. Noticed that in several of my Rails project directories, I now see this instead of the actual name of the project directory: ➜ ~RVM_PROJECT_PATH git:(master) All other behavior seems normal, but I'm finding it difficult to pin down the cause in the .oh-my-zsh configuration. 回答1: it is a bug in your Zsh, to avoid it use %1/ in PROMPT instead of %. or %C or %1~ more info: https://github.com/wayneeseguin/rvm

NVM cannot load default node with default alias set

↘锁芯ラ 提交于 2019-12-23 03:46:22
问题 My problem is almost the same as this one but i already set the default alias. Once i open a new console nvm does not load the default node, this problem is also present with some SublimeText3 plugins (eslint, jscs for example). The only way to make it work is to add nvm use default after loading nvm but i thik i am doing something wrong. How can i make it work without the hack? My configuration brew 0.9.5 nvm 0.26.0 (installed using brew) zsh (with oh-my-zsh) I have nvm sourced in .zshenv

惠普战66AMD版Manjaro安装体验

时间秒杀一切 提交于 2019-12-22 14:43:44
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 其实早就有要将日常工作和娱乐都搬到Linux平台的想法,毕竟是吃饭的手艺。但是一直不知道哪个发行版适合做日常工作就一直搁置,直到在B站看到一位up主推荐的Manjaro—— 最全Linux装机配置教程 ,就一直心心念念想要试一下。七八月份入了一台笔记本打算做日常学习用,型号为惠普战66AMD升级版——又称HP ProBook 445R G6,CPU为R5 3500U。后来又去了其他城市寻求安身,也就一直没有时间去折腾。 时间步入12月,此时工作已经稳定,心中的欲望抬头,开始折腾手上这台战66了。耗时一周多,总算能日常使用了。 如今写下这篇教程,对自己的热爱做一个总结,希望能帮助到有需要的同学,也希望将来自己能为Linux做出一点贡献. 安装 在 Majaro官网 上下载最新镜像,第一次下的是kde版,界面很精致,整体风格和Windows比较类似,不过在战66这台机子上对触控板的驱动支持似乎不是很好,默认设置中不支持触控板点按模式,需要去设置中更改。因为不喜欢它的风格,第二天立马就换了gnome版本,符合自己的审美,又喜欢它开箱即有的雨滴声效。 下载 rufus ,这里有一个坑,镜像需要选择“dd模式”写入,否则会无法进入安装界面。 进入安装界面后又有一坑,默认的boot设置中 driver=free ,需要改成

zsh: permission denied: gam

断了今生、忘了曾经 提交于 2019-12-21 21:43:48
问题 I am using ZSH on macOS 10.12 with Oh My ZSH installed. I recently installed GAM on my computer using the provided install script bash <(curl -s -S -L https://git.io/install-gam) The script installs the command line tool gam to ~/bin/gam/gam , which is in my PATH . However, when trying to execute any gam command in ZSH, I get the following: ➜ ~ gam info user zsh: permission denied: gam However, when executing the same (or any) command in bash, the tool works as expected. I have been able to

Default Ruby not loading with RVM

社会主义新天地 提交于 2019-12-20 04:26:31
问题 Not sure if this issue is related to a recent Oh-My-ZSH update, but all of a sudden, my RVM default Ruby is not loading when opening a new Terminal window (instead, it loads the system Ruby). I have added [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" to about every dotfile on my system (.zshrc, .zprofile, .zlogin, .profile, even .bashrc and .bash_profile for good measure). RVM is loading when the session starts (I can manually switch to the default with rvm default ), and

centos7 .oh-my-zsh 增加conda 补全提示

纵然是瞬间 提交于 2019-12-18 10:42:20
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> miniconda 安装后在zsh下不能补全提示 着实让人头疼,经过一番折腾: conda-env 单独的命令。 官方的 conda init zsh 貌似只能把conda加入到环境变量 其他啥也没用,难道我的环境问题? (base) ✘ ⚡ root@iZ2ze3s31vnb0o5bur3ix0Z  ~  conda init zsh no change /usr/local/miniconda3/condabin/conda no change /usr/local/miniconda3/bin/conda no change /usr/local/miniconda3/bin/conda-env no change /usr/local/miniconda3/bin/activate no change /usr/local/miniconda3/bin/deactivate no change /usr/local/miniconda3/etc/profile.d/conda.sh no change /usr/local/miniconda3/etc/fish/conf.d/conda.fish no change /usr/local/miniconda3/shell/condabin

如何解决 vscode 中的 terminal 乱码

心不动则不痛 提交于 2019-12-13 17:50:26
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 适用场景 系统安装并使用 oh-my-zsh ; 使用 zsh 主题 「 agnoster 」,并安装了所需的扩展字体「for powerline 」; 问题描述 当使用 control + shift + ~ 或菜单「Terminal > New Terminal」打开 TERMINAL 控制台后,路径提示显示如下乱码: 解决 进入 vscode 设置页,搜索栏输入 terminal font ,修改 Font Family 的值为系统中安装的扩展字体,如下图: 设置后,即时生效。 来源: oschina 链接: https://my.oschina.net/u/2276973/blog/3061006

Vim editor - zsh shell ipython magic %ed cannot find editor

為{幸葍}努か 提交于 2019-12-12 19:09:52
问题 I am trying to use the %ed magic in IPython to use vim as the editor. vim is installed ipython and ipython qtconsole both work zsh is latest as updated with my oh-my-zsh install I exported my prefernce to zsh $ echo "export EDITOR=/usr/bin/vim" >> ~/.zshrc $ echo "export VISUAL=/usr/bin/vim" >> ~/.zshrc However, when I launch IPython and then invoke the %ed magic it fails In [1]: %ed IPython will make a temporary file named: /tmp/ipython_edit_pu4Yql.py Editing.../bin/sh: 1: mvim: not found