mysh 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +71 -3
- data/lib/mysh/internal/actions/help/init.txt +7 -7
- data/lib/mysh/internal/actions/help/vars.txt +1 -0
- data/lib/mysh/internal/actions/show/env.rb +4 -4
- data/lib/mysh/internal/to_file_spec.rb +1 -1
- data/lib/mysh/version.rb +1 -1
- data/mysh.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db73fad7b11e3e399b5fce1390213a5e5aba485f
|
4
|
+
data.tar.gz: 38dff27207d3d2bb068f126c67fadd6e36caa653
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 655af01e192a8a526bcd14d6237a9c63890f3c19a3eda6f13ca3cbc0bb312bb0249e34d39eebbd16211455865dde162d79372d23ffe4a440ae4e68bb9ecd2e4c
|
7
|
+
data.tar.gz: af77111bf507908117c3c800d8d76893bc67d9781acc41cda1e8ffca50fd0386916d30e8d20ada80c0bf2e4ec2fefabc6780b3e6ca87b2c860c6bbff5c193081
|
data/README.md
CHANGED
@@ -45,6 +45,72 @@ Or install it yourself as:
|
|
45
45
|
|
46
46
|
$ gem install mysh
|
47
47
|
|
48
|
+
|
49
|
+
#### Advanced Options
|
50
|
+
|
51
|
+
As a gem, when mysh is installed, the mysh file in the bin directory gets
|
52
|
+
"hooked in" to the system as an executable file. In Mac/Linux systems this is
|
53
|
+
done natively. In Windows systems this is done via an intermediary mysh.bat
|
54
|
+
file. This works, but leaves a great deal to be desired especially in its
|
55
|
+
handling of signals like control-C. Since Windows users are treated as hated
|
56
|
+
step-sisters, here are two alternative options to using mysh as your shell
|
57
|
+
once the Ruby language and the mysh gem have been installed.
|
58
|
+
|
59
|
+
---
|
60
|
+
|
61
|
+
**Option 1 - Against a standard Ruby install**
|
62
|
+
|
63
|
+
This option applies if Ruby is installed so that it is generally available in
|
64
|
+
any command window. You can test this by opening a regular command line window
|
65
|
+
and typing:
|
66
|
+
|
67
|
+
ruby -v
|
68
|
+
|
69
|
+
You should see the ruby's version info. If instead you see:
|
70
|
+
|
71
|
+
C:\Users\Hilda>ruby -v
|
72
|
+
'ruby' is not recognized as an internal or external command,
|
73
|
+
operable program or batch file.
|
74
|
+
|
75
|
+
Then there are either installation issues with Ruby or you need to see option 2.
|
76
|
+
|
77
|
+
Once Ruby operation is confirmed, all that is needed is to get a copy of the
|
78
|
+
Command Window Icon and update the target field in its properties as:
|
79
|
+
|
80
|
+
OLD
|
81
|
+
|
82
|
+
%windir%\system32\cmd.exe
|
83
|
+
|
84
|
+
NEW
|
85
|
+
|
86
|
+
%windir%\system32\cmd.exe /C ruby -e"require %q{mysh}; Mysh.run"
|
87
|
+
|
88
|
+
---
|
89
|
+
|
90
|
+
**Option 2 - Against a RailsInstaller install**
|
91
|
+
|
92
|
+
With RailsInstaller (RI) things are a teensy bit more involved. RI creates a
|
93
|
+
special Command Prompt with Ruby and Rails icon. To start you need to make a
|
94
|
+
copy of that icon. Then the target field in properties needs to be updated:
|
95
|
+
|
96
|
+
OLD
|
97
|
+
|
98
|
+
C:\Windows\System32\cmd.exe /E:ON /K C:\RailsInstaller\Ruby2.3.3\setup_environment.bat C:\RailsInstaller
|
99
|
+
|
100
|
+
NEW
|
101
|
+
|
102
|
+
C:\Windows\System32\cmd.exe /E:ON /C C:\RailsInstaller\Ruby2.3.3\setup_environment.bat C:\RailsInstaller & ruby -e"require %q{mysh}; Mysh.run"
|
103
|
+
|
104
|
+
Note: The change from /K to /C.
|
105
|
+
|
106
|
+
---
|
107
|
+
|
108
|
+
**Also** For both options, renaming the icon to something like
|
109
|
+
"Mysh with Ruby and Rails" or some such is also a good idea. Then make sure you
|
110
|
+
place your icon where you can find it. I pinned mine to the Windows Task Bar.
|
111
|
+
|
112
|
+
---
|
113
|
+
|
48
114
|
## Usage
|
49
115
|
|
50
116
|
The mysh gem includes a simple executable called mysh. The template for running
|
@@ -370,6 +436,7 @@ $d | The current date.
|
|
370
436
|
$date_fmt | The format for the date: "%Y-%m-%d"
|
371
437
|
$debug | Does the shell display additional debugging info (true/false)
|
372
438
|
$h | The home folder's path
|
439
|
+
$name | The name given to this mysh session.
|
373
440
|
$post_prompt| The prompt used when a line is continued with a trailing \\ character. By default this is the same as the normal prompt.
|
374
441
|
$pre_prompt | A prompt string displayed before the actual command prompt. Delete the pre_prompt variable to disable pre-prompting.
|
375
442
|
$prompt | The user prompt.
|
@@ -387,7 +454,7 @@ in the Mysh ini file.
|
|
387
454
|
|
388
455
|
set $prompt = {{ cmd_cter||=0; cmd_cter+=1 }} mysh>
|
389
456
|
|
390
|
-
And the command line will
|
457
|
+
And the command line will look like:
|
391
458
|
|
392
459
|
1 mysh>ls
|
393
460
|
CODE_OF_CONDUCT.md LICENSE.txt lib rakefile.rb tests
|
@@ -838,7 +905,8 @@ All participation is welcomed. There are two fabulous plans to choose from:
|
|
838
905
|
#### Plan B
|
839
906
|
|
840
907
|
Go to the GitHub repository at (https://github.com/PeterCamilleri/mysh) and
|
841
|
-
raise an issue
|
842
|
-
|
908
|
+
raise an [issue](https://github.com/PeterCamilleri/mysh/issues)
|
909
|
+
calling attention to some aspect that could use some TLC or a suggestion or an
|
910
|
+
idea or a comment.
|
843
911
|
|
844
912
|
This is a low pressure environment. All are welcome!
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Help: mysh initialization summary:
|
2
2
|
|
3
|
-
When mysh starts up, it must be initialized and acclimated to its environment.
|
4
|
-
The boot/initialization process of mysh is somewhat modeled after that of the
|
3
|
+
When mysh starts up, it must be initialized and acclimated to its environment.
|
4
|
+
The boot/initialization process of mysh is somewhat modeled after that of the
|
5
5
|
famous bash shell. On startup:
|
6
6
|
|
7
7
|
1 Option values are initialized to their initial, default values.
|
@@ -13,18 +13,18 @@ famous bash shell. On startup:
|
|
13
13
|
3 Try to load and execute the mysh_init file. There are three possible files
|
14
14
|
for this role. In priority order they are
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
$$h/mysh_init.mysh,
|
17
|
+
$$h/mysh_init.rb,
|
18
|
+
$$h/mysh_init.txt.
|
19
19
|
|
20
20
|
NOTE: If an init file is specified with the --init option, or disabled with
|
21
21
|
the --no-init option, then this step is skipped.
|
22
22
|
|
23
|
-
4 The rest of the command line options are processed at this time.
|
23
|
+
4 The rest of the command line options are processed at this time.
|
24
24
|
|
25
25
|
It should be noted that in the event of a conflict in settings during the boot
|
26
26
|
process, the last command/option encountered shall prevail. For example if
|
27
|
-
the
|
27
|
+
the $$h/mysh_init.mysh contains the line:
|
28
28
|
|
29
29
|
\$debug = true
|
30
30
|
|
@@ -22,6 +22,7 @@ $$d The current date.
|
|
22
22
|
$$date_fmt The format for the date: "%Y-%m-%d". ie: 2017-01-09
|
23
23
|
$$debug Does the shell display additional debugging info (true/false)
|
24
24
|
$$h The home folder's path
|
25
|
+
$$name The name given to this mysh session.
|
25
26
|
$$post_prompt The prompt used when a line is continued with a trailing \\
|
26
27
|
character.
|
27
28
|
$$pre_prompt A prompt string displayed before the actual command prompt.
|
@@ -24,13 +24,13 @@ module Mysh
|
|
24
24
|
["init file", $mysh_init_file.to_host_spec],
|
25
25
|
["user", ENV['USER']],
|
26
26
|
["home", (ENV['HOME'] || "").to_host_spec],
|
27
|
-
["name", $PROGRAM_NAME.to_host_spec],
|
27
|
+
["name", (t = MNV[:name]).empty? ? $PROGRAM_NAME.to_host_spec : t],
|
28
28
|
["os shell", (ENV['SHELL'] || ENV['ComSpec'] || "").to_host_spec],
|
29
29
|
["host", ENV['HOSTNAME'] || ENV['COMPUTERNAME']],
|
30
30
|
["os", ENV['OS']],
|
31
|
-
["platform",
|
32
|
-
["java?",
|
33
|
-
["code page", if
|
31
|
+
["platform", MiniTerm::TERM_PLATFORM],
|
32
|
+
["java?", MiniTerm.java? ? true : false],
|
33
|
+
["code page", if MiniTerm.windows?; (`chcp`); end],
|
34
34
|
["term", ENV['TERM']],
|
35
35
|
["disp", ENV['DISPLAY']],
|
36
36
|
["edit", ENV['EDITOR']],
|
data/lib/mysh/version.rb
CHANGED
data/mysh.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency 'rdoc', "~> 5.0"
|
31
31
|
spec.add_development_dependency 'reek', "~> 5.0.2"
|
32
32
|
|
33
|
-
spec.add_runtime_dependency 'mini_readline', "~> 0.
|
33
|
+
spec.add_runtime_dependency 'mini_readline', "~> 0.9.0"
|
34
34
|
spec.add_runtime_dependency 'vls', "~> 0.4.1"
|
35
35
|
spec.add_runtime_dependency 'in_array', "~> 0.1.8"
|
36
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mysh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Camilleri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.9.0
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.9.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: vls
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|