-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor _lp_get_home_tilde_collapsed() to not echo
Rename _lp_get_home_tilde_collapsed() to __lp_pwd_tilde(). The double underscore ("__") marks the function as "private" or Liquidprompt only. Themes and users should not use it, as it should only be run when the current directory changes, and Liquidprompt will control that. Change the function to return with a variable instead of an echo with subshell. This is one of the first functions to get this treatment. Any function run in a subshell will add slowdowns, so refactor the function to return its data in a variable instead. This means refactoring how it is used as well. Add a bit of testing for the function while we are at it.
- Loading branch information
Showing
2 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters