()
| 5 | import { useTuiPaths } from "./runtime" |
| 6 | |
| 7 | export function useDirectory() { |
| 8 | const project = useProject() |
| 9 | const sync = useSync() |
| 10 | const paths = useTuiPaths() |
| 11 | return createMemo(() => { |
| 12 | const directory = project.instance.path().directory || paths.cwd |
| 13 | const result = abbreviateHome(directory, paths.home) |
| 14 | if (sync.data.vcs?.branch) return result + ":" + sync.data.vcs.branch |
| 15 | return result |
| 16 | }) |
| 17 | } |
no test coverage detected