Skip to content

Conversation

@Zoybean
Copy link

@Zoybean Zoybean commented Oct 1, 2017

Proposed Changes

  • Ensure prompt-pwd always expands '~' when pwd-length is set to 'full', so the path format is consistent between directories.
  • Add pwd-length option 'tail' to only show the last directory in the path, for minimalist prompts.

Prompt-pwd's 'full' option always expands '~', as opposed to only
expanding when '~' would be followed by other directories.
This means the path is always in a consistent format, rather than
alternating between expanded and condensed.
This option makes `prompt-pwd` only show the last directory in the path,
for minimalist prompts
@Zoybean Zoybean changed the title Pwd length Changes to pwd-length handling Oct 1, 2017
if [[ "$current_pwd" == (#m)[/~] ]]; then
if zstyle -m ':prezto:module:prompt' pwd-length 'full'; then
ret_directory=${PWD}
elif [[ "$current_pwd" == (#m)[/~] ]]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be the last branch before the else to avoid using this for other explicit options as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants