From 8a3ef0e3b4967582ad5c5d42e5684fccdf952b6f Mon Sep 17 00:00:00 2001 From: liliwilson Date: Wed, 20 May 2026 20:25:13 +0000 Subject: [PATCH] Add completion spec: test Co-Authored-By: Oz --- command-signatures/json/test.json | 315 ++++++++++++++++++++++++++++++ 1 file changed, 315 insertions(+) create mode 100644 command-signatures/json/test.json diff --git a/command-signatures/json/test.json b/command-signatures/json/test.json new file mode 100644 index 00000000..3272feb1 --- /dev/null +++ b/command-signatures/json/test.json @@ -0,0 +1,315 @@ +{ + "name": "test", + "description": "Evaluate a conditional expression", + "args": { + "name": "EXPRESSION", + "description": "Conditional expression made of primaries, operators, and operands", + "isVariadic": true, + "suggestions": [ + { + "name": "!", + "description": "Negate expression" + }, + { + "name": "(", + "description": "Start grouped expression" + }, + { + "name": ")", + "description": "End grouped expression" + }, + { + "name": "=", + "description": "Strings are equal" + }, + { + "name": "==", + "description": "Strings are equal" + }, + { + "name": "!=", + "description": "Strings are not equal" + }, + { + "name": "<", + "description": "Left string sorts before right string" + }, + { + "name": ">", + "description": "Left string sorts after right string" + } + ] + }, + "options": [ + { + "name": "-a", + "description": "Logical AND; in some shells, true if FILE exists", + "args": { + "name": "FILE", + "isOptional": true, + "template": "filepaths" + } + }, + { + "name": "-b", + "description": "True if FILE exists and is block special", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-c", + "description": "True if FILE exists and is character special", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-d", + "description": "True if FILE exists and is a directory", + "args": { + "name": "FILE", + "template": "folders" + } + }, + { + "name": "-e", + "description": "True if FILE exists", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-f", + "description": "True if FILE exists and is a regular file", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-g", + "description": "True if FILE exists and is set-group-ID", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-G", + "description": "True if FILE exists and is owned by the effective group ID", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-h", + "description": "True if FILE exists and is a symbolic link", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-k", + "description": "True if FILE exists and has its sticky bit set", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-L", + "description": "True if FILE exists and is a symbolic link", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-n", + "description": "True if STRING length is nonzero", + "args": { + "name": "STRING" + } + }, + { + "name": "-N", + "description": "True if FILE exists and has been modified since it was last read", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-o", + "description": "Logical OR; in some shells, true if OPTION is enabled", + "args": { + "name": "OPTION", + "isOptional": true + } + }, + { + "name": "-O", + "description": "True if FILE exists and is owned by the effective user ID", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-p", + "description": "True if FILE exists and is a named pipe", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-r", + "description": "True if FILE exists and is readable", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-R", + "description": "True if VAR is set and is a name reference", + "args": { + "name": "VAR" + } + }, + { + "name": "-s", + "description": "True if FILE exists and has a size greater than zero", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-S", + "description": "True if FILE exists and is a socket", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-t", + "description": "True if FD is opened on a terminal", + "args": { + "name": "FD" + } + }, + { + "name": "-u", + "description": "True if FILE exists and its set-user-ID bit is set", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-v", + "description": "True if VAR is set", + "args": { + "name": "VAR" + } + }, + { + "name": "-w", + "description": "True if FILE exists and is writable", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-x", + "description": "True if FILE exists and is executable", + "args": { + "name": "FILE", + "template": "filepaths" + } + }, + { + "name": "-z", + "description": "True if STRING length is zero", + "args": { + "name": "STRING" + } + }, + { + "name": "-ef", + "description": "True if FILE1 and FILE2 refer to the same file", + "args": { + "name": "FILE2", + "template": "filepaths" + } + }, + { + "name": "-nt", + "description": "True if FILE1 is newer than FILE2", + "args": { + "name": "FILE2", + "template": "filepaths" + } + }, + { + "name": "-ot", + "description": "True if FILE1 is older than FILE2", + "args": { + "name": "FILE2", + "template": "filepaths" + } + }, + { + "name": "-eq", + "description": "True if INTEGER1 is equal to INTEGER2", + "args": { + "name": "INTEGER2" + } + }, + { + "name": "-ge", + "description": "True if INTEGER1 is greater than or equal to INTEGER2", + "args": { + "name": "INTEGER2" + } + }, + { + "name": "-gt", + "description": "True if INTEGER1 is greater than INTEGER2", + "args": { + "name": "INTEGER2" + } + }, + { + "name": "-le", + "description": "True if INTEGER1 is less than or equal to INTEGER2", + "args": { + "name": "INTEGER2" + } + }, + { + "name": "-lt", + "description": "True if INTEGER1 is less than INTEGER2", + "args": { + "name": "INTEGER2" + } + }, + { + "name": "-ne", + "description": "True if INTEGER1 is not equal to INTEGER2", + "args": { + "name": "INTEGER2" + } + } + ] +}