Documentation
¶
Overview ¶
Package paths resolves otag's default file locations.
Index ¶
- func CacheDir(getenv Getenv, harness string) string
- func ConfigDir(getenv Getenv) string
- func DB(getenv Getenv) string
- func DataDir(getenv Getenv) string
- func ExpandHome(p string, getenv Getenv) string
- func OtagBin(getenv Getenv) string
- func RunDir(getenv Getenv, runID string) string
- func TmuxConf(getenv Getenv) string
- func TmuxSocket(getenv Getenv) string
- func Within(dir, root string) bool
- func Worktree(getenv Getenv, project, taskID string) string
- func WorktreeRoot(getenv Getenv) string
- type Getenv
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataDir ¶
DataDir returns otag's data directory: $OTAG_DATA_DIR, else the directory of $OTAG_DB, else ~/.local/share/otag. Worktrees, per-run files and caches live here.
func ExpandHome ¶
ExpandHome replaces a leading "~" with the home directory.
func OtagBin ¶
OtagBin returns the absolute path of the otag binary that hooks and children should call: $OTAG_BIN or the running executable.
func TmuxConf ¶
TmuxConf returns the config file for otag's tmux server: $OTAG_TMUX_CONF, else <config>/tmux.conf when it exists, else /dev/null (the user's ~/.tmux.conf is not loaded).
func TmuxSocket ¶
TmuxSocket returns the tmux socket name (tmux -L): $OTAG_TMUX_SOCKET or "otag".
func Within ¶
Within reports whether dir is root or inside it, with symlinks resolved (as far as the paths exist) and letter case ignored (APFS), so an alias cannot escape it.
func WorktreeRoot ¶
WorktreeRoot returns the directory of every task worktree: <data>/worktrees. Only otag's task worktrees live there; no project may.