Skip to content

Commit e0f70c5

Browse files
committed
docs: remove > in cli command samples
1 parent add8ad8 commit e0f70c5

28 files changed

Lines changed: 320 additions & 168 deletions

user_guide_src/source/cli/cli_commands.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ run()
6565
-----
6666

6767
The ``run()`` method is the method that is called when the command is being run. The ``$params`` array is a list of
68-
any CLI arguments after the command name for your use. If the CLI string was::
68+
any CLI arguments after the command name for your use. If the CLI string was:
6969

70-
> php spark foo bar baz
70+
.. code-block:: console
71+
72+
php spark foo bar baz
7173
7274
Then **foo** is the command name, and the ``$params`` array would be:
7375

user_guide_src/source/cli/cli_generators.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ Introduction
1414
************
1515

1616
All built-in generators reside under the ``Generators`` group when listed using ``php spark list``.
17-
To view the full description and usage information on a particular generator, use the command::
17+
To view the full description and usage information on a particular generator, use the command:
1818

19-
> php spark help <generator_command>
19+
.. code-block:: console
20+
21+
php spark help <generator_command>
2022
2123
where ``<generator_command>`` will be replaced with the command to check.
2224

@@ -287,9 +289,11 @@ wrapper to the controller, model, entity, migration, and seeder generator comman
287289
name that will be used to name all the generated classes. Also, **individual options** supported by each
288290
generator command are recognized by the scaffold command.
289291

290-
Running this in your terminal::
292+
Running this in your terminal:
293+
294+
.. code-block:: console
291295
292-
> php spark make:scaffold user
296+
php spark make:scaffold user
293297
294298
will create the following files:
295299

user_guide_src/source/cli/cli_overview.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ The Spark Commands
3636

3737
CodeIgniter ships with the official command **spark** and built-in commands.
3838

39-
You can run the spark and see the help::
39+
You can run the spark and see the help:
4040

41-
> php spark
41+
.. code-block:: console
42+
43+
php spark
4244
4345
See the :doc:`spark_commands` page for detailed information.
4446

user_guide_src/source/cli/spark_commands.rst

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,66 +23,86 @@ Showing List of Commands
2323

2424
When called **spark** without specifying a command, a simple help page is displayed
2525
that also provides a list of available commands and their descriptions, sorted by
26-
categories::
26+
categories:
2727

28-
> php spark
28+
.. code-block:: console
29+
30+
php spark
2931
3032
spark list
3133
^^^^^^^^^^
3234

33-
``php spark`` is the exactly same as the ``list`` command::
35+
``php spark`` is the exactly same as the ``list`` command:
36+
37+
.. code-block:: console
3438
35-
> php spark list
39+
php spark list
3640
3741
You may also use the ``--simple`` option to get a raw list of all available commands,
38-
sorted alphabetically::
42+
sorted alphabetically:
43+
44+
.. code-block:: console
3945
40-
> php spark list --simple
46+
php spark list --simple
4147
4248
Showing Help
4349
------------
4450

45-
You can get help about any CLI command using the ``help`` command as follows::
51+
You can get help about any CLI command using the ``help`` command as follows:
52+
53+
.. code-block:: console
54+
55+
php spark help db:seed
4656
47-
> php spark help db:seed
57+
Since v4.3.0, you can also use the ``--help`` option instead of the ``help`` command:
4858

49-
Since v4.3.0, you can also use the ``--help`` option instead of the ``help`` command::
59+
.. code-block:: console
5060
51-
> php spark db:seed --help
61+
php spark db:seed --help
5262
5363
Running a Command
5464
-----------------
5565

56-
You should pass the name of the command as the first argument to run that command::
66+
You should pass the name of the command as the first argument to run that command:
5767

58-
> php spark migrate
68+
.. code-block:: console
5969
60-
Some commands take additional arguments, which should be provided directly after the command, separated by spaces::
70+
php spark migrate
6171
62-
> php spark db:seed DevUserSeeder
72+
Some commands take additional arguments, which should be provided directly after the command, separated by spaces:
73+
74+
.. code-block:: console
75+
76+
php spark db:seed DevUserSeeder
6377
6478
For all of the commands CodeIgniter provides, if you do not provide the required arguments, you will be prompted
65-
for the information it needs to run correctly::
79+
for the information it needs to run correctly:
80+
81+
.. code-block:: console
6682
67-
> php spark make:controller
83+
php spark make:controller
6884
6985
Controller class name :
7086
7187
Suppressing Header Output
7288
-------------------------
7389

