# shellcheck shell=bash

gwr_get_current_worktree_title() {
    local worktree=""

    worktree="$(pwd -P)"
    worktree="$(basename "$worktree")"

    worktree="${worktree//\//-}"
    worktree="${worktree// /-}"

    if [[ -z "$worktree" ]]; then
        worktree="unknown"
    fi

    printf 'orchestra: /%s' "$worktree"
}
