From 644b58782a5aedc8a90a2d7725581c71610c1346 Mon Sep 17 00:00:00 2001 From: chesteryue Date: Tue, 12 May 2020 11:52:13 +0800 Subject: [PATCH] [U] dir prompt replace with tidal --- passion.zsh-theme | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/passion.zsh-theme b/passion.zsh-theme index 946fd0d..02de94e 100644 --- a/passion.zsh-theme +++ b/passion.zsh-theme @@ -26,7 +26,8 @@ function real_time() { # directory function directory() { local color="%{$fg_no_bold[cyan]%}"; - local directory="$(pwd)"; + # REF: https://stackoverflow.com/questions/25944006/bash-current-working-directory-with-replacing-path-to-home-folder + local directory="${PWD/#$HOME/~}"; local color_reset="%{$reset_color%}"; echo "${color}${directory}${color_reset}"; }