Ben Chuanlong Du's Blog

It is never too late to learn.

Great Command Line Tools Developed in Rust

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

GQL

GQL is a query language with a syntax very similar to SQL with a tiny engine to perform queries on .git files instance of database files, the engine executes the …

The ripgrep Command Is a Better Alternative to the find Command

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Installation on Debian/Ubuntu Based Linux Distributions

wajig install ripgrep 

Installation on macOS

brew install ripgrep 

List Files

There are 2 ways to list files using ripgrep. The first way is file name (globbing pattern) based and the second way is file content (regex pattern) based.

Hands on the Cobra Module in Golang

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Comments

  1. Cobra support groups of flags which appear together or are mutually exclusive. For detailed discussions, please refer to Flag Groups .

Quickly Start a Cobra-based project

Below is an example of creating a cobra-based project "icon".

Parsing Command-line Arguments in Rust

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Tips and Traps

There are 2 popular crates clap and structopt (based on clap) for this purpose. I personally prefer clap .