@@ -67,9 +67,9 @@ The tables below list all prerequisites along with the minimum required version
6767
6868If Python is already installed in your machine, run the following commands to validate the versions:
6969
70- ``` shell
71- python -V
72- pip freeze | grep pyperclip
70+ ``` sh
71+ $ python -V
72+ $ pip freeze | grep pyperclip
7373```
7474
7575If your versions are lower than the prerequisite versions, you should update.
@@ -95,7 +95,7 @@ If you do not already have Python installed on your machine, we recommend using
95951 . Open a Terminal / Command Line / Bash Shell in your projects directory (_ i.e.: ` /yourprojectdirectory/ ` _ )
96962 . Clone your fork of cmd2
9797
98- ``` shell
98+ ``` sh
9999$ git clone https://github.com/yourUsername/cmd2.git
100100```
101101
@@ -108,7 +108,7 @@ This will download the entire cmd2 repo to your projects directory.
1081081 . Change directory to the new cmd2 directory (` cd cmd2 ` )
1091092 . Add a remote to the official cmd2 repo:
110110
111- ``` shell
111+ ``` sh
112112$ git remote add upstream https://github.com/python-cmd2/cmd2.git
113113```
114114
@@ -124,29 +124,29 @@ Do this prior to every time you create a branch for a PR:
124124
1251251 . Make sure you are on the ` master ` branch
126126
127- > ``` shell
127+ > ``` sh
128128 > $ git status
129129 > On branch master
130130 > Your branch is up-to-date with ' origin/master' .
131131 > ` ` `
132132
133133 > If your aren' t on `master`, resolve outstanding files / commits and checkout the `master` branch
134134
135- > ```shell
135+ > ```sh
136136 > $ git checkout master
137137 > ```
138138
1391392. Do A Pull with Rebase Against `upstream`
140140
141- > ```shell
141+ > ```sh
142142 > $ git pull --rebase upstream master
143143 > ```
144144
145145 > This will pull down all of the changes to the official master branch, without making an additional commit in your local repo.
146146
1471473. (_Optional_) Force push your updated master branch to your GitHub fork
148148
149- > ```shell
149+ > ```sh
150150 > $ git push origin master --force
151151 > ```
152152
@@ -164,13 +164,13 @@ Name the branch something like `fix/xxx` or `feature/xxx` where `xxx` is a short
164164
165165To create a branch on your local machine (and switch to this branch):
166166
167- ` ` ` shell
167+ ` ` ` sh
168168$ git checkout -b [name_of_your_new_branch]
169169```
170170
171171and to push to GitHub:
172172
173- ``` shell
173+ ``` sh
174174$ git push origin [name_of_your_new_branch]
175175```
176176
@@ -180,12 +180,12 @@ $ git push origin [name_of_your_new_branch]
180180### Setup for cmd2 development
181181For doing cmd2 development, you actually do NOT want to have cmd2 installed as a Python package.
182182So if you have previously installed cmd2, make sure to uninstall it:
183- ``` bash
184- pip uninstall cmd2
183+ ``` sh
184+ $ pip uninstall cmd2
185185```
186186
187187Assuming you cloned the repository to ` ~/src/cmd2 ` :
188- ``` bash
188+ ``` sh
189189$ cd ~ /src/cmd2
190190$ pip install -e .
191191```
@@ -195,7 +195,7 @@ imports `cmd2`, there is no need to re-install the module after every change. Th
195195command will also install all of the runtime dependencies for ` cmd2 ` .
196196
197197Next you should install all the modules used for development of ` cmd2 ` :
198- ``` bash
198+ ``` sh
199199$ cd ~ /src/cmd2
200200$ pip install -e .[dev]
201201```
@@ -208,13 +208,13 @@ learn the specific incantations required for each project you are familiar with.
208208This project uses ` invoke <http://www.pyinvoke.org> ` _ to provide a clean, high
209209level interface for these development tasks. To see the full list of functions
210210available::
211- ``` bash
211+ ``` sh
212212$ invoke -l
213213```
214214
215215You can run multiple tasks in a single invocation, for example::
216- ``` bash
217- $ invoke clean docs sdist wheel
216+ ``` sh
217+ $ invoke docs sdist wheel
218218```
219219
220220That one command will remove all superflous cache, testing, and build
@@ -225,9 +225,9 @@ If you want to see the details about what `invoke` is doing under the hood,
225225have a look at ` tasks.py ` .
226226
227227Now you can check if everything is installed and working:
228- ``` bash
229- cd ~ src/cmd2
230- python examples/example.py
228+ ``` sh
229+ $ cd ~ src/cmd2
230+ $ python examples/example.py
231231```
232232
233233If the example app loads, you should see a prompt that says "(Cmd)". You can
@@ -252,16 +252,16 @@ primarily related to continuous integration and to release deployment.
252252
253253If you made changes to any file in the ` /docs ` directory, you need to build the
254254Sphinx documentation and make sure your changes look good:
255- ``` bash
256- invoke docs
255+ ``` sh
256+ $ invoke docs
257257```
258258In order to see the changes, use your web browser of choice to open ` <cmd2>/docs/_build/html/index.html ` .
259259
260260If you would rather use a webserver to view the documentation, including
261261automatic page refreshes as you edit the files, use:
262262
263- ``` bash
264- invoke livehtml
263+ ``` sh
264+ $ invoke livehtml
265265```
266266
267267You will be shown the IP address and port number where the documents are now
@@ -275,9 +275,9 @@ You should have some sort of [PEP8](https://www.python.org/dev/peps/pep-0008/)-b
275275
276276### Run The Test Suite
277277When you're ready to share your code, run the test suite:
278- ``` shell
279- cd < cmd2>
280- invoke pytest
278+ ``` sh
279+ $ cd < cmd2>
280+ $ invoke pytest
281281```
282282and ensure all tests pass.
283283
@@ -327,7 +327,7 @@ Instance of cmd2](#maintaining-your-fork).
3273271 . Perform the maintenance step of rebasing ` master ` .
3283282 . Ensure you are on the ` master ` branch using ` git status ` :
329329
330- ``` bash
330+ ``` sh
331331$ git status
332332On branch master
333333Your branch is up-to-date with ' origin/master' .
0 commit comments