repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

extensions/cwd/README.md

Raw

cwd

Switch Pi cwd without leaving current session.

Install / load

This extension is loaded through the root pi-ext package. See root README.

Commands / tools / settings

Commands:

Tools: none.

Hooks: none.

Settings: none.

Behavior

Markdown source
File outline
# cwd

Switch Pi cwd without leaving current session.

## Install / load

This extension is loaded through the root pi-ext package.
See [root README](../../README.md).

## Commands / tools / settings

Commands:

- `/cwd [path]` — switch session cwd, or show current cwd when no path is given.

Tools:
none.

Hooks:
none.

Settings:
none.

## Behavior

- Resolves relative paths from current Pi cwd.
- Expands `~` and `~/...`.
- Rejects missing paths and non-directories.
- No-op when target cwd equals current cwd.
- Waits for idle before switching.
- Forks current session into target cwd when a source session file exists.
- Uses target cwd session directory config when available.
- Writes a target session file from in-memory entries when no source session
  file exists.
- Completion suggestions for empty prefix:
  `.`, `..`, `~`.