mysh 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/mysh/internal/actions/help/history.txt +11 -7
- data/lib/mysh/internal/actions/history.rb +6 -5
- data/lib/mysh/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38cf3bacc20c417b5df8adfc3e4a7786944f0624
|
4
|
+
data.tar.gz: 5d7753ad9b621ae820fb742f8442cac9c9c4ad76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b6812bfbcc46d549be723bb0f2cf1e76f879ed2943a689df40e14b284b9c6edaa98192d38b1d860a63651f394a1b83c1ca01bdd36f0b31adfde7f2e75d86b8f
|
7
|
+
data.tar.gz: 9af474a69894cf5a75e26234f07877a582b5041c2ac41130ac0595df813e99f4a17e74619f533030b4a52788f2af77e9294bd7f1823352e2e105880363574229
|
data/README.md
CHANGED
@@ -334,11 +334,12 @@ command is controlled by an optional parameter.
|
|
334
334
|
If the longer form, show is used, a space is required before the parameter. If
|
335
335
|
the quick form, ! is used, the space is optional.
|
336
336
|
|
337
|
-
Quick
|
337
|
+
Quick Form | Long Form | Command Description
|
338
338
|
-----------|--------------|--------------------------------
|
339
339
|
! | history | Display the entire history buffer.
|
340
340
|
!5 | history 5 | Retrieve history entry 5 and present this to the user as the next command.
|
341
341
|
!clear | history clear| Clear the command history.
|
342
|
+
!pattern | history pattern | Display the part history buffer containing the specified regular expression pattern. Note: The pattern cannot be the word "clear", use "clea[r]" instead.
|
342
343
|
|
343
344
|
### Shell Variables
|
344
345
|
|
@@ -7,13 +7,17 @@ command is controlled by an optional parameter.
|
|
7
7
|
If the longer form, show is used, a space is required before the parameter. If
|
8
8
|
the quick form, ! is used, the space is optional.
|
9
9
|
|
10
|
-
Quick
|
11
|
-
Form
|
12
|
-
=====
|
13
|
-
!
|
10
|
+
Quick Long Command
|
11
|
+
Form Form Description
|
12
|
+
===== ======= ===========
|
13
|
+
! history Display the entire history buffer.
|
14
14
|
|
15
|
-
!
|
16
|
-
|
15
|
+
!index history index Retrieve history entry number index and present this
|
16
|
+
to the user as the next command.
|
17
17
|
|
18
|
-
!clear
|
18
|
+
!clear history clear Clear the command history.
|
19
|
+
|
20
|
+
!pattern history pattern Display the part of the history buffer containing the
|
21
|
+
regex pattern. Note: This pattern cannot be 'clear'
|
22
|
+
so use 'clea[r]' instead.
|
19
23
|
|
@@ -46,18 +46,19 @@ module Mysh
|
|
46
46
|
|
47
47
|
#Just show the history.
|
48
48
|
def show_history
|
49
|
+
pattern = Regexp.new(@args[0] || /./)
|
50
|
+
|
49
51
|
@history.each_with_index do |item, index|
|
50
|
-
puts "#{index+1}: #{item}"
|
52
|
+
puts "#{index+1}: #{item}" if item =~ pattern
|
51
53
|
end
|
52
54
|
end
|
53
55
|
|
54
56
|
end
|
55
57
|
|
56
58
|
#Add the history commands to the library.
|
57
|
-
desc = 'Display the mysh command history
|
58
|
-
|
59
|
-
COMMANDS.add_action(HistoryCommand.new('history <index>', desc))
|
59
|
+
desc = 'Display the mysh command history. See ?! for more info.'
|
60
|
+
COMMANDS.add_action(HistoryCommand.new('history <arg>', desc))
|
60
61
|
#The history command action object.
|
61
|
-
HISTORY_COMMAND = HistoryCommand.new('!<
|
62
|
+
HISTORY_COMMAND = HistoryCommand.new('!<arg>', desc)
|
62
63
|
COMMANDS.add_action(HISTORY_COMMAND)
|
63
64
|
end
|
data/lib/mysh/version.rb
CHANGED
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.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Camilleri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|