Giter VIP home page Giter VIP logo

Comments (2)

avi-cenna avatar avi-cenna commented on August 27, 2024 1

@xylous Thank you! I installed settle and then sourced the completions file from nushell and completions are working as expected.

from settle.

xylous avatar xylous commented on August 27, 2024

This should do, I reckon? It requires only one more crate and is otherwise trivial to implement, although since I don't use Nushell myself I can't test whether it works or not. Try compiling this and running settle compl nu or settle compl nushell, or alternatively use what the command generated without compiling it yourself:

module completions {

  # CLI tool to manage a digital Zettelkasten
  export extern settle [
    --help(-h)                # Print help
    --version(-V)             # Print version
  ]

  # sync the database
  export extern "settle sync" [
    --project(-p): string     # helper option to --create and --move; specify working project
    --create(-c): string      # create a new Zettel
    --update(-u): string      # update a note's metadata, given its path
    --generate(-g)            # (re)generate the database
    --move(-m): string        # move the matching Zettel to a project; requires --project
    --rename(-n): string      # rename a note, preserving project and updating backlinks
    --help(-h)                # Print help
  ]

  # query the database
  export extern "settle query" [
    --title(-t): string       # keep Zettel with a matching title
    --project(-p): string     # keep Zettel that are in the matching projects
    --tag(-g): string         # keep Zettel that have a matching tag name
    --text(-x): string        # keep Zettel that contain some text
    --links(-l): string       # keep Zettel that have links to the matching Zettel
    --backlinks(-b): string   # keep Zettel that have links from the matching Zettel
    --loners(-o)              # keep Zettel that don't have any links to and fro
    --format(-f): string      # print formatted
    --link_sep(-s): string    # specify separator for links and backlinks in formatted output
    --graph: string           # turn the query results into a graph: 'dot', 'json' or 'vizk'
    --exact(-e)               # match everything exactly, disabling regex
    --help(-h)                # Print help
  ]

  # list things not related to notes
  export extern "settle ls" [
    OBJECT: string            # object to list (tags, projects, ghosts, path)
    --help(-h)                # Print help
  ]

  # generate completion file for a given shell
  export extern "settle compl" [
    SHELL: string
    --help(-h)                # Print help
  ]

  # Print this message or the help of the given subcommand(s)
  export extern "settle help" [
  ]

  # sync the database
  export extern "settle help sync" [
  ]

  # query the database
  export extern "settle help query" [
  ]

  # list things not related to notes
  export extern "settle help ls" [
  ]

  # generate completion file for a given shell
  export extern "settle help compl" [
  ]

  # Print this message or the help of the given subcommand(s)
  export extern "settle help help" [
  ]

}

export use completions *

from settle.

Related Issues (4)

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.