Skip to content

Commit

Permalink
Remove $ symbol from some commands
Browse files Browse the repository at this point in the history
<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Dev:-odo-Dev-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Dev:-Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/Pull-Requests:-Review-guideline

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Documentation:-Contributing
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind feature
/kind cleanup
/kind tests

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind documentation

**What does this PR do / why we need it:**

This PR does the following:
* Removes all `$` from commands that should be "copied-and-pasted"
* Separates all console output to a separation section.

Notes:
* "Details" markdown feature would of been used, but Docusaurus does not
  support <details> within a <tab>.

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes #5844

**PR acceptance criteria:**

- [X] Documentation

**How to test changes / Special notes to the reviewer:**

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
  • Loading branch information
cdrage committed Jul 27, 2022
1 parent 02bd7b8 commit 4807ca8
Show file tree
Hide file tree
Showing 12 changed files with 172 additions and 99 deletions.
6 changes: 0 additions & 6 deletions docs/website/docs/command-reference/create-namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ To create a namespace you can run `odo create namespace <name>`:
```shell
odo create namespace mynamespace
```

Example -
```shell
odo create namespace mynamespace
✓ Namespace "mynamespace" is ready for use
✓ New namespace created and now using namespace: mynamespace
```
Expand All @@ -24,10 +21,7 @@ To create a project you can run `odo create project <name>`:
```shell
odo create project myproject
```

Example -
```shell
odo create project myproject
✓ Project "myproject" is ready for use
✓ New project created and now using project: myproject
```
Expand Down
6 changes: 0 additions & 6 deletions docs/website/docs/command-reference/delete-namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ To delete a namespace you can run `odo delete namespace <name>`:
```shell
odo delete namespace mynamespace
```

Example:
```shell
odo delete namespace mynamespace
✓ Namespace "mynamespace" deleted
```

Expand All @@ -21,10 +18,7 @@ To delete a project you can run `odo delete project <name>`:
```shell
odo delete project myproject
```

Example:
```shell
odo delete project myproject
✓ Project "myproject" deleted
```

Expand Down
14 changes: 9 additions & 5 deletions docs/website/docs/command-reference/describe-binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ For each of these resources, the following information is displayed:

When the service binding are not deployed yet to the cluster:

```shell
$ odo describe binding
```console
odo describe binding
```
```console
ServiceBinding used by the current component:

Service Binding Name: my-nodejs-app-cluster-sample
Expand All @@ -60,8 +62,10 @@ Start "odo dev" first to see binding information.

When the resources have been deployed to the cluster, the command also extracts information from the status of the resources to display information about the variables that can be used from the component.

```shell
$ odo describe binding
```console
odo describe binding
```
```console
ServiceBinding used by the current component:

Service Binding Name: my-nodejs-app-cluster-sample-2
Expand Down Expand Up @@ -98,7 +102,7 @@ Available binding information:

### Describe without access to Devfile

```shell
```console
odo describe binding --name <component_name>
```

Expand Down
24 changes: 15 additions & 9 deletions docs/website/docs/command-reference/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ If you haven't already done so, you must [initialize](../command-reference/init)

Afterwards, run `odo dev`:

```sh
$ odo dev
```console
odo dev
```
```console
__
/ \__ Developing using the my-nodejs-app Devfile
\__/ \ Namespace: default
Expand Down Expand Up @@ -73,8 +75,10 @@ For example, given the following excerpt from a Devfile:
- running `odo dev` will build the application using the default `my-build` command.
- running `odo dev --build-command my-build-with-version` will build the application using the `my-build-with-version` command:
```shell
$ odo dev --build-command my-build-with-version
```console
odo dev --build-command my-build-with-version
```
```console
__
/ \__ Developing using the my-sample-go Devfile
Expand Down Expand Up @@ -126,8 +130,10 @@ For example, given the following excerpt from a Devfile:
- running `odo dev` will run the default `my-run` command
- running `odo dev --run-command my-run-with-postgres` will run the `my-run-with-postgres` command:
```shell
$ odo dev --run-command my-run-with-postgres
```console
odo dev --run-command my-run-with-postgres
```
```console
__
/ \__ Developing using the my-java-springboot-app Devfile
Expand Down Expand Up @@ -177,7 +183,7 @@ This command will override the `USER` Devfile variable with the value of the `US
It will also override the value of the `DEBUG` Devfile variable with the `true` value.

```shell
$ odo dev --var USER --var DEBUG=true
odo dev --var USER --var DEBUG=true
```

If you create a file `config.vars` containing:
Expand All @@ -190,14 +196,14 @@ DEBUG=true
The following command will have the same behaviour as the previous one:

```shell
$ odo dev --var-file config.vars
odo dev --var-file config.vars
```

The following command will override the `USER` Devfile variable with the `john` value:


```shell
$ odo dev --var USER=john --var-file config.vars
odo dev --var USER=john --var-file config.vars
```

## Devfile (Advanced Usage)
Expand Down
16 changes: 12 additions & 4 deletions docs/website/docs/command-reference/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ The required `--name` flag indicates how the component initialized by this comma

### Interactive mode

```console
odo init
```
$ odo init
```console
? Select language: java
? Select project type: Maven Java (java-maven, registry: DefaultDevfileRegistry)
? Which starter project do you want to use? springbootproject
Expand All @@ -52,8 +54,10 @@ To deploy your component to a cluster use "odo deploy".

In this example, the devfile will be downloaded from the **Staging** registry, which is the first one in the list containing the `nodejs-react` devfile.

```console
odo preference view
```
$ odo preference view
```console
Preference parameters:
PARAMETER VALUE
ConsentTelemetry true
Expand Down Expand Up @@ -82,8 +86,10 @@ To deploy your component to a cluster use "odo deploy".

