Skip to content

Commit

Permalink
attempting to reduce cwd verbosity by only displaying the base path name
Browse files Browse the repository at this point in the history
  • Loading branch information
AstringentBeet committed Jan 24, 2025
1 parent 3d9a8b1 commit 40a9912
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/cwd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ main() {

# change '/home/user' to '~'
cwd="${path/"$HOME"/'~'}"

# check if the user wants only the current directory
basename_enabled=$(tmux show-option -gqv @dracula-cwd-basename)

if ["$basenmae_enabled" == "true" ]; then
#Extract only the last part of path
cwd=$(basename "cwd")
fi

echo "$cwd"
}
Expand Down

0 comments on commit 40a9912

Please sign in to comment.