Giter VIP home page Giter VIP logo

boa's Introduction

boa's People

Contributors

elewis787 avatar lilith-cyber 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

boa's Issues

console display is misaligned

I referred to the example in the README and added the following code to rootCmd:

rootCmd.SetUsageFunc(b.UsageFunc)  
rootCmd.SetHelpFunc(b.HelpFunc)

However, in both the cmder window and the cmd window, the display of the borders seems disordered.

Snipaste_2024-04-02_11-24-27

Add a keybind to print the usage of a selected command when exiting

Description

Right now, if you use the help or usage to check subcommands when you exit you no longer see the help for the command you were just looking at. I think it would be useful to print out the usage of that command on exit so you can copy to execute the given command.

example directory

It would be nice to provide an example directory that shows the various capabilities of boa.

  • Custom styles
  • Custom options
  • Initalization patterns
  • Error Handling

specify arg and flag values via boa

It's really neat that Boa allows for interactive subcommand selection, but (from the GIF), it looks like it exits after you pick the command. It would be really neat if you could use Boa to execute the selected subcommand with the args/flags you'd like.

I'm writing my own Cobra alternative, so I'm super interested in watching your innovation here - I'll probably port it to mine :D

Cannot use a Long on a sub command

Cannot use a Long on a sub command. There is a check that if it is not the root that the Long field is never displayed.
The subcommand list uses the Short, but when you enter into a subcommand's help menu the Description is also using the Short so you cannot give further information

Fails to compile with latest lipgloss version

Issue

Library is installed as recommended in the readme go get -u github.com/elewis787/boa but it fails to compile as the newest lipgloss version had a breaking change related commit in lipgloss

Error

# github.com/elewis787/boa
C:\Users\Lilith\go\pkg\mod\github.com\elewis787\[email protected]\cmdlist.go:41:8: cannot use func(s string) string {…} (value of type func(s string) string) as func(strs ...string) string value in assignment

Versions

Go: 1.20.5
Lipgloss: 0.7.1
Boa: 0.1.1

Usage display shows without/before error message

Currently when a command syntax error is thrown the usage display pops up and hides the underlying syntax error. Once the TUI is closed, the user can see the cobra command error message.

A possible solution for this is to use cmd.SetErr() and supply a io.Writer to capture the commands error output.

This would be an options that could be set via the withOptions pattern or through a package level variable.

i.e

rootcmd.SetUsageFunc(boa.UsageFunc)
rootcmd.SetErr(boa.ErrWriter) 

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.