Skip to content

theme_title_use_abbreviated_path equivalent for zsh on osx

License

Notifications You must be signed in to change notification settings

felixgravila/zsh-abbr-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

abbreviated pwd for oh-my-zsh

Functionality of the theme_title_use_abbreviated_path parameter from some oh-my-fish themes

Displays the current path with all but the last directory shortened to the first letter

Replaces $HOME with ~

Installation

copy .abbr_pwd to $HOME then source it from your .zshrc

source $HOME/.abbr_pwd

You can use my own theme copy if agnoster suits you, but if not you can edit your theme of choice in $HOME/.oh-my-zsh/themes by finding the prompt_dir() method and modifying the contents to contain $(felix_pwd_abbr) as you wish. For agnoster it was as easy as replacing '%~' with $(felix_pwd_abbr).

Screenshot

alt text

Thanks to contributors

Thank you @charlesdaniels for fix: Fixed behavior for paths containing hidden directories

Releases

No releases published

Packages

No packages published

Languages