7490
When you run a command, the header with CodeIgniter version and the current time
75-
is output::
91+
is output:
7692

77-
> php spark env
93+
.. code-block:: console
94+
95+
php spark env
7896
7997
CodeIgniter v4.3.5 Command Line Tool - Server Time: 2023-06-16 12:45:31 UTC+00:00
8098
8199
Your environment is currently set as development.
82100
83-
You may always pass ``--no-header`` to suppress the header output, helpful for parsing results::
101+
You may always pass ``--no-header`` to suppress the header output, helpful for parsing results:
102+
103+
.. code-block:: console
84104
85-
> php spark env --no-header
105+
php spark env --no-header
86106
87107
Your environment is currently set as development.
88108

user_guide_src/source/concepts/autoloader.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ those classes can be found in:
5555
The key of each row is the namespace itself. This does not need a trailing back slash.
5656
The value is the location to the directory the classes can be found in.
5757

58-
.. note:: You can check the namespace configuration by ``spark namespaces`` command::
58+
.. note:: You can check the namespace configuration by ``spark namespaces`` command:
5959

60-
> php spark namespaces
60+
.. code-block:: console
61+
62+
php spark namespaces
6163
6264
By default, the application directory is namespace to the ``App`` namespace. You must namespace the controllers,
6365
libraries, or models in the application directory, and they will be found under the ``App`` namespace.

user_guide_src/source/dbmgmt/db_commands.rst

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ db:table --show
1919
---------------
2020

2121
To list all the tables in your database straight from your favorite terminal,
22-
you can use the ``db:table --show`` command::
22+
you can use the ``db:table --show`` command:
2323

24-
> php spark db:table --show
24+
.. code-block:: console
25+
26+
php spark db:table --show
2527
2628
When using this command it is assumed that a table exists.
2729
Otherwise, CodeIgniter will complain that the database has no tables.
@@ -32,21 +34,27 @@ Retrieve Some Records
3234
db:table
3335
--------
3436

35-
When you have a table named ``my_table``, you can see the field names and the records of a table::
37+
When you have a table named ``my_table``, you can see the field names and the records of a table:
38+
39+
.. code-block:: console
3640
37-
> php spark db:table my_table
41+
.. code-block:: consolephp spark db:table my_table
3842
3943
If the table ``my_table`` is not in the database, CodeIgniter displays a list of available tables to select.
4044

41-
You can also use the following command without the table name::
45+
You can also use the following command without the table name:
46+
47+
.. code-block:: console
4248
43-
> php spark db:table
49+
php spark db:table
4450
4551
In this case, the table name will be asked.
4652

47-
You can also pass a few options::
53+
You can also pass a few options:
4854

49-
> php spark db:table my_table --limit-rows 50 --limit-field-value 20 --desc
55+
.. code-block:: console
56+
57+
php spark db:table my_table --limit-rows 50 --limit-field-value 20 --desc
5058
5159
The option ``--limit-rows 50`` limits the number of rows to 50 rows.
5260

@@ -60,9 +68,11 @@ Retrieve Field Metadata
6068
db:table --metadata
6169
-------------------
6270

63-
When you have a table named ``my_table``, you can see metadata like the column type, max length of the table with the ``--metadata`` option::
71+
When you have a table named ``my_table``, you can see metadata like the column type, max length of the table with the ``--metadata`` option:
72+
73+
.. code-block:: console
6474
65-
> php spark db:table my_table --metadata
75+
php spark db:table my_table --metadata
6676
6777
When using this command it is assumed that the table exists.
6878
Otherwise, CodeIgniter will show a table list to select.

user_guide_src/source/dbmgmt/forge.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,24 @@ CodeIgniter supports creating databases straight from your favorite terminal usi
6060
command. By using this command it is assumed that the database is not yet existing. Otherwise, CodeIgniter
6161
will complain that the database creation has failed.
6262

63-
To start, just type the command and the name of the database (e.g., ``foo``)::
63+
To start, just type the command and the name of the database (e.g., ``foo``):
6464

65-
> php spark db:create foo
65+
.. code-block:: console
66+
67+
php spark db:create foo
6668
6769
If everything went fine, you should expect the ``Database "foo" successfully created.`` message displayed.
6870

6971
If you are on a testing environment or you are using the SQLite3 driver, you may pass in the file extension
7072
for the file where the database will be created using the ``--ext`` option. Valid values are ``db`` and
7173
``sqlite`` and defaults to ``db``. Remember that these should not be preceded by a period.
72-
::
74+
:
75+
76+
.. code-block:: console
77+
78+
php spark db:create foo --ext sqlite
7379
74-
> php spark db:create foo --ext sqlite
75-
// will create the db file in WRITEPATH/foo.sqlite
80+
The above command will create the db file in **WRITEPATH/foo.sqlite**.
7681

7782
.. note:: When using the special SQLite3 database name ``:memory:``, expect that the command will still
7883
produce a success message but no database file is created. This is because SQLite3 will just use

user_guide_src/source/dbmgmt/migration.rst

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -107,23 +107,31 @@ that wish to use them. The tools primarily provide access to the same methods th
107107
migrate
108108
=======
109109

110-
Migrates a database group with all available migrations::
110+
Migrates a database group with all available migrations:
111111

112-
> php spark migrate
112+
.. code-block:: console
113+
114+
php spark migrate
113115
114116
You can use (migrate) with the following options:
115117

116118
- ``-g`` - to chose database group, otherwise default database group will be used.
117119
- ``-n`` - to choose namespace, otherwise (App) namespace will be used.
118120
- ``--all`` - to migrate all namespaces to the latest migration.
119121

120-
This example will migrate ``Acme\Blog`` namespace with any new migrations on the test database group::
122+
This example will migrate ``Acme\Blog`` namespace with any new migrations on the test database group:
123+
124+
For Unix:
125+
126+
.. code-block:: console
127+
128+
php spark migrate -g test -n Acme\\Blog
121129
122-
For Unix:
123-
> php spark migrate -g test -n Acme\\Blog
130+
For Windows:
124131

125-
For Windows:
126-
> php spark migrate -g test -n Acme\Blog
132+
.. code-block:: console
133+
134+
php spark migrate -g test -n Acme\Blog
127135
128136
When using the ``--all`` option, it will scan through all namespaces attempting to find any migrations that have
129137
not been run. These will all be collected and then sorted as a group by date created. This should help
@@ -132,9 +140,11 @@ to minimize any potential conflicts between the main application and any modules
132140
rollback
133141
========
134142

135-
Rolls back all migrations, taking the database group to a blank slate, effectively migration 0::
143+
Rolls back all migrations, taking the database group to a blank slate, effectively migration 0:
144+
145+
.. code-block:: console
136146
137-
> php spark migrate:rollback
147+
php spark migrate:rollback
138148
139149
You can use (rollback) with the following options:
140150

@@ -145,9 +155,11 @@ You can use (rollback) with the following options:
145155
refresh
146156
=======
147157

148-
Refreshes the database state by first rolling back all migrations, and then migrating all::
158+
Refreshes the database state by first rolling back all migrations, and then migrating all:
149159

150-
> php spark migrate:refresh
160+
.. code-block:: console
161+
162+
php spark migrate:refresh
151163
152164
You can use (refresh) with the following options:
153165

@@ -159,9 +171,11 @@ You can use (refresh) with the following options:
159171
status
160172
======
161173

162-
Displays a list of all migrations and the date and time they ran, or '--' if they have not been run::
174+
Displays a list of all migrations and the date and time they ran, or '--' if they have not been run:
175+
176+
.. code-block:: console
163177
164-
> php spark migrate:status
178+
php spark migrate:status
165179
166180
...
167181
@@ -184,9 +198,9 @@ Creates a skeleton migration file in **app/Database/Migrations**.
184198
It automatically prepends the current timestamp. The class name it
185199
creates is the Pascal case version of the filename.
186200

187-
::
201+
.. code-block:: console
188202
189-
> php spark make:migration <class> [options]
203+
php spark make:migration <class> [options]
190204
191205
You can use (``make:migration``) with the following options:
192206

0 commit comments

Comments
 (0)