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

Changes to pwd-length handling #1476

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

None yet

3 participants