Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions scripts/cwd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,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 [ "$basename_enabled" == "true" ]; then
#Extract only the last part of path
cwd=$(basename "$cwd")
fi

echo "$cwd"
}

Expand Down