Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed meta info resolution to look for data based on the type, e.g.…

… about-plugin, about-alias, about-completion.
  • Loading branch information...
commit f71be202471da843f91a4e9bd28ec59e8a7728e2 1 parent 1f558e2
@nwinkler nwinkler authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 aliases/available/general.aliases.bash
  2. +1 −1  lib/helpers.bash
View
4 aliases/available/general.aliases.bash
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
-cite about-plugin
-about-plugin 'general aliases'
+cite about-alias
+about-alias 'general aliases'
# List directory contents
alias sl=ls
View
2  lib/helpers.bash
@@ -73,7 +73,7 @@ _bash-it-describe ()
else
enabled=' '
fi
- printf "%-20s%-10s%s\n" "$(basename $f | cut -d'.' -f1)" " [$enabled]" "$(cat $f | metafor about-plugin)"
+ printf "%-20s%-10s%s\n" "$(basename $f | cut -d'.' -f1)" " [$enabled]" "$(cat $f | metafor about-$command_suffix)"
done
printf '\n%s\n' "to enable $preposition $command_suffix, do:"
printf '%s\n' "$ enable-$command_suffix <$command_suffix name> -or- $ enable-$command_suffix all"

3 comments on commit f71be20

@erichs

Thanks!

@erichs

lib/helpers.bash, line 58: 'summarizes available bash-it {insert better term here}'

_bash_it_describe() is a 'plumbing' function, as opposed to a 'porcelain' function, like bash-it-plugins(). Porcelain should use the standard metadata keywords, so those functions get picked up by glossary() and reference(). I'm thinking though, that Plumbing should avoid using the porcelain 'apidoc' metadata for the same reasons.

I think there's value in adding metadata to plumbing, but we might think about cite()ing a different set of keywords.

I like the underscore prefix, maybe we could run with that:

cite _about _param _example
_about 'summarizes available bash-it components'
_param '1: file type'
_param '2: preposition'
_param '3: command_suffix'
_param '4: column_header'
_example '$ _bash-it-describe "plugins" "a" "plugin" "Plugin"'

@nwinkler
Collaborator

Agreed, makes sense. I have updated and pushed. At the same time, I have also cleaned up some of the parameters to make them consistent.

Please sign in to comment.
Something went wrong with that request. Please try again.