zoxide/contrib/completions/zoxide.ts

201 lines
4.5 KiB
TypeScript
Raw Normal View History

2021-10-20 22:23:20 +00:00
const completion: Fig.Spec = {
name: "zoxide",
description: "A smarter cd command for your terminal",
subcommands: [
{
name: "add",
description: "Add a new directory or increment its rank",
options: [
{
name: ["-h", "--help"],
description: "Print help information",
},
{
name: ["-V", "--version"],
description: "Print version information",
},
],
args: {
name: "paths",
isVariadic: true,
template: "folders",
},
},
{
name: "import",
description: "Import entries from another application",
options: [
{
name: "--from",
description: "Application to import from",
args: {
name: "from",
suggestions: [
2022-04-10 22:11:51 +00:00
"autojump",
"z",
],
2021-10-20 22:23:20 +00:00
},
},
{
name: "--merge",
description: "Merge into existing database",
},
{
name: ["-h", "--help"],
description: "Print help information",
},
{
name: ["-V", "--version"],
description: "Print version information",
},
],
args: {
name: "path",
template: "filepaths",
},
},
{
name: "init",
description: "Generate shell configuration",
options: [
{
name: "--cmd",
2022-04-10 22:11:51 +00:00
description: "Changes the prefix of the `z` and `zi` commands",
2021-10-20 22:23:20 +00:00
args: {
name: "cmd",
isOptional: true,
},
},
{
name: "--hook",
2022-04-10 22:11:51 +00:00
description: "Changes how often zoxide increments a directory's score",
2021-10-20 22:23:20 +00:00
args: {
name: "hook",
isOptional: true,
suggestions: [
2022-04-10 22:11:51 +00:00
"none",
"prompt",
"pwd",
],
2021-10-20 22:23:20 +00:00
},
},
{
2022-04-10 22:11:51 +00:00
name: "--no-cmd",
description: "Prevents zoxide from defining the `z` and `zi` commands",
2021-10-20 22:23:20 +00:00
},
{
name: ["-h", "--help"],
description: "Print help information",
},
{
name: ["-V", "--version"],
description: "Print version information",
},
],
args: {
name: "shell",
suggestions: [
2022-04-10 22:11:51 +00:00
"bash",
"elvish",
"fish",
"nushell",
"posix",
"powershell",
"xonsh",
"zsh",
],
2021-10-20 22:23:20 +00:00
},
},
{
name: "query",
description: "Search for a directory in the database",
options: [
{
name: "--exclude",
description: "Exclude a path from results",
args: {
name: "exclude",
isOptional: true,
template: "folders",
},
},
{
name: "--all",
description: "Show deleted directories",
},
{
name: ["-i", "--interactive"],
description: "Use interactive selection",
2022-04-10 22:11:51 +00:00
exclusiveOn: [
"-l",
"--list",
],
2021-10-20 22:23:20 +00:00
},
{
name: ["-l", "--list"],
description: "List all matching directories",
2022-04-10 22:11:51 +00:00
exclusiveOn: [
"-i",
"--interactive",
],
2021-10-20 22:23:20 +00:00
},
{
name: ["-s", "--score"],
description: "Print score with results",
2022-04-10 22:11:51 +00:00
exclusiveOn: [
"-i",
"--interactive",
],
2021-10-20 22:23:20 +00:00
},
{
name: ["-h", "--help"],
description: "Print help information",
},
{
name: ["-V", "--version"],
description: "Print version information",
},
],
args: {
name: "keywords",
isOptional: true,
},
},
{
name: "remove",
description: "Remove a directory from the database",
options: [
{
name: ["-i", "--interactive"],
2021-12-24 12:19:36 +00:00
description: "Use interactive selection",
2021-10-20 22:23:20 +00:00
},
{
name: ["-h", "--help"],
description: "Print help information",
},
{
name: ["-V", "--version"],
description: "Print version information",
},
],
args: {
name: "paths",
isOptional: true,
template: "folders",
},
},
],
options: [
{
name: ["-h", "--help"],
description: "Print help information",
},
{
name: ["-V", "--version"],
description: "Print version information",
},
],
};
export default completion;