Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell prompts break and show RVM_PROJECT_PATH when used with rvm #3238

Closed
clarkewd opened this issue Oct 20, 2014 · 5 comments · Fixed by #3252
Closed

Shell prompts break and show RVM_PROJECT_PATH when used with rvm #3238

clarkewd opened this issue Oct 20, 2014 · 5 comments · Fixed by #3252

Comments

@clarkewd
Copy link

With the latest version of rvm it seems there is a bug with the PROMPT in some themes that causes the text RVM_PROJECT_PATH to show.

Please see rvm/rvm#3091 for more details.

@ballPointPenguin
Copy link

partially addressed in #3244
If this is the result of an upstream zsh bug and/or zsh syntax deprecations, then it seems the best way to address is to update all our prompts (& themes) to use non-buggy / non-deprecated syntax.

@clarkewd
Copy link
Author

Hmm, I am now also seeing this in the title of iTerm2 even though I edited the prompt statement for my theme. I'm not sure what that says about the type of issue this is, or where the correct place to fix it would be, but just thought I'd share.

@ballPointPenguin
Copy link

Indeed. I see the same in my terminal titles (rxvt and gnome-terminal). I'm sure there is a setting somewhere in a given terminal's configuration, but I haven't bothered to dig in to that yet.

@mcornella
Copy link
Member

Hi both, this is a feature in oh-my-zsh that changes the title to the command running while it's running, and the current working directory when there is no command running. You can find the causing lines in the lib/termsupport.zsh file.

As you can see, $ZSH_THEME_TERM_TAB_TITLE_IDLE and $ZSH_THEME_TERM_TITLE_IDLE both use the %~ sequence, so you have to change that the same way you changed your prompts: with either %1/ or %C. You can override these variables in your zshrc file (at the end of it), or change it directly on the terminal to see how it affects the title (i.e. ZSH_THEME_TERM_TAB_TITLE_IDLE="Terminal"will say Terminal in the title).

@mcornella
Copy link
Member

I found the real culprit, read on in rvm/rvm#3091 (comment)

mcornella added a commit to mcornella/ohmyzsh that referenced this issue Oct 22, 2014
From http://zsh.sourceforge.net/Doc/Release/Options.html#Completion-4

> AUTO_NAME_DIRS
> Any parameter that is set to the absolute name of a directory immediately
> becomes a name for that directory, that will be used by the ‘%~’ and
> related prompt sequences, and will be available when completion is performed
> on a word starting with ‘~’.
> (Otherwise, the parameter must be used in the form ‘~param’ first.)

Explained in more detail in
rvm/rvm#3091 (comment)

Related issues:
ohmyzsh#2857
ohmyzsh#3238
rvm/rvm#3091
noj pushed a commit to noj/oh-my-zsh that referenced this issue Nov 4, 2014
From http://zsh.sourceforge.net/Doc/Release/Options.html#Completion-4

> AUTO_NAME_DIRS
> Any parameter that is set to the absolute name of a directory immediately
> becomes a name for that directory, that will be used by the ‘%~’ and
> related prompt sequences, and will be available when completion is performed
> on a word starting with ‘~’.
> (Otherwise, the parameter must be used in the form ‘~param’ first.)

Explained in more detail in
rvm/rvm#3091 (comment)

Related issues:
ohmyzsh#2857
ohmyzsh#3238
rvm/rvm#3091
benjaoming pushed a commit to benjaoming/oh-my-zsh that referenced this issue Nov 28, 2014
From http://zsh.sourceforge.net/Doc/Release/Options.html#Completion-4

> AUTO_NAME_DIRS
> Any parameter that is set to the absolute name of a directory immediately
> becomes a name for that directory, that will be used by the ‘%~’ and
> related prompt sequences, and will be available when completion is performed
> on a word starting with ‘~’.
> (Otherwise, the parameter must be used in the form ‘~param’ first.)

Explained in more detail in
rvm/rvm#3091 (comment)

Related issues:
ohmyzsh#2857
ohmyzsh#3238
rvm/rvm#3091
kkholst pushed a commit to kkholst/oh-my-zsh that referenced this issue Jan 3, 2015
From http://zsh.sourceforge.net/Doc/Release/Options.html#Completion-4

> AUTO_NAME_DIRS
> Any parameter that is set to the absolute name of a directory immediately
> becomes a name for that directory, that will be used by the ‘%~’ and
> related prompt sequences, and will be available when completion is performed
> on a word starting with ‘~’.
> (Otherwise, the parameter must be used in the form ‘~param’ first.)

Explained in more detail in
rvm/rvm#3091 (comment)

Related issues:
ohmyzsh#2857
ohmyzsh#3238
rvm/rvm#3091
exos pushed a commit to exos/oh-my-zsh that referenced this issue Jan 6, 2015
From http://zsh.sourceforge.net/Doc/Release/Options.html#Completion-4

> AUTO_NAME_DIRS
> Any parameter that is set to the absolute name of a directory immediately
> becomes a name for that directory, that will be used by the ‘%~’ and
> related prompt sequences, and will be available when completion is performed
> on a word starting with ‘~’.
> (Otherwise, the parameter must be used in the form ‘~param’ first.)

Explained in more detail in
rvm/rvm#3091 (comment)

Related issues:
ohmyzsh#2857
ohmyzsh#3238
rvm/rvm#3091
kiwiupover pushed a commit to kiwiupover/dot-files that referenced this issue Jan 23, 2015
From http://zsh.sourceforge.net/Doc/Release/Options.html#Completion-4

> AUTO_NAME_DIRS
> Any parameter that is set to the absolute name of a directory immediately
> becomes a name for that directory, that will be used by the ‘%~’ and
> related prompt sequences, and will be available when completion is performed
> on a word starting with ‘~’.
> (Otherwise, the parameter must be used in the form ‘~param’ first.)

Explained in more detail in
rvm/rvm#3091 (comment)

Related issues:
ohmyzsh/ohmyzsh#2857
ohmyzsh/ohmyzsh#3238
rvm/rvm#3091
forivall pushed a commit to forivall/oh-my-zsh that referenced this issue Apr 26, 2015
From http://zsh.sourceforge.net/Doc/Release/Options.html#Completion-4

> AUTO_NAME_DIRS
> Any parameter that is set to the absolute name of a directory immediately
> becomes a name for that directory, that will be used by the ‘%~’ and
> related prompt sequences, and will be available when completion is performed
> on a word starting with ‘~’.
> (Otherwise, the parameter must be used in the form ‘~param’ first.)

Explained in more detail in
rvm/rvm#3091 (comment)

Related issues:
ohmyzsh#2857
ohmyzsh#3238
rvm/rvm#3091
cameronr pushed a commit to cameronr/oh-my-zsh that referenced this issue Aug 7, 2015
From http://zsh.sourceforge.net/Doc/Release/Options.html#Completion-4

> AUTO_NAME_DIRS
> Any parameter that is set to the absolute name of a directory immediately
> becomes a name for that directory, that will be used by the ‘%~’ and
> related prompt sequences, and will be available when completion is performed
> on a word starting with ‘~’.
> (Otherwise, the parameter must be used in the form ‘~param’ first.)

Explained in more detail in
rvm/rvm#3091 (comment)

Related issues:
ohmyzsh#2857
ohmyzsh#3238
rvm/rvm#3091
dmytro added a commit to dmytro/dotfiles that referenced this issue Aug 12, 2015
hbpoison pushed a commit to hbpoison/oh-my-zsh that referenced this issue Aug 14, 2015
From http://zsh.sourceforge.net/Doc/Release/Options.html#Completion-4

> AUTO_NAME_DIRS
> Any parameter that is set to the absolute name of a directory immediately
> becomes a name for that directory, that will be used by the ‘%~’ and
> related prompt sequences, and will be available when completion is performed
> on a word starting with ‘~’.
> (Otherwise, the parameter must be used in the form ‘~param’ first.)

Explained in more detail in
rvm/rvm#3091 (comment)

Related issues:
ohmyzsh#2857
ohmyzsh#3238
rvm/rvm#3091
NobbZ pushed a commit to NobbZ/oh-my-zsh that referenced this issue May 15, 2016
From http://zsh.sourceforge.net/Doc/Release/Options.html#Completion-4

> AUTO_NAME_DIRS
> Any parameter that is set to the absolute name of a directory immediately
> becomes a name for that directory, that will be used by the ‘%~’ and
> related prompt sequences, and will be available when completion is performed
> on a word starting with ‘~’.
> (Otherwise, the parameter must be used in the form ‘~param’ first.)

Explained in more detail in
rvm/rvm#3091 (comment)

Related issues:
ohmyzsh#2857
ohmyzsh#3238
rvm/rvm#3091
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants