Code Monkey home page Code Monkey logo

zdoc's Introduction

zig docs on command line.

usage:

zdoc [-s] <source> [identifier]

the program searches source code for matching public identifiers, printing found types and their doc comments to stdout. the search is case-insensitive and non-exhaustive. no semantic analysis is run.

if -s option is specified, any identifier substring matches. as a side effect, the -s with no identifier arg results in printing out only top level doc comments.

for example, look up "hello" identifier in a project file:

zdoc ./src/main.zig hello

search across all .zig files starting from the src directory, recursively and following symlinks:

zdoc ./src hello

if the source starts with std., the dot delimiters are replaced with filesystem path separator and "std." with the std_dir value from zig env command output.

for example, look up format function in std lib:

zdoc std.fmt format

list all expectXxx functions from the testing module:

zdoc -s std.testing expect

as a special case, if the source is exactly std and no such file or directory exists, zdoc searches across the whole zig std lib.

zdoc outputs results in a basic colored format unless NO_COLOR env variable is set or --nocolor flag is seen on command line.

supported versions

zdoc master branch requires zig v0.11. however, zdoc can be built with zig v0.10 from the 0.10 branch.

contributing

to contribute, create a pull request or send a patch with git send-mail to alex-dot-cloudware.io.

before sending a change, please make sure tests pass:

zig build test

and all code is formatted:

zig fmt --check .

license

same as zig license.

zdoc's People

Contributors

x1ddos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

thomasadam

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.