Changelog

All changes to fsg, newest first. Based on Keep a Changelog, Semantic Versioning.

  1. v0.5.0

    Latest
    • Added --docs opens the documentation in the browser and prints the URL when no browser is available
    • Added Documentation site with English and German pages at https://karnesth.github.io/fsg/
    • Changed The README is shorter and links to the documentation for options, markers, configuration and styles
  2. v0.4.0

    • Added Comments after an entry (# ..., separated by at least two spaces) are kept on --update and aligned
    • Added Several marked blocks per file; options in the start marker (path, depth, dirs-only, exclude, include, fence, style, summary) apply to one block, between the config and the command line
    • Added -s/--style with the built-in styles unicode, ascii, rounded, heavy and double, plus --glyph KEY=VALUE and [tool.fsg.glyphs] for own glyphs
    • Added --summary/--no-summary and the config key summary for a line with the number of directories and files
    • Added --copy to copy the tree to the clipboard with clip.exe, pbcopy, wl-copy, xclip or xsel
    • Changed A start marker after another one without end marker, and an end marker without start marker, are reported with their line number instead of being skipped
  3. v0.3.0

    • Added -i/--include and the config key include to show only entries matching a glob pattern; exclude wins over include
    • Changed Without a git repository, --depth and --exclude stop the directory walk early instead of filtering afterward, so fsg -d 1 on large directories returns immediately
    • Security GitHub Actions are pinned to commit SHAs, Dependabot opens weekly pull requests to update them
    • Security The release workflow runs the full CI before building and publishing
  4. v0.2.0

    • Changed Status lines start with a symbol (✔, •, ✖, or [ok], [info], [error] with --ascii), are colored in terminals and show a hint on how to fix a problem; NO_COLOR and FORCE_COLOR are respected
    • Changed Every error exits with status 2, including a path that is not a directory; status 1 only means an outdated tree
    • Changed The search for a config file stops at the git repository root, or at the home directory outside a repository
    • Changed Indented code blocks and longer code fences are recognized when looking for the markers
    • Fixed Tracked files deleted from the working tree no longer appear in the tree
    • Fixed --setup-hook adds the fsg step before a final exec line of an existing git hook
    • Fixed An existing pre-commit entry is detected by its repo: line, so comments or similarly named repositories no longer block the setup
    • Fixed --version and --setup-hook work when fsg runs from a source checkout without being installed
  5. v0.1.1

    • Security Resolve the git executable from absolute PATH entries only, so a git.exe inside the current directory is never run on Windows
    • Security Quote the target file in the message of the generated git hook, so shell syntax in the file name is not executed
    • Security Reject a configured path that leaves the directory of the config file
    • Fixed --update no longer overwrites content when the end marker is missing: both markers must stand on their own line outside a code block
    • Fixed --setup-hook checks that the target file exists and holds both markers before writing a hook
    • Fixed Files are written atomically, so an interrupted run cannot leave a half-written README or hook
    • Fixed A failing git ls-files is reported instead of producing an empty tree
  6. v0.1.0

    • Added Render a directory as a tree, wrapped in a plaintext code fence
    • Added Respect .gitignore inside git repositories, skip common generated directories outside of them
    • Added --depth, --dirs-only, --exclude and --fence/--no-fence to shape the output
    • Added --ascii for environments without Unicode support; output is always written as UTF-8
    • Added --update and --check to keep the tree between <!-- fsg:start --> and <!-- fsg:end --> up to date
    • Added --setup-hook to add fsg to an existing .pre-commit-config.yaml or the git pre-commit hook
    • Added pre-commit hooks fsg and fsg-check
    • Added Configuration via .fsg.toml or [tool.fsg] in pyproject.toml
    • Added --version and --help