Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Only show basename pwd in prompt, not full path #41

Closed
croaky opened this Issue · 3 comments

2 participants

Dan Croak Mike Burns
Dan Croak
Owner
croaky commented

No description provided.

Dan Croak
Owner
croaky commented

@mike-burns I tried changed changing the ~ on line 20 of zlogin to use basename pwd a few different ways but was seeing some weird behavior. Any hints? Having a hard time reading that line, too. Would be cool to break it apart into named pieces if possible.

Mike Burns
Owner

The ~ is actually %~. According to the zsh prompt expansion documentation, you want %1~ to get the basename.

Also, you cannot use ' around PS1. In general, you want to use " around your shell variables.

Dan Croak
Owner
croaky commented

Niiiice. Thanks, Mike. $1~ worked beautifully. Thanks for the zsh prompt expansion documentation.

I think the inner " is why the ' is being used. Switching the outer to " and inner to ' resulted in a funky effect.

Dan Croak croaky closed this
Alex Godin alexgodin referenced this issue from a commit in alexgodin/dotfiles
Dan Croak croaky [#41] Use basename $PWD in shell prompt 67bd1f2
Greg Lazarev gylaz referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Dan Croak croaky referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Alex Kroman alexkroman referenced this issue from a commit in alexkroman/dotfiles-thoughtbot
Dan Croak croaky [#41] Use basename $PWD in shell prompt 1ad1af4
Greg Lazarev gylaz referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Steve Houser TiltingAt referenced this issue from a commit in shouser/dotfiles
Dan Croak croaky [#41] Use basename $PWD in shell prompt bb5c283
Steve Houser TiltingAt referenced this issue from a commit in shouser/dotfiles
Dan Croak croaky [#41] Use basename $PWD in shell prompt 4f347ed
Geoff Harcourt geoffharcourt referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Greg Lazarev gylaz referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Glenn Hoppe ghoppe referenced this issue from a commit in ghoppe/dotfiles
Dan Croak croaky [#41] Use basename $PWD in shell prompt 4ecb705
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.