Skip to content

Commit d4caff5

Browse files
committed
Apply monospaced font for parameters names and their values
1 parent 03e641c commit d4caff5

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

book/A-git-in-other-environments/sections/powershell.asc

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@ image::images/posh-git.png[PowerShell with Posh-git.]
1515

1616
===== Prerequisites (Windows only)
1717

18-
Before you're able to run PowerShell scripts on your machine, you need to set your local ExecutionPolicy to RemoteSigned (Basically anything except Undefined and Restricted).
19-
If you choose AllSigned instead of RemoteSigned, also local scripts (your own) need to be digitally signed in order to be executed.
20-
With RemoteSigned, only Scripts having the "ZoneIdentifier" set to Internet (were downloaded from the web) need to be signed, others not.
21-
If you're an administrator and want to set it for all Users on that machine, use "-Scope LocalMachine".
22-
If you're a normal user, without administrative rights, you can use "-Scope CurrentUser" to set it only for you.
18+
Before you're able to run PowerShell scripts on your machine, you need to set your local `ExecutionPolicy` to `RemoteSigned` (basically, anything except `Undefined` and `Restricted`).
19+
If you choose `AllSigned` instead of `RemoteSigned`, also local scripts (your own) need to be digitally signed in order to be executed.
20+
With `RemoteSigned`, only scripts having the `ZoneIdentifier` set to `Internet` (were downloaded from the web) need to be signed, others not.
21+
If you're an administrator and want to set it for all users on that machine, use `-Scope LocalMachine`.
22+
If you're a normal user, without administrative rights, you can use `-Scope CurrentUser` to set it only for you.
2323

2424
More about PowerShell Scopes: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_scopes[]
2525

2626
More about PowerShell ExecutionPolicy: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy[]
2727

28+
To set the value of `ExecutionPolicy` to `RemoteSigned` for all users use the next command:
29+
2830
[source,powershell]
2931
----
3032
> Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned -Force
@@ -42,7 +44,7 @@ More information about PowerShell Gallery: https://docs.microsoft.com/en-us/powe
4244
> Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force # Newer beta version with PowerShell Core support
4345
----
4446

45-
If you want to install posh-git for all users, use "-Scope AllUsers" instead and execute the command from an elevated PowerShell console.
47+
If you want to install posh-git for all users, use `-Scope AllUsers` instead and execute the command from an elevated PowerShell console.
4648
If the second command fails with an error like `Module 'PowerShellGet' was not installed by using Install-Module`, you'll need to run another command first:
4749

4850
[source,powershell]
@@ -56,9 +58,9 @@ This happens, because the modules that ship with Windows PowerShell are signed w
5658
===== Update PowerShell Prompt
5759

5860
To include git information in your prompt, the posh-git module needs to be imported.
59-
To have posh-git imported every time PowerShell starts, execute the Add-PoshGitToProfile command which will add the import statement into you $profile script.
61+
To have posh-git imported every time PowerShell starts, execute the `Add-PoshGitToProfile` command which will add the import statement into you `$profile` script.
6062
This script is executed everytime you open a new PowerShell console.
61-
Keep in mind, that there are multiple $profile scripts.
63+
Keep in mind, that there are multiple `$profile` scripts.
6264
E. g. one for the console and a separate one for the ISE.
6365

6466
[source,powershell]
@@ -69,8 +71,8 @@ E. g. one for the console and a separate one for the ISE.
6971

7072
===== From Source
7173

72-
Just download a posh-git release from (https://github.com/dahlbyk/posh-git[]), and uncompress it.
73-
Then import the module using the full path to the posh-git.psd1 file:
74+
Just download a posh-git release from https://github.com/dahlbyk/posh-git/releases[], and uncompress it.
75+
Then import the module using the full path to the `posh-git.psd1` file:
7476

7577
[source,powershell]
7678
----
@@ -79,5 +81,6 @@ Then import the module using the full path to the posh-git.psd1 file:
7981
----
8082

8183
This will add the proper line to your `profile.ps1` file, and posh-git will be active the next time you open PowerShell.
84+
8285
For a description of the Git status summary information displayed in the prompt see: https://github.com/dahlbyk/posh-git/blob/master/README.md#git-status-summary-information[]
8386
For more details on how to customize your posh-git prompt see: https://github.com/dahlbyk/posh-git/blob/master/README.md#customization-variables[]

book/A-git-in-other-environments/sections/zsh.asc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@ This results in a display of the current branch on the right-hand side of the te
3737
(The left side is supported as well, of course; just uncomment the assignment to PROMPT.)
3838
It looks a bit like this:
3939

40-
.Customized `zsh` prompt.
40+
.Customized `zsh` prompt
4141
image::images/zsh-prompt.png[Customized `zsh` prompt.]
4242

43-
For more information on vcs_info, check out its documentation
44-
in the `zshcontrib(1)` manual page,
45-
or online at http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Version-Control-Information[].
43+
For more information on `vcs_info`, check out its documentation in the `zshcontrib(1)` manual page, or online at http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Version-Control-Information[].
4644

47-
Instead of vcs_info, you might prefer the prompt customization script that ships with Git, called `git-prompt.sh`; see https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh[] for details.
45+
Instead of `vcs_info`, you might prefer the prompt customization script that ships with Git, called `git-prompt.sh`; see https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh[] for details.
4846
`git-prompt.sh` is compatible with both Bash and Zsh.
4947

5048
Zsh is powerful enough that there are entire frameworks dedicated to making it better.
@@ -53,5 +51,5 @@ oh-my-zsh's plugin system comes with powerful git tab-completion, and it has a v
5351
<<oh_my_zsh_git>> is just one example of what can be done with this system.
5452

5553
[[oh_my_zsh_git]]
56-
.An example of an oh-my-zsh theme.
54+
.An example of an oh-my-zsh theme
5755
image::images/zsh-oh-my.png[An example of an oh-my-zsh theme.]

0 commit comments

Comments
 (0)