Skip to content

Commit 3ebd1ce

Browse files
committed
Add help content to the app
1 parent b47e90d commit 3ebd1ce

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

helpfile.txt

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
NAME
2+
psperl
3+
4+
SYNTAX
5+
psperl [-Command]
6+
psperl [-Command <string>]
7+
8+
VERBS
9+
-Available
10+
The `Available` command will grab the list of releases from
11+
Strawberry Perl's JSON file:
12+
http://strawberryperl.com/releases.json
13+
and parse out which releases are available in Portable form
14+
-release types found here:
15+
http://strawberryperl.com/releases.html
16+
-Init
17+
The Init command is usually just added to your $Profile so that psperl
18+
is always in your PowerShell's $env:Path environment variable. From
19+
that point, you could just run any other psperl command.
20+
-Install <string>
21+
Once you've selected which version of Perl you'd like to use
22+
from the list supplied in the `Available` command, you'd just need
23+
to install it.
24+
This command will download the Portable Perl zip file from
25+
Strawberry Perl's site, store it locally, check its checksum,
26+
unzip it, and have it available to use later.
27+
-List
28+
Show a listing of which Perls are currently installed. An asterisk
29+
(*) indicates the version currently in use.
30+
-Setup
31+
Ensure all directories are in place, and that you have $Profile setup
32+
and in place. It will add a few lines to your $Profile to initialize
33+
the application and ensure everything's in your $env:Path correctly.
34+
-Switch <string>
35+
Change your current environment setup to use any version of
36+
Perl already installed. This will be made persistent as we'll
37+
store the current version in our local config directory and
38+
every time you start a PowerShell session, we'll setup your
39+
environment for the selected version of Perl.
40+
You can change which Perl you're using as many times as you'd
41+
like during a session, though you can only use one Perl at a
42+
time.
43+
-Use <string>
44+
Almost exactly the same as the `Switch` command. However, it's not
45+
persistent.
46+
With this command, we just start using a different version of Perl,
47+
but we haven't switched our preference to that one. If the current
48+
preference is Perl v5.28 and it's what is setup to start on
49+
PowerShell sessions, we could temporarily use Perl v5.30 with this
50+
command. If the session's closed and re-opened, it'll be back on
51+
Perl v5.28.
52+
You can change which Perl you're using as many times as you'd
53+
like during a session, though you can only use one Perl at a
54+
time.
55+
-Version
56+
Displays the verson of PSPerl you're currently using.
57+

psperl.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ elseif ($list) {
129129
elseif ($version -or $v) {
130130
Write-Host("This is PSPerl v$($env:PSPERL_VERSION)");
131131
Write-Host("");
132-
Write-Host("Directories of note:")
132+
Write-Host("Directories of note:");
133133
Write-Host("$($env:PSPERL_ROOT)\_config");
134134
Write-Host("$($env:PSPERL_ROOT)\_locals");
135135
Write-Host("$($env:PSPERL_ROOT)\_perls");
@@ -138,6 +138,9 @@ elseif ($version -or $v) {
138138
Write-Host("https://github.com/genio/psperl");
139139
Write-Host("");
140140
}
141+
else {
142+
Get-Content -Path "$($env:PSPERL_ROOT)\helpfile.txt" | Write-Host
143+
}
141144
# To turn on Debugging, $global:DebugPreference = 'Continue'
142145
# To turn off Debugging, $global:DebugPreference = 'SilentlyContinue'
143146

0 commit comments

Comments
 (0)