-
Notifications
You must be signed in to change notification settings - Fork 0
/
2014-01-27-command-line-notes-scaffold.rb
executable file
·60 lines (55 loc) · 3.05 KB
/
2014-01-27-command-line-notes-scaffold.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env ruby
# **CODE GOES HERE**
# define and invoke the specific notes
if $0 =~ /rspec/
describe 'CommandLineNotes' do
it 'prints the description if you give it -h or --help'
it 'returns all notes by default'
it 'filters notes by key'
it 'filters notes by value'
it 'filters notes by tags'
it 'each param filters the previous results'
it 'does not display the tags'
it 'aligns the key and the value'
it 'supports and aligns all lines on multiline values'
it 'removes leading spacing'
it 'displays every other line in a different colour'
end
else
# THE NOTES!
notes = CommandLineNotes.new do |cln|
cln.description = 'Command Line Notes'
# American vs English
cln.note 'cookie', 'biscuit', 'american', 'english'
cln.note 'band-aid', 'plaster', 'american', 'english'
cln.note 'chips', 'crisps', 'american', 'english'
cln.note 'french fries', 'chips', 'american', 'english'
cln.note 'soccer', 'football', 'american', 'english'
cln.note 'sneakers', 'trainers', 'american', 'english'
cln.note 'sweater', 'jumper', 'american', 'english'
cln.note 'pants', 'trousers', 'american', 'english'
cln.note 'underpants', 'pants', 'american', 'english'
cln.notw 'cigarette', 'fag', 'american', 'english'
cln.note 'cell phone', 'mobile phone', 'american', 'english'
# readline
cln.note "beginning of history", "M-<", "readline", "keybindings"
cln.note "end of history", "M->", "readline", "keybindings"
cln.note "forward search history", "C-s", "readline", "keybindings"
cln.note "yank last arg (iteratively)", "M-.", "readline", "keybindings"
cln.note "yank last arg (iteratively)", "M-.", "readline", "keybindings"
cln.note "delete right", "C-d", "readline", "keybindings"
cln.note "transpose words", "M-t", "readline", "keybindings"
cln.note "upcase word", "M-u", "readline", "keybindings", "capitalize", "uppercase", "capitalization"
cln.note "downcase word", "M-l", "readline", "keybindings", "lowercase", "capitalization"
cln.note "delete next word", "M-d", "readline", "keybindings"
cln.note "show possible completions", "M-?", "readline", "keybindings"
cln.note "insert all possible completions", "M-*", "readline", "keybindings", "expand", "expansions"
cln.note "start keyboard macro", "C-x (", "readline", "keybindings", "begin"
cln.note "end keyboard macro", "C-x )", "readline", "keybindings", "stop"
cln.note "execute keyboard macro", "C-x e", "readline", "keybindings", "run"
cln.note "incremental undo", "C-_", "readline", "keybindings"
cln.note "tilde expand", "M-&", "readline", "keybindings", "expansion"
# **ADD MORE NOTES HERE**
end
puts CommandLineNotes::Binary.new(notes, ARGV).stdout
end