feat(spec): better file path suggestions (#41)

Enhance file/folder suggestion
This commit is contained in:
VERSE
2026-07-26 20:43:05 +07:00
committed by GitHub
parent c4e9bcdd88
commit 27e0792560
24 changed files with 183 additions and 16 deletions
+1
View File
@@ -8,6 +8,7 @@ func init() {
spec.Register(&spec.Spec{
Name: "bat",
Description: "A cat(1) clone with syntax highlighting and Git integration",
Generator: spec.FileGenerator(),
Options: []spec.Option{
{Name: "-A", Description: "Show non-printable characters"},
{Name: "-p", Description: "Show plain style, no decorations"},
+1
View File
@@ -8,6 +8,7 @@ func init() {
spec.Register(&spec.Spec{
Name: "code",
Description: "Read from stdin (e.g.",
Generator: spec.FileGenerator(),
Options: []spec.Option{
{Name: "-d", Description: "Compare two files with each other"},
{Name: "-m", Description: "Add folder(s) to the last active window"},
+1
View File
@@ -8,5 +8,6 @@ func init() {
spec.Register(&spec.Spec{
Name: "cot",
Description: "Command-line utility for CotEditor",
Generator: spec.FileGenerator(),
})
}
+1
View File
@@ -8,5 +8,6 @@ func init() {
spec.Register(&spec.Spec{
Name: "emacs",
Description: "An extensible, customizable, free/libre text editor - and more",
Generator: spec.FileGenerator(),
})
}
+2
View File
@@ -8,6 +8,8 @@ func init() {
spec.Register(&spec.Spec{
Name: "glow",
Description: "Render markdown on the CLI, with pizzazz!",
MaxArgs: 1,
Generator: spec.FileGenerator(),
Subcommands: []spec.Subcommand{
{Name: "config", Description: "Edit the glow config file"},
{Name: "help", Description: "Help about any command"},
+1
View File
@@ -8,6 +8,7 @@ func init() {
spec.Register(&spec.Spec{
Name: "idea",
Description: "IntelliJ IDEA CLI",
Generator: spec.FileGenerator(),
Subcommands: []spec.Subcommand{
{Name: "diff", Description: "Open the diff viewer to see the differences between two specified files"},
{Name: "merge", Description: "Open the Merge dialog to merge the specified files"},
+1
View File
@@ -8,6 +8,7 @@ func init() {
spec.Register(&spec.Spec{
Name: "less",
Description: "view file contents (scrollable)",
MaxArgs: 1,
Generator: spec.FileGenerator(),
})
}
+1
View File
@@ -8,6 +8,7 @@ func init() {
spec.Register(&spec.Spec{
Name: "lvim",
Description: "Hyperextensible Vim-based text editor",
Generator: spec.FileGenerator(),
Options: []spec.Option{
{Name: "--cmd", Description: "Execute <cmd> before any config"},
{Name: "-c", Description: "Execute <cmd> after config and first file"},
+1
View File
@@ -8,6 +8,7 @@ func init() {
spec.Register(&spec.Spec{
Name: "micro",
Description: "True/false",
Generator: spec.FileGenerator(),
Subcommands: []spec.Subcommand{
{Name: "remove", Description: "Remove plugin(s)"},
{Name: "update", Description: "Update plugin(s) (if no argument is given, updates all plugins)"},
+2
View File
@@ -8,6 +8,8 @@ func init() {
spec.Register(&spec.Spec{
Name: "more",
Description: "Opposite of less",
MaxArgs: 1,
Generator: spec.FileGenerator(),
Options: []spec.Option{
{Name: "-d", Description: "Do not pause after any line containing a ^L (form feed)"},
{Name: "-f", Description: "Count logical lines, rather than screen lines"},
+1
View File
@@ -8,5 +8,6 @@ func init() {
spec.Register(&spec.Spec{
Name: "nano",
Description: "Nano",
Generator: spec.FileGenerator(),
})
}
+1
View File
@@ -8,6 +8,7 @@ func init() {
spec.Register(&spec.Spec{
Name: "nvim",
Description: "Hyperextensible Vim-based text editor",
Generator: spec.FileGenerator(),
Options: []spec.Option{
{Name: "--cmd", Description: "Execute <cmd> before any config"},
{Name: "-c", Description: "Execute <cmd> after config and first file"},
+3 -1
View File
@@ -7,7 +7,9 @@ import (
func init() {
spec.Register(&spec.Spec{
Name: "rich",
Description: "Defined by terminal, appearance may differ",
Description: "Rich terminal text formatting",
MaxArgs: 1,
Generator: spec.FileGenerator(),
Options: []spec.Option{
{Name: "-p", Description: "Print console markup. See https://rich.readthedocs.io/en/latest/markup.html"},
{Name: "-u", Description: "Display a horizontal rule"},
+1
View File
@@ -8,6 +8,7 @@ func init() {
spec.Register(&spec.Spec{
Name: "subl",
Description: "Sublime Text",
Generator: spec.FileGenerator(),
Options: []spec.Option{
{Name: "--project", Description: "Load the given project"},
{Name: "--command", Description: "Run the given command"},
+1
View File
@@ -8,6 +8,7 @@ func init() {
spec.Register(&spec.Spec{
Name: "vi",
Description: "Print help message for vi and exit",
Generator: spec.FileGenerator(),
Options: []spec.Option{
{Name: "-h", Description: "Print help message for vi and exit"},
},
+1
View File
@@ -8,6 +8,7 @@ func init() {
spec.Register(&spec.Spec{
Name: "vim",
Description: "Vi IMproved, a programmer",
Generator: spec.FileGenerator(),
Options: []spec.Option{
{Name: "-v", Description: "Vi mode (like 'vi')"},
{Name: "-e", Description: "Ex mode (like 'ex')"},
+1
View File
@@ -8,6 +8,7 @@ func init() {
spec.Register(&spec.Spec{
Name: "vimr",
Description: "VimR - Neovim GUI for macOS in Swift",
Generator: spec.FileGenerator(),
Options: []spec.Option{
{Name: "-h", Description: "Show help"},
{Name: "--dry-run", Description: "Just print the 'open' command"},
+1
View File
@@ -8,6 +8,7 @@ func init() {
spec.Register(&spec.Spec{
Name: "xed",
Description: "Xcode text editor invocation tool",
Generator: spec.FileGenerator(),
Options: []spec.Option{
{Name: "--launch", Description: "Launches Xcode, opening a new empty unsaved file"},
{Name: "--create", Description: "Selects the given line in the last file opened"},
+1
View File
@@ -8,6 +8,7 @@ func init() {
spec.Register(&spec.Spec{
Name: "xxd",
Description: "Make a hexdump or do the reverse",
Generator: spec.FileGenerator(),
Options: []spec.Option{
{Name: "-help", Description: "Show help for xxd"},
{Name: "-autoskip", Description: "Toggle autoskip: A single '*' replaces nul-lines. Default off"},
+1
View File
@@ -8,6 +8,7 @@ func init() {
spec.Register(&spec.Spec{
Name: "zed",
Description: "A lightning-fast, collaborative code editor written in Rust",
Generator: spec.FileGenerator(),
Options: []spec.Option{
{Name: "-h", Description: "Print help information"},
{Name: "-v", Description: "Print Zed's version and the app path"},