nesta 0.9.13 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/{spec/spec.opts → .rspec} +0 -0
- data/.travis.yml +3 -2
- data/CHANGES +130 -1
- data/Gemfile +1 -8
- data/Gemfile.lock +68 -51
- data/LICENSE +1 -1
- data/README.md +38 -6
- data/Rakefile +2 -5
- data/bin/nesta +59 -3
- data/config.ru +3 -0
- data/lib/nesta.rb +1 -1
- data/lib/nesta/app.rb +20 -17
- data/lib/nesta/commands.rb +6 -3
- data/lib/nesta/config.rb +52 -15
- data/lib/nesta/helpers.rb +30 -3
- data/lib/nesta/models.rb +48 -30
- data/lib/nesta/navigation.rb +32 -12
- data/lib/nesta/overrides.rb +5 -5
- data/lib/nesta/version.rb +1 -1
- data/nesta.gemspec +9 -10
- data/smoke-test.sh +102 -0
- data/spec/atom_spec.rb +52 -49
- data/spec/commands_spec.rb +22 -16
- data/spec/config_spec.rb +66 -6
- data/spec/fixtures/nesta-plugin-test/lib/nesta-plugin-test/init.rb +1 -3
- data/spec/model_factory.rb +16 -16
- data/spec/models_spec.rb +197 -144
- data/spec/overrides_spec.rb +21 -21
- data/spec/page_spec.rb +182 -136
- data/spec/sitemap_spec.rb +48 -43
- data/spec/spec_helper.rb +32 -17
- data/templates/Gemfile +5 -2
- data/templates/config/config.yml +13 -13
- data/templates/config/deploy.rb +2 -2
- data/templates/index.haml +2 -0
- data/templates/themes/app.rb +1 -1
- data/templates/themes/views/layout.haml +7 -0
- data/templates/themes/views/master.sass +3 -0
- data/templates/themes/views/page.haml +1 -0
- data/views/atom.haml +3 -3
- data/views/comments.haml +1 -1
- data/views/error.haml +1 -1
- data/views/feed.haml +1 -1
- data/views/layout.haml +6 -3
- data/views/master.sass +143 -133
- data/views/mixins.sass +53 -28
- data/views/normalize.scss +396 -0
- data/views/page_meta.haml +2 -2
- data/views/sitemap.haml +2 -2
- data/views/summaries.haml +2 -2
- metadata +155 -202
- data/lib/nesta/cache.rb +0 -138
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 904b608182032947bdcad754a909a9b49e1f4be7
|
4
|
+
data.tar.gz: 3759e6ccd241eac679f762209f4987746511596c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f36f814b284024e1d99bf37abf6cf37444db418d2c67cb980cbf8a80cb654ab36f5c1851e8a38d14e5de6cc7eeb70f3ed3c5201dab618071f0f0546522e5e217
|
7
|
+
data.tar.gz: e25c5f1dead47715cff47cb2458e7f9df44a0a87f682733fa475bd016ad1b5a7d9af9856564c8c2061394759eeed5ea92966e163fac8a83ec32f8093645136e7
|
data/{spec/spec.opts → .rspec}
RENAMED
File without changes
|
data/.travis.yml
CHANGED
data/CHANGES
CHANGED
@@ -1,4 +1,128 @@
|
|
1
|
-
= 0.
|
1
|
+
= 0.10.0 / (25 April 2014)
|
2
|
+
|
3
|
+
* Upgraded the default theme to a responsive design, using Google's
|
4
|
+
Roboto Slab web font. (Graham Ashton)
|
5
|
+
|
6
|
+
* Reduced the amount of I/O required to load a page with some judicious
|
7
|
+
in memory caching of filenames. Expect a speed boost! (Graham Ashton)
|
8
|
+
|
9
|
+
* Added 'Link text' metadata. When working out how to link to your
|
10
|
+
pages from the automatically generated menus and breadcrumbs, Nesta
|
11
|
+
uses the page's heading. It still does, but if you want to use
|
12
|
+
different words when linking to the page in breadcrumbs or in the
|
13
|
+
menu you can by defining the "Link text" metadata. (Micah Chalmer)
|
14
|
+
|
15
|
+
NOTE: Some existing sites may have pages that don't define a heading.
|
16
|
+
Those sites will not work with Nesta 0.10.0 until they've been
|
17
|
+
upgraded; either add an h1 level heading at the top of your pages
|
18
|
+
(preferred) or define the 'Link text' metadata. If you don't want
|
19
|
+
h1 headings to appear at the top of your web pages, hide them with
|
20
|
+
CSS (this is the best approach for accessibility), or define the
|
21
|
+
"Link text" metadata.
|
22
|
+
|
23
|
+
* The text used in the 'Read more' link is now configurable in config.yml.
|
24
|
+
The config key is called `read_more`. (Pete Gadomski)
|
25
|
+
|
26
|
+
See the config.yml template (on GitHub) for more details.
|
27
|
+
https://github.com/gma/nesta/blob/master/templates/config/config.yml
|
28
|
+
|
29
|
+
* Added the skip-sitemap flag, to prevent a page from being listed in
|
30
|
+
the XML sitemap. Add 'Flags: skip-sitemap' to the top of your page to
|
31
|
+
enable it. Draft pages have also been removed from the sitemap.
|
32
|
+
(Suggested by Joshua Mervine, implemented by Graham Ashton)
|
33
|
+
|
34
|
+
* Added support for user-defined config settings in config.yml.
|
35
|
+
If you've ever wanted to add config settings to config.yml and then
|
36
|
+
access them from within your app.rb file or templates, this is for
|
37
|
+
you.
|
38
|
+
|
39
|
+
There's a new `Nesta::Config.fetch` method for reading these
|
40
|
+
settings. It can also read settings from the environment, looking for
|
41
|
+
variables whose names are prefixed with "NESTA_". For example, the
|
42
|
+
value in the `NESTA_MY_SETTING` variable can be returned by
|
43
|
+
calling `Nesta::Config.fetch(:my_setting)`.
|
44
|
+
|
45
|
+
If the setting you're trying to read isn't defined a NotDefined
|
46
|
+
exception (a subclass of KeyError) will be raised. Similarly to
|
47
|
+
Ruby's Hash#fetch method, you can avoid the exception by specifying a
|
48
|
+
second argument (such as nil) that will be returned if the setting
|
49
|
+
isn't defined.
|
50
|
+
|
51
|
+
(Sean Redmond, Graham Ashton)
|
52
|
+
|
53
|
+
* The built-in file caching (where Nesta could write generated HTML for
|
54
|
+
rendered pages to disk) has been removed. If you'd like to cache
|
55
|
+
pages to disk, use the sinatra-cache gem.
|
56
|
+
|
57
|
+
See http://nestacms.com/docs/deployment/page-caching for more
|
58
|
+
details, and instructions for installing and testing sintra-cache.
|
59
|
+
|
60
|
+
(Graham Ashton)
|
61
|
+
|
62
|
+
* The nesta script's theme:create command now copies default templates
|
63
|
+
into a new theme. (Jake Rayson)
|
64
|
+
|
65
|
+
* Added the --zsh-completion option to the nesta command, which outputs
|
66
|
+
code that will configure command line completion in Zsh for the nesta
|
67
|
+
command. (Wynn Netherland)
|
68
|
+
|
69
|
+
* Page titles no longer include the heading from the parent page.
|
70
|
+
Behaviour was a little inconsistent, and it's arguably not a great
|
71
|
+
feature in the first place. Since the Title metadata appeared you can
|
72
|
+
ovverride the page title to something more useful if you need to too.
|
73
|
+
(Graham Ashton)
|
74
|
+
|
75
|
+
* When commenting via Disqus is configured, comments appeared on every
|
76
|
+
page in earlier versions of Nesta. From now on only pages with a date
|
77
|
+
set (i.e. articles) will display the comment form by default. If
|
78
|
+
you've copied the comments.haml template into your ./views folder (or
|
79
|
+
into a theme) you'll need to modify it slightly. See the `if`
|
80
|
+
statement in the latest version.
|
81
|
+
|
82
|
+
If you'd actually like comments to appear on every page of your site,
|
83
|
+
redefine the Page#receives_comments? method in your app.rb file, so
|
84
|
+
that it returns `true`.
|
85
|
+
|
86
|
+
(Graham Ashton)
|
87
|
+
|
88
|
+
* Breadcrumbs include Microdata for use by search engines. See:
|
89
|
+
http://support.google.com/webmasters/bin/answer.py?hl=en&answer=185417
|
90
|
+
(Sean Schofield)
|
91
|
+
|
92
|
+
* The menu and breadcrumb helper methods can now generate HTML that
|
93
|
+
identifies the current page. When viewing a page that appears in the
|
94
|
+
menu, its menu item will have the class "current". To change the name
|
95
|
+
of the class, override the Nesta::Navigation::current_menu_item_class
|
96
|
+
method.
|
97
|
+
|
98
|
+
The current page doesn't have a class applied by default. If you want
|
99
|
+
to add a class to style it, override the ::current_breadcrumb_class
|
100
|
+
method (also in the Nesta::Navigation module), returning a string.
|
101
|
+
|
102
|
+
(Pete Gadomski)
|
103
|
+
|
104
|
+
* Version 0.9.13 used Sinatra's `url` helper method to generate links
|
105
|
+
to pages on the site. When these pages were cached by proxy servers
|
106
|
+
the hostname in the URL could be set incorrectly, as it would be
|
107
|
+
determined from the HTTP headers (see issue #103 for more details).
|
108
|
+
|
109
|
+
The solution was to link to pages on the current site using an
|
110
|
+
absolute path, rather than a full URL. The `path_to` helper was added,
|
111
|
+
and used in place of Sinatra's `url` helper method.
|
112
|
+
|
113
|
+
(Micah Chalmer)
|
114
|
+
|
115
|
+
* Updated the test suite from RSpec 1.3 to RSpec 2.
|
116
|
+
(Wynn Netherland, Graham Ashton)
|
117
|
+
|
118
|
+
* Support for Ruby 1.8 has been dropped. Ruby 1.9.3 or above is
|
119
|
+
recommended.
|
120
|
+
|
121
|
+
* There were also plenty of small bug fixes that didn't make it into
|
122
|
+
this list. See GitHub for the full list of commits.
|
123
|
+
https://github.com/gma/nesta/compare/v0.9.13...v0.10.0
|
124
|
+
|
125
|
+
= 0.9.13 / (3 March 2012)
|
2
126
|
|
3
127
|
* The nesta script has a new command; edit. You can pass it the path
|
4
128
|
to a file within your content/pages folder and it will open the file
|
@@ -28,6 +152,11 @@
|
|
28
152
|
* The Page class has a new method; body_markup. It can be overridden by
|
29
153
|
a plugin, and is used by the foldable plugin. (Micah Chalmer)
|
30
154
|
|
155
|
+
* The `current_item?` helper has been created in `Nesta::Navigation`.
|
156
|
+
You can override it to implement your own logic for determining
|
157
|
+
whether or not a menu item rendered by the menu helpers are
|
158
|
+
considered to be "current". (Chad Ostrowski)
|
159
|
+
|
31
160
|
* The FileModel class has a new method; parse_metadata. It can be
|
32
161
|
overriden by plugins that implement an alternate metadata syntax.
|
33
162
|
Used by the yaml-metadata plugin.
|
data/Gemfile
CHANGED
@@ -3,11 +3,4 @@ source 'http://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in nesta.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
|
7
|
-
gem 'guard-ctags-bundler'
|
8
|
-
gem 'guard-livereload'
|
9
|
-
gem 'rb-readline'
|
10
|
-
gem 'ZenTest'
|
11
|
-
end
|
12
|
-
|
13
|
-
# gem (RUBY_VERSION =~ /^1.9/) ? 'ruby-debug19': 'ruby-debug'
|
6
|
+
gem 'debugger'
|
data/Gemfile.lock
CHANGED
@@ -1,73 +1,90 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nesta (0.
|
4
|
+
nesta (0.10.0)
|
5
5
|
RedCloth (~> 4.2)
|
6
|
-
haml (
|
7
|
-
rack (
|
8
|
-
rdiscount (~> 1
|
9
|
-
sass (
|
10
|
-
|
11
|
-
sinatra (~> 1.3)
|
6
|
+
haml (>= 3.1)
|
7
|
+
rack (>= 1.3)
|
8
|
+
rdiscount (~> 2.1)
|
9
|
+
sass (>= 3.1)
|
10
|
+
sinatra (~> 1.4)
|
12
11
|
|
13
12
|
GEM
|
14
13
|
remote: http://rubygems.org/
|
15
14
|
specs:
|
16
15
|
RedCloth (4.2.9)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
16
|
+
columnize (0.8.9)
|
17
|
+
debugger (1.6.6)
|
18
|
+
columnize (>= 0.3.1)
|
19
|
+
debugger-linecache (~> 1.2.0)
|
20
|
+
debugger-ruby_core_source (~> 1.3.2)
|
21
|
+
debugger-linecache (1.2.0)
|
22
|
+
debugger-ruby_core_source (1.3.2)
|
23
|
+
diff-lcs (1.2.5)
|
24
|
+
ffi (1.9.3)
|
25
|
+
haml (4.0.5)
|
26
|
+
tilt
|
27
|
+
hoe (3.12.0)
|
28
|
+
rake (>= 0.8, < 11.0)
|
29
|
+
kgio (2.9.2)
|
30
|
+
listen (1.3.1)
|
31
|
+
rb-fsevent (>= 0.9.3)
|
32
|
+
rb-inotify (>= 0.9)
|
33
|
+
rb-kqueue (>= 0.2)
|
34
|
+
mini_portile (0.5.3)
|
35
|
+
mr-sparkle (0.3.0)
|
36
|
+
listen (~> 1.0)
|
37
|
+
rb-fsevent (>= 0.9)
|
38
|
+
rb-inotify (>= 0.8)
|
39
|
+
unicorn (>= 4.5)
|
40
|
+
nokogiri (1.6.1)
|
41
|
+
mini_portile (~> 0.5.0)
|
42
|
+
rack (1.5.2)
|
43
|
+
rack-protection (1.5.3)
|
40
44
|
rack
|
41
45
|
rack-test (0.6.1)
|
42
46
|
rack (>= 1.0)
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
47
|
+
raindrops (0.13.0)
|
48
|
+
rake (10.3.1)
|
49
|
+
rb-fsevent (0.9.4)
|
50
|
+
rb-inotify (0.9.3)
|
51
|
+
ffi (>= 0.5.0)
|
52
|
+
rb-kqueue (0.2.2)
|
53
|
+
ffi (>= 0.5.0)
|
54
|
+
rdiscount (2.1.7.1)
|
55
|
+
rspec (2.14.1)
|
56
|
+
rspec-core (~> 2.14.0)
|
57
|
+
rspec-expectations (~> 2.14.0)
|
58
|
+
rspec-mocks (~> 2.14.0)
|
59
|
+
rspec-core (2.14.8)
|
60
|
+
rspec-expectations (2.14.5)
|
61
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
62
|
+
rspec-mocks (2.14.6)
|
63
|
+
sass (3.3.5)
|
64
|
+
sinatra (1.4.5)
|
65
|
+
rack (~> 1.4)
|
66
|
+
rack-protection (~> 1.4)
|
67
|
+
tilt (~> 1.3, >= 1.3.4)
|
55
68
|
test-unit (1.2.3)
|
56
69
|
hoe (>= 1.5.1)
|
57
|
-
|
58
|
-
|
70
|
+
tilt (1.4.1)
|
71
|
+
unicorn (4.8.2)
|
72
|
+
kgio (~> 2.6)
|
73
|
+
rack
|
74
|
+
raindrops (~> 0.7)
|
75
|
+
webrat (0.7.3)
|
76
|
+
nokogiri (>= 1.2.0)
|
77
|
+
rack (>= 1.0)
|
78
|
+
rack-test (>= 0.5.3)
|
59
79
|
|
60
80
|
PLATFORMS
|
61
81
|
ruby
|
62
82
|
|
63
83
|
DEPENDENCIES
|
64
|
-
|
65
|
-
|
66
|
-
guard-livereload
|
67
|
-
hpricot (= 0.8.4)
|
84
|
+
debugger
|
85
|
+
mr-sparkle (>= 0.0.2)
|
68
86
|
nesta!
|
69
87
|
rack-test (= 0.6.1)
|
70
|
-
|
71
|
-
rspec (= 1.3.0)
|
72
|
-
rspec_hpricot_matchers (= 1.0)
|
88
|
+
rspec (~> 2.14.0)
|
73
89
|
test-unit (= 1.2.3)
|
90
|
+
webrat (~> 0.7.3)
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -31,12 +31,44 @@ You'll find basic configuration options for your site in
|
|
31
31
|
before you go very far.
|
32
32
|
|
33
33
|
That's it - you can launch a local web server in development mode using
|
34
|
-
|
34
|
+
mr-sparkle...
|
35
35
|
|
36
|
-
$ bundle exec
|
36
|
+
$ bundle exec mr-sparkle config.ru
|
37
37
|
|
38
|
-
...then point your web browser at http://localhost:
|
39
|
-
the files in `content/pages` (see the [
|
40
|
-
|
38
|
+
...then point your web browser at http://localhost:8080. Start editing
|
39
|
+
the files in `content/pages` (see the [docs on writing content][] for
|
40
|
+
full instructions).
|
41
41
|
|
42
|
-
[content]: http://nestacms.com/docs/creating-content
|
42
|
+
[docs on writing content]: http://nestacms.com/docs/creating-content
|
43
|
+
|
44
|
+
## Support
|
45
|
+
|
46
|
+
There's plenty of information on <http://nestacms.com>. If you need some
|
47
|
+
help with anything just jump on the [mailing list][] and ask.
|
48
|
+
|
49
|
+
[mailing list]: http://nestacms.com/support
|
50
|
+
|
51
|
+
If you like Nesta you can keep up with developments by following [@nestacms][]
|
52
|
+
on Twitter, and on [the blog][].
|
53
|
+
|
54
|
+
[@nestacms]: http://twitter.com/nestacms
|
55
|
+
[the blog]: http://nestacms.com/blog
|
56
|
+
|
57
|
+
## Contributing
|
58
|
+
|
59
|
+
If you want to add a new feature, I recommend that you post a quick
|
60
|
+
message to the [mailing list][] before you start coding. I'm likely to
|
61
|
+
suggest that we implement it as a [plugin][] (to keep Nesta itself lean
|
62
|
+
and simple), so you might save yourself some time if we chat about a
|
63
|
+
good approach before you start.
|
64
|
+
|
65
|
+
[plugin]: http://nestacms.com/docs/plugins
|
66
|
+
|
67
|
+
If you think you've found a bug, please bring that up on the [mailing
|
68
|
+
list][] too, rather than creating an issue on GitHub straight away.
|
69
|
+
You'll probably get a faster response on the mailing list, as I'm the
|
70
|
+
only person who'll see your new issue.
|
71
|
+
|
72
|
+
-- Graham ([@grahamashton][] on Twitter).
|
73
|
+
|
74
|
+
[@grahamashton]: http://twitter.com/grahamashton
|
data/Rakefile
CHANGED
@@ -3,12 +3,9 @@ require "bundler/setup"
|
|
3
3
|
|
4
4
|
Bundler.require(:default, :test)
|
5
5
|
|
6
|
-
require "spec/rake/spectask"
|
7
6
|
Bundler::GemHelper.install_tasks
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
t.spec_files = FileList["spec/*_spec.rb"]
|
12
|
-
end
|
8
|
+
require 'rspec/core/rake_task'
|
9
|
+
RSpec::Core::RakeTask.new(:spec)
|
13
10
|
|
14
11
|
task :default => :spec
|
data/bin/nesta
CHANGED
@@ -14,6 +14,7 @@ GLOBAL OPTIONS
|
|
14
14
|
--help, -h Display this message.
|
15
15
|
--version, -v Display version number.
|
16
16
|
--bash-completion Output command completion setup for Bash.
|
17
|
+
--zsh-completion Output command completion setup for Zsh.
|
17
18
|
|
18
19
|
COMMANDS
|
19
20
|
new <path> Create a new Nesta project.
|
@@ -43,17 +44,20 @@ EOF
|
|
43
44
|
['--git', GetoptLong::NO_ARGUMENT],
|
44
45
|
['--help', '-h', GetoptLong::NO_ARGUMENT],
|
45
46
|
['--version', '-v', GetoptLong::NO_ARGUMENT],
|
46
|
-
['--vlad', GetoptLong::NO_ARGUMENT]
|
47
|
+
['--vlad', GetoptLong::NO_ARGUMENT],
|
48
|
+
['--zsh-completion', GetoptLong::NO_ARGUMENT]
|
47
49
|
)
|
48
50
|
options = {}
|
49
51
|
opts.each do |opt, arg|
|
50
|
-
case opt
|
52
|
+
case opt
|
51
53
|
when '--bash-completion'
|
52
54
|
bash_completion
|
53
55
|
when '--help'
|
54
56
|
usage(exitcode=0)
|
55
57
|
when '--version'
|
56
58
|
version
|
59
|
+
when '--zsh-completion'
|
60
|
+
zsh_completion
|
57
61
|
else
|
58
62
|
options[opt.sub(/^--/, '')] = arg
|
59
63
|
end
|
@@ -104,7 +108,7 @@ EOF
|
|
104
108
|
# Install it with these commands:
|
105
109
|
#
|
106
110
|
# $ nesta --bash-completion > ~/.nesta-completion.sh
|
107
|
-
# $ echo '[ -f ~/.nesta-completion.sh ] && source ~/.nesta-completion.sh' \
|
111
|
+
# $ echo '[ -f ~/.nesta-completion.sh ] && source ~/.nesta-completion.sh' \
|
108
112
|
# >> ~/.bash_profile
|
109
113
|
# $ source ~/.nesta-completion.sh
|
110
114
|
|
@@ -141,6 +145,58 @@ complete -F _nesta nesta
|
|
141
145
|
EOF
|
142
146
|
exit 0
|
143
147
|
end
|
148
|
+
|
149
|
+
def self.zsh_completion
|
150
|
+
puts <<-EOF
|
151
|
+
# Zsh completion configuration for the nesta command.
|
152
|
+
#
|
153
|
+
# Install it with these commands:
|
154
|
+
#
|
155
|
+
# $ nesta --zsh-completion > <somewhere/in/your/$fpath>/nesta-completion.sh
|
156
|
+
#
|
157
|
+
# Source form somewhere in your $fpath
|
158
|
+
|
159
|
+
#compdef nesta
|
160
|
+
|
161
|
+
|
162
|
+
_nesta_content() {
|
163
|
+
content=(`ls content/pages/**/*`)
|
164
|
+
}
|
165
|
+
|
166
|
+
|
167
|
+
local -a _1st_arguments
|
168
|
+
_1st_arguments=(
|
169
|
+
'new:Create a new Nesta project'
|
170
|
+
'edit:Edit a document'
|
171
|
+
'demo\:content:Install example pages in ./content-demo'
|
172
|
+
'theme\:install:Install a theme from a git repository'
|
173
|
+
'theme\:enable:Make the theme active, updating config.yml'
|
174
|
+
'theme\:create:Makes a template for a new theme in ./themes'
|
175
|
+
)
|
176
|
+
|
177
|
+
local expl
|
178
|
+
local -a content
|
179
|
+
|
180
|
+
_arguments \
|
181
|
+
'(-h)'{-h,--help}'[Display usage]' \
|
182
|
+
'(-v)'{-v,--version}'[Display Nesta version]' \
|
183
|
+
'(--bash-completion)--bash-completion[Output command for Bash completion]' \
|
184
|
+
'(--zsh-completion)--zsh-completion[Output command for Zsh completion]' \
|
185
|
+
'*:: :->subcmds' && return 0
|
186
|
+
|
187
|
+
if (( CURRENT == 1 )); then
|
188
|
+
_describe -t commands "nesta subcommand" _1st_arguments
|
189
|
+
return
|
190
|
+
fi
|
191
|
+
|
192
|
+
case "$words[1]" in
|
193
|
+
edit)
|
194
|
+
_nesta_content
|
195
|
+
_wanted content expl 'all content' compadd -a content ;;
|
196
|
+
esac
|
197
|
+
EOF
|
198
|
+
exit 0
|
199
|
+
end
|
144
200
|
end
|
145
201
|
end
|
146
202
|
|