Code Monkey home page Code Monkey logo

cmd's Introduction

cmd's People

Contributors

cfiggers avatar ianthehenry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

cfiggers

cmd's Issues

Breaks when compiled for Janet 1.30.0 using jpm quickbin

For this example program:

(import cmd)

(cmd/main (cmd/fn
  [--greeting (optional :string "Hello")
   name :string]
  (printf "%s, %s!" greeting name)))

When run as a script using janet main.janet works as expected, but when compiled using jpm quickbin main.janet example and run we get this error:

error: bad slot #1, expected string, symbol, keyword or buffer, got nil
  in string/split [src/core/string.c] on line 445
  in is-probably-interpreter? [/opt/homebrew/Cellar/janet/1.30.0/lib/janet/cmd/util.janet] on line 78, column 12
  in args [/opt/homebrew/Cellar/janet/1.30.0/lib/janet/cmd/arg-parser.janet] on line 148, column 9
  in main [main.janet] on line 6, column 1

How to use `cmd` with `jpm build`?

It seems like the focus of cmd at present is on shebang-style Janet scripts. But I'm trying to build native executables with jpm. I haven't been able to get even a "Hello, World" working based on the instructions in the README. Could you please point me in the right direction?

Commands without a docstring print ` - ` misaligned in formatted help text

I notice that when a command doesn't have a docstring, its hyphen separator in the formatted help text prints misaligned from the other commands:

image

It almost looks like this is done on purpose in help.janet:

(def pad-to (if (empty? right) 0 left-column-width))

If it wasn't for that empty? check, the hyphen would always align regardless. So that makes this behavior look intentional.

I'm curious why?

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.