[U] dir prompt replace with tidal

This commit is contained in:
chesteryue 2020-05-12 11:52:13 +08:00
parent 55a20a47fe
commit 644b58782a

View file

@ -26,7 +26,8 @@ function real_time() {
# directory # directory
function directory() { function directory() {
local color="%{$fg_no_bold[cyan]%}"; 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%}"; local color_reset="%{$reset_color%}";
echo "${color}${directory}${color_reset}"; echo "${color}${directory}${color_reset}";
} }