In this example, the devfile will be downloaded from the **DefaultDevfileRegistry** registry, as explicitly indicated by the `--devfile-registry` flag.

```console
odo preference view
```
$ odo preference view
```console
Preference parameters:
PARAMETER VALUE
ConsentTelemetry true
Expand All @@ -110,8 +116,10 @@ To deploy your component to a cluster use "odo deploy".

### Non-interactive mode from a URL

```console
odo init --devfile-path https://registry.devfile.io/devfiles/nodejs-angular --name my-nodejs-app --starter nodejs-angular-starter
```
$ odo init --devfile-path https://registry.devfile.io/devfiles/nodejs-angular --name my-nodejs-app --starter nodejs-angular-starter
```console
✓ Downloading devfile from "https://registry.devfile.io/devfiles/nodejs-angular" [415ms]
✓ Downloading starter project "nodejs-angular-starter" [484ms]

Expand Down
76 changes: 60 additions & 16 deletions docs/website/docs/command-reference/json-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,37 @@ from the devfiles in the registries defined in the list of preferred registries
The output of this command contains a list of devfile name and registry name:

```bash
$ odo analyze -o json
odo analyze -o json
```
```json
[
{
"devfile": "nodejs",
"devfileRegistry": "DefaultDevfileRegistry"
}
]
$ echo $?
```
```console
echo $?
```
```console
0
```

If the command is executed in an empty directory, it will return an error in the standard error stream and terminate with a non-zero exit status:

```bash
$ odo analyze -o json
odo analyze -o json
```
```json
{
"message": "No valid devfile found for project in /home/user/my/empty/directory"
}
$ echo $?
```
```console
echo $?
```
```console
1
```

Expand All @@ -58,6 +70,8 @@ $ odo init -o json \
--name aname \
--devfile go \
--starter go-starter
```
```json
{
"devfilePath": "/home/user/my-project/devfile.yaml",
"devfileData": {
Expand All @@ -75,7 +89,11 @@ $ odo init -o json \
"runningIn": [],
"managedBy": "odo"
}
$ echo $?
```
```console
echo $?
```
```console
0
```

Expand All @@ -87,10 +105,16 @@ $ odo init -o json \
--name aname \
--devfile go \
--starter go-starter
```
```json
{
"message": "a devfile already exists in the current directory"
}
$ echo $?
```
```console
echo $?
```
```console
1
```

Expand All @@ -109,7 +133,9 @@ When the `describe component` command is executed without parameter from a direc
- the modes in which the component is deployed (either none, Dev, Deploy or both)

```bash
$ odo describe component -o json
odo describe component -o json
```
```json
{
"devfilePath": "/home/phmartin/Documents/tests/tmp/devfile.yaml",
"devfileData": {
Expand Down Expand Up @@ -146,7 +172,9 @@ The command with name and namespace will never return information about the Devf
The command with name and namespace will never return information about the forwarded ports, as the information resides in the directory of the Devfile.

```bash
$ odo describe component --name aname -o json
odo describe component --name aname -o json
```
```json
{
"runningIn": ["Dev"],
"managedBy": "odo"
Expand All @@ -164,7 +192,9 @@ The `componentInDevfile` field gives the name of the component present in the `c
In this example, the `component2` component is running in Deploy mode, and the command has been executed from a directory containing a Devfile defining a `component1` component, not running.

```bash
$ odo list --namespace project1
odo list --namespace project1
```
```json
{
"componentInDevfile": "component1",
"components": [
Expand Down Expand Up @@ -193,7 +223,9 @@ The `odo registry` command lists all the Devfile stacks from Devfile registries.
The default output will return information found into the registry index for stacks:

```shell
$ odo registry -o json
odo registry -o json
```
```json
[
{
"name": "python-django",
Expand Down Expand Up @@ -222,7 +254,9 @@ $ odo registry -o json
Using the `--details` flag, you will also get information about the Devfile:

```shell
$ odo registry --details -o json
odo registry --details -o json
```
```json
[
{
"name": "python-django",
Expand Down Expand Up @@ -275,7 +309,9 @@ the component in the `status.bindingFiles` and/or `status.bindingEnvVars` fields
When a service binding resource is defined in the Devfile, and the component is not deployed, you get an output similar to:

```shell
$ odo list binding -o json
odo list binding -o json
```
```json
{
"bindingsInDevfile": [
"my-nodejs-app-cluster-sample"
Expand Down Expand Up @@ -308,7 +344,9 @@ With the same Devfile, when `odo dev` is running, you get an output similar to


```shell
$ odo list binding -o json
odo list binding -o json
```
```json
{
"bindingsInDevfile": [
"my-nodejs-app-cluster-sample"
Expand Down Expand Up @@ -361,7 +399,9 @@ you get an output similar to (note that the `.bindingsInDevfile` field is not pr


```shell
$ odo list binding -o json
odo list binding -o json
```
```json
{
"bindings": [
{
Expand Down Expand Up @@ -419,7 +459,9 @@ information from the deployed resource with the given name.
Without a name, the output of the command is a list of service binding details, for example:

```shell
$ odo describe binding -o json
odo describe binding -o json
```
```json
[
{
"name": "my-first-binding",
Expand Down Expand Up @@ -497,7 +539,9 @@ $ odo describe binding -o json
When specifying a name, the output is a unique service binding:

```shell
$ odo describe binding --name my-first-binding -o json
odo describe binding --name my-first-binding -o json
```
```json
{
"name": "my-first-binding",
"spec": {
Expand Down
Loading

0 comments on commit 4807ca8

Please sign in to comment.