|
| 1 | +command: |
| 2 | + help: Define the root command, or any sub-command. |
| 3 | + url: https://bashly.dannyb.co/configuration/command/ |
| 4 | + example: |- |
| 5 | + name: rush |
| 6 | + help: Personal package manager |
| 7 | + version: 0.6.5 |
| 8 | +
|
| 9 | + commands: |
| 10 | + - name: add |
| 11 | + alias: a |
| 12 | + help: Register a local repository |
| 13 | + args: |
| 14 | + - name: repo |
| 15 | + required: true |
| 16 | + help: Repository name. |
| 17 | +
|
| 18 | +command.alias: |
| 19 | + help: Specify one or more aliases for this sub-command. |
| 20 | + url: https://bashly.dannyb.co/configuration/command/#alias |
| 21 | + example: |- |
| 22 | + # Define a single alias |
| 23 | + command: |
| 24 | + name: download |
| 25 | + alias: d |
| 26 | +
|
| 27 | + # Define multiple aliases |
| 28 | + command: |
| 29 | + name: download |
| 30 | + alias: [d, pull] |
| 31 | +
|
| 32 | + # Run this commnad with anything that starts with 's'. |
| 33 | + command: |
| 34 | + name: server |
| 35 | + alias: s* |
| 36 | +
|
| 37 | +command.args: |
| 38 | + help: Define a list of positional arguments. See `arg` for reference. |
| 39 | + url: https://bashly.dannyb.co/configuration/command/#args |
| 40 | + example: |- |
| 41 | + args: |
| 42 | + - name: repo |
| 43 | + required: true |
| 44 | + help: Repository name. |
| 45 | +
|
| 46 | +command.catch_all: |
| 47 | + help: Specify that this command should allow for additional arbitrary arguments or flags. |
| 48 | + url: https://bashly.dannyb.co/configuration/command/#catch_all |
| 49 | + example: |- |
| 50 | + commands: |
| 51 | + - name: download |
| 52 | + help: Download one or more URLs |
| 53 | + |
| 54 | + # Set to true to simply enable this option |
| 55 | + catch_all: true |
| 56 | +
|
| 57 | + - name: upload |
| 58 | + help: Upload one or more files |
| 59 | +
|
| 60 | + # Use this extended syntax in order to also provide a usage label |
| 61 | + # for these arguemnts, as well as specifying that at least one is |
| 62 | + # required. |
| 63 | + catch_all: |
| 64 | + label: Files |
| 65 | + help: Files to upload |
| 66 | + required: true |
| 67 | +
|
| 68 | +command.commands: |
| 69 | + help: Define a list of sub-commands. See `command` for reference. |
| 70 | + url: https://bashly.dannyb.co/configuration/command/#commands |
| 71 | + example: |- |
| 72 | + commands: |
| 73 | + - name: add |
| 74 | + alias: a |
| 75 | + help: Register a local repository |
| 76 | +
|
| 77 | +command.completions: |
| 78 | + help: Specify a list of additional completion suggestions when used in conjunction with `bashly add comp`. |
| 79 | + url: https://bashly.dannyb.co/configuration/command/#completions |
| 80 | + example: |- |
| 81 | + commands: |
| 82 | + - name: view |
| 83 | + help: View a directory, system user or a git branch |
| 84 | + completions: |
| 85 | + - <directory> |
| 86 | + - <user> |
| 87 | + - $(git branch 2> /dev/null) |
| 88 | +
|
| 89 | +command.default: |
| 90 | + help: Specify that this sub-command will be executed implicitely. |
| 91 | + url: https://bashly.dannyb.co/configuration/command/#default |
| 92 | + example: |- |
| 93 | + # This command will execute when the command line is not |
| 94 | + # recognized. |
| 95 | + commands: |
| 96 | + - name: upload |
| 97 | + help: Upload a file |
| 98 | + default: true |
| 99 | +
|
| 100 | + # This command will execute when the command line is not |
| 101 | + # recognized, or when it is empty. |
| 102 | + commands: |
| 103 | + - name: all |
| 104 | + help: Run all tests |
| 105 | + default: force |
| 106 | +
|
| 107 | +command.dependencies: |
| 108 | + help: Specify a list of required external commands that are needed to run this command. |
| 109 | + url: https://bashly.dannyb.co/configuration/command/#dependencies |
| 110 | + example: |- |
| 111 | + # Array syntax |
| 112 | + dependencies: |
| 113 | + - docker |
| 114 | + - curl |
| 115 | +
|
| 116 | + # Hash syntax, to provide additional help message |
| 117 | + dependencies: |
| 118 | + docker: see https://docker.com for installation instructions |
| 119 | + git: "install by running: sudo apt install git" |
| 120 | + |
| 121 | +command.environment_variables: |
| 122 | + help: Define a list of environment variables. See `environment_variable` for reference. |
| 123 | + url: https://bashly.dannyb.co/configuration/command/#environment_variables |
| 124 | + example: |- |
| 125 | + environment_variables: |
| 126 | + - name: config_path |
| 127 | + help: Location of the config file |
| 128 | + default: ~/config.ini |
| 129 | + - name: api_key |
| 130 | + help: Your API key |
| 131 | + required: true |
| 132 | +
|
| 133 | +command.examples: |
| 134 | + help: Define one or more example messages. |
| 135 | + url: https://bashly.dannyb.co/configuration/command/#examples |
| 136 | + example: |- |
| 137 | + # Use an array of examples for simple one-liners. |
| 138 | + examples: |
| 139 | + - cli download example.com |
| 140 | + - cli download example.com ./output -f |
| 141 | +
|
| 142 | + # Use a multiline string when you need more control. |
| 143 | + # Note the use of the '|-' marker that tells YAML to use the |
| 144 | + # string as is, including the newlines it contains. |
| 145 | + examples: |- |
| 146 | + Upload a file |
| 147 | + $ cli upload profile.png -u admin -p s3cr3t |
| 148 | +
|
| 149 | + Upload a file (you will be prompted to provide a password) |
| 150 | + $ cli upload profile.png --user admin |
| 151 | +
|
| 152 | +command.flags: |
| 153 | + help: Define a list of option flags. See `flag` for reference. |
| 154 | + url: https://bashly.dannyb.co/configuration/command/#flags |
| 155 | + example: |- |
| 156 | + flags: |
| 157 | + - long: --purge |
| 158 | + short: -p |
| 159 | + help: Also remove the local directory. |
| 160 | +
|
| 161 | +command.footer: |
| 162 | + help: Specify a message to show at the bottom of the help text. |
| 163 | + url: https://bashly.dannyb.co/configuration/command/#footer |
| 164 | + example: |- |
| 165 | + footer: For further help visit https://my.docs-site.com |
| 166 | +
|
| 167 | +command.group: |
| 168 | + help: Specify the group that this command belongs to. |
| 169 | + url: https://bashly.dannyb.co/configuration/command/#group |
| 170 | + example: |- |
| 171 | + command: |
| 172 | + name: start |
| 173 | + help: Start the server |
| 174 | + group: Server |
| 175 | +
|
| 176 | +command.help: |
| 177 | + help: Specify the help text to show when showing uwags. |
| 178 | + url: https://bashly.dannyb.co/configuration/command/#help |
| 179 | + example: |- |
| 180 | + name: docker |
| 181 | + help: Runtime for containers |
| 182 | +
|
| 183 | + commands: |
| 184 | + - name: images |
| 185 | + help: Manage images |
| 186 | +
|
| 187 | +command.name: |
| 188 | + help: Specify the name of the command. This option is required. |
| 189 | + url: https://bashly.dannyb.co/configuration/command/#name |
| 190 | + example: |- |
| 191 | + name: docker |
| 192 | + help: Runtime for containers |
| 193 | +
|
| 194 | + commands: |
| 195 | + - name: images |
| 196 | + help: Manage images |
| 197 | +
|
| 198 | +command.version: |
| 199 | + help: Specify the version to show when running with `--version`. |
| 200 | + url: https://bashly.dannyb.co/configuration/command/#version |
| 201 | + example: |- |
| 202 | + name: rush |
| 203 | + help: Personal package manager |
| 204 | + version: 0.6.5 |
0 commit comments