• Stars
    star
    246
  • Rank 164,726 (Top 4 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Explain shell commands using next-generation autocomplete Fig.

shell.how ยท CI

Explain shell commands using next-generation autocomplete from Fig.

shell.how - Explain how your shell command works | Product Hunt

Contributing

Requirements

  • Node 14

  • Yarn 1.22+

Setup

  1. Install requirements

  2. Clone the repository

  3. Run yarn to install dependencies

Develop

Tech stack

  • TypeScript

  • Next.js

  • Tailwind CSS

  • Recoil for state management, it works natively with React concurrent mode & has builtin caching, allows lean pattern for querying dynamic data (see hooks/use-spec.ts)

  • React concurrent mode for loading data before rendering components & handling errors

Start development

  • Run yarn start to start development

  • Commit adhering to Angular commit convention, use yarn commit or Code conventional commits to commit interactively

  • Submit a PR and make sure required status checks pass

  • When a PR is merged or code is pushed to main:

    • Vercel deploys latest changes to shell.how

    • Github validates and creates a new release if there're relevant changes

Understand parser

The parser has 2 steps:

  1. Escape and split the string into tokens delimited white space, a quoted string is a single token. Nested quotes are supported, too.

  2. Load Fig's autocomplete spec for the command (the first token from step 1). Iterate through the tokens, validate, and annotate the tokens with information from the spec.

interface Token extends SimpleToken, Fig.BaseSuggestion {
  indices: [number, number]; // [start, end], end is exclusive
  value: string; // a copy of [start, end) from original string
  type: "command" | "subcommand" | "option" | "argument";
}

Author

Minh-Phuc Tran (@phuctm97) - Fig

More Repositories

1

ntast

Notion Abstract Syntax Tree specification.
124
star
2

go-restful

๐Ÿš€ A real world production-grade RESTful Web Services proof-of-concept project.
Go
78
star
3

phuctm97.com

๐Ÿš Home on the Web
TypeScript
48
star
4

phuctm97

A portfolio that blends yesterdayโ€™s look (Windows 95) with tomorrowโ€™s tech (in-browser ChatGPT)
TypeScript
38
star
5

tailwindcss-autofill

๐ŸŽจ TailwindCSS variant to style autocompleted form fields.
JavaScript
28
star
6

img-nodejs

๐ŸŒŒ Imagegen (image generator) as a Service, built with Node.js, Docker, and DigitalOcean.
JavaScript
15
star
7

nbundle-create-notion-app

Create nbundle-powered Notion apps with one command.
TypeScript
15
star
8

tailwindcss-shadow-fill

๐ŸŽจ TailwindCSS utility to override background fill color using shadow.
JavaScript
14
star
9

tailwindcss-text-fill

๐ŸŽจ TailwindCSS utility to override foreground fill color of text content.
JavaScript
13
star
10

jxax

๐Ÿ’ป JavaScript for Automation (JXA) Extensions Kit & CLI automate macOS setup, configuring preferences, personalization, etc.
JavaScript
12
star
11

nbundle-notion-outline

Show floating sticky outline (table of contents) for Notion pages, powered by nbundle.
JavaScript
11
star
12

remark-parse-frontmatter

๐ŸŽ“ Parses and validates Markdown frontmatter (YAML) to data object.
TypeScript
9
star
13

blog.phuctm97.com

โ†ช๏ธ Redirect URLs at blog.phuctm97.com to phuctm97.com
JavaScript
8
star
14

bardwow

Save & share Bard conversations. Discover & use Bard prompts. Enhance Bard with more features.
TypeScript
8
star
15

img

๐ŸŒ  Imagegen (image generator) as a Service, built with Next.js and Vercel
TypeScript
8
star
16

nbundle-notion-themes

Make Notion pretty with custom themes and fonts, powered by nbundle.
JavaScript
7
star
17

nbundle-docs

Open-source documentation of nbundle for developers.
7
star
18

nbundle-example

Example of a nbundle app
JavaScript
6
star
19

hashnode-sdk-js

๐Ÿ“ฆ Hashnode SDK for JavaScript/TypeScript (unofficial).
TypeScript
5
star
20

remark-unwrap-texts

๐Ÿ“‹ Unwraps text nodes in Markdown, is useful when publishing to platforms like DEV.to, Medium, Hashnode, etc.
TypeScript
5
star
21

nbundle-notion-focus

Bring Focus mode to Notion, hide all notifications & updates until you turn them on, powered by nbundle.
JavaScript
5
star
22

openlogin-react

JavaScript
4
star
23

ai

(WIP) Open-source personal AI assistants
TypeScript
4
star
24

tsconfig-node

TypeScript config preset for Node.js projects.
Shell
3
star
25

tsconfig-react

TypeScript config preset for React.js projects.
Shell
3
star
26

flatten-tailwindcss-theme

๐Ÿ”จ Flatten TailwindCSS theme objects for plugins to conveniently generate utilities and components.
JavaScript
3
star
27

html-personal-sites

๐Ÿง‘๐Ÿป A collection of minimal, beautiful, and responsive personal site templates. Just copy and paste โŒจ๏ธ.
HTML
3
star
28

app-hotelie

Simple hotel management application written C# based on WPF.
Visual Basic
3
star
29

torus-direct-react-native-samples

JavaScript
2
star
30

torus-embed-react

Get started with Torus Embed and React.
JavaScript
2
star
31

app-idealde

Simple code editor application written in C# based on WPF.
C#
2
star
32

.github

๐Ÿ˜บ My default Github open-source community files.
1
star
33

swift-promise-starter

Swift
1
star
34

dotfiles

๐Ÿ’ป My delightful macOS Catalina dotfiles.
Shell
1
star
35

game-tap-tap-dash

Mobile game Tab Tab Dash written in C++ based on Cocos2d-x.
C++
1
star
36

html

๐Ÿ“„ Fun experiments with plain HTML5, no CSS/JS, whatsoever.
HTML
1
star
37

nx-template

Boilerplate to create an Nx monorepo.
1
star
38

time-freeze

Application that automatically captures freezing moment from wide angle then generates a panorama viewer on Facebook/Google.
Python
1
star