Skip to content

Define SOURCE_TEMPLATES so the 'new' command works again #38

Description

@jdevera

Context

~/.local/bin/new (from the misc-scripts external) creates files from templates stored in $SOURCE_TEMPLATES. That variable is not defined anywhere — not in the tracked zsh config, not in machine-local files — so today new dies with "Source templates dir not set" and its completion (__complete_new in zsh.d/private_050_completion.zsh) silently offers nothing.

This has been the case for a while (the old bash config referenced the variable without defining it either). Decision: keep new, fix the variable.

To decide

  • Where the templates directory should live (a dir in the misc-scripts repo? a dedicated ~/Templates-style dir? something chezmoi-managed?)
  • Where to define the variable: tracked zsh module vs machine-local file
  • Whether new should grow a sensible default so the env var becomes optional (change would belong to the misc-scripts repo)

The __complete_new completion needs no changes once the variable exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions