zsh

Zsh & RVM woes (rvm-prompt doesn't resolve)

≡放荡痞女 提交于 2019-12-03 16:06:39
问题 I recently saw the light and changed over to Zsh. I naturally used Oh My Zsh to configure it, as I'm noobish. So, there are several themes that have an rvm-prompt included and here is were my problems began. Everytime I load Zsh I have to rvm reload or else rvm-prompt is not resolved ( zsh: command not found: rvm-prompt ). Note that it resolves fine after I reload. Also, and in line, when I go to a directory that has its own .rvmrc (other gemset) and then I come out of it, the same problem

Multi-dot paths in zsh, like `cd …`

痞子三分冷 提交于 2019-12-03 14:22:40
All shells understand these commands: $ cd . $ cd .. And zsh will also understand: $ cd ... $ cd .... Provided you say: $ alias -g ...='../..' $ alias -g ....='../../..' Now, how can I make it do proper tab-completion when I've started typing cd ..../<TAB> ? I recall it was implemented in oh-my-zsh but I've stopped using it now. It would also be appreciated if it would work not only for cd , say I want to execute cat ..../a/b/..../c/d | less . I wasn't happy with the other answers so I spent a bit of time getting something more to my liking. The following will expand the dots when you hit ↵

zsh change prompt input color

醉酒当歌 提交于 2019-12-03 13:31:06
I want to change the color of the input text in zsh (the text that I type for each command). Example: in user@host> ls ~/ I would want ls ~/ to be yellow to stand out from standard output. I know I can accomplish this in bash using export PS1=" $BIGreen \u@\h \w \$ $IYellow" At the end of the prompt, the color is set to Yellow, input text I type is yellow (with the appropriate color variables defined). And then trap 'echo -ne "\e[0m"' DEBUG Which resets the color to normal when the outputs of my command are displayed. How can I accomplish this in zsh ? Currently, I have PROMPT=$'{$fg[green]%}

Switching over to zsh breaks rails in command line

笑着哭i 提交于 2019-12-03 13:19:18
问题 I just recently switched over to using zsh with oh-my-zsh and I am having issues using the rails command line tool. Here are the steps that I ran through, and the error that I am receiving. I ran the curl command that the github page provides: curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh Then I went to run rails s, this is the following error message that I receive: .rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs

macOS Catalina 10.15(beta) - Why is `.~bash_profile` not sourced by my shell?

一世执手 提交于 2019-12-03 12:11:44
I want to set the environment variable I added below the line to ~/.bash_profile and ~/.profile but it didn't work. export JBOSS_HOME=/Users/{USERNAME}/Desktop/jboss7 Afterward, exit the terminal and open it again when executing echo $JBOSS_HOME I get nothing. Apple has changed the default shell to zsh. Therefore you have to rename your configuration files. .bashrc is now .zshrc and .bash_profile is now .zprofile . I created a new file called /usr/local/bin/mybash which contains a wrapper script: /usr/local/bin/bash --init-file $HOME/.bashrc I installed this local/bin/bash from HomeBrew . Full

bindkey with zsh on Mac

邮差的信 提交于 2019-12-03 11:52:35
问题 I've been trying to bind keys in zzh on a Mac but am having some trouble. I know I should be Googling this but couldn't find what I need... I've been trying to bind ctrl-backspace to be an equivalent of ctrl-w, ie delete one word. But I can't find the key code for it. Nothing shows up when I do it with 'read'. I can't find a chart online either. Also, I couldn't bind home/end keys (ie fn-left, fn-right) somehow. It is not bound in Terminal's keyboard assignments or .zshrc but it's still doing

Why zsh tries to expand * and bash does not?

a 夏天 提交于 2019-12-03 11:30:45
I just encountered the following error with zsh when trying to use logcat. Namely, when typing: adb logcat *:D I get the following error in zsh zsh: no matches found: *:D I have to escape the * like : adb logcat \*:D While using bash, I do not get the following error. Why would it be like this? zsh warns you by default if you use a glob with no matches. Bash, on the other hand, passes the unexpanded glob to the app, which is a potential problem if you don't know for certain what will match (or if you make a mistake). You can tell zsh to pass the unevaluated argument like bash with setopt

zsh history is too short

橙三吉。 提交于 2019-12-03 11:15:03
问题 When I run history in Bash, I get a load of results (1000+). However, when I run history the zsh shell I only get 15 results. This makes grepping history in zsh mostly useless. My .zshrc file contains the following lines: HISTFILE=~/.zhistory HISTSIZE=SAVEHIST=10000 setopt sharehistory setopt extendedhistory How can I fix zsh to make my shell history more useful? UPDATE If in zsh I call history 1 I get all of my history, just as I do in Bash with history . I could alias the command to get the

Zsh color partial tab completions

风格不统一 提交于 2019-12-03 11:07:00
Is it possible to color the completed part of the partial completion results in Zsh? Fish does this by default (in Gentoo at least) as shown in the image below: Full size image: http://i.imgur.com/tN6w3.png Yes, you can do it with things like that: zstyle -e ':completion:*:default' list-colors 'reply=("${PREFIX:+=(#bi)($PREFIX:t)(?)*==02=01}:${(s.:.)LS_COLORS}")' Just change the 01 and 02 colors so it matches your taste, for example to match your screenshot: zstyle -e ':completion:*:default' list-colors 'reply=("${PREFIX:+=(#bi)($PREFIX:t)(?)*==34=34}:${(s.:.)LS_COLORS}")'; (Taken from reddit

Command not found - Oh-My-Zsh

喜欢而已 提交于 2019-12-03 11:04:41
问题 I recently installed zsh and oh-my-zsh in my Mac. Now when I try to run a maven command from the terminal, I am getting the following error. $ mvn install zsh: command not found: mvn I have installed Apache maven in /Applications directory. Currently my .zshrc file looks like below. plugins=(git brew pip mvn mysql-macports python sublime tmux osx) # #################### # Maven Config Options # #################### export M2_HOME=/Applications/apache-maven-3.3.3 export PATH=$PATH:M2_HOME/bin