1
0
Fork 0
mirror of synced 2024-11-26 17:25:35 -05:00

Narrow zmodule help text

to avoid the horizontal scroll on it in the https://github.com/zimfw/zimfw
GitHub homepage.
This commit is contained in:
Eric Nielsen 2020-10-11 12:24:01 -05:00
parent fbf0fe0ac6
commit ef4fe38716
No known key found for this signature in database
GPG key ID: 47D1DBFA0765A1FB
4 changed files with 60 additions and 60 deletions

View file

@ -83,29 +83,29 @@ Usage: <strong>zmodule</strong> &lt;url&gt; [<strong>-n</strong>|<strong>--name<
Add <strong>zmodule</strong> calls to your <strong>~/.zimrc</strong> file to define the modules to be initialized. The modules are Add <strong>zmodule</strong> calls to your <strong>~/.zimrc</strong> file to define the modules to be initialized. The modules are
initialized in the same order they are defined. initialized in the same order they are defined.
&lt;url&gt; Module absolute path or repository URL. The following URL formats &lt;url&gt; Module absolute path or repository URL. The following URL formats
are equivalent: <strong>name</strong>, <strong>zimfw/name</strong>, <strong>https://github.com/zimfw/name.git</strong>. are equivalent: <strong>name</strong>, <strong>zimfw/name</strong>, <strong>https://github.com/zimfw/name.git</strong>.
<strong>-n</strong>|<strong>--name</strong> &lt;module_name&gt; Set a custom module name. Default: the last component in the &lt;url&gt;. <strong>-n</strong>|<strong>--name</strong> &lt;module_name&gt; Set a custom module name. Default: the last component in the &lt;url&gt;.
Repository options: Repository options:
<strong>-b</strong>|<strong>--branch</strong> &lt;branch_name&gt; Use specified branch when installing and updating the module. <strong>-b</strong>|<strong>--branch</strong> &lt;branch_name&gt; Use specified branch when installing and updating the module.
Overrides the tag option. Default: <strong>master</strong>. Overrides the tag option. Default: <strong>master</strong>.
<strong>-t</strong>|<strong>--tag</strong> &lt;tag_name&gt; Use specified tag when installing and updating the module. <strong>-t</strong>|<strong>--tag</strong> &lt;tag_name&gt; Use specified tag when installing and updating the module.
Overrides the branch option. Overrides the branch option.
<strong>-z</strong>|<strong>--frozen</strong> Don't install or update the module. <strong>-z</strong>|<strong>--frozen</strong> Don't install or update the module.
Initialization options: Initialization options:
<strong>-f</strong>|<strong>--fpath</strong> &lt;path&gt; Add specified path to fpath. The path is relative to the module <strong>-f</strong>|<strong>--fpath</strong> &lt;path&gt; Add specified path to fpath. The path is relative to the module
root directory. Default: <strong>functions</strong>, if the subdirectory exists. root directory. Default: <strong>functions</strong>, if the subdirectory exists.
<strong>-a</strong>|<strong>--autoload</strong> &lt;function_name&gt; Autoload specified function. Default: all valid names inside the <strong>-a</strong>|<strong>--autoload</strong> &lt;func_name&gt; Autoload specified function. Default: all valid names inside the
module's specified fpath paths. module's specified fpath paths.
<strong>-s</strong>|<strong>--source</strong> &lt;file_path&gt; Source specified file. The file path is relative to the module root <strong>-s</strong>|<strong>--source</strong> &lt;file_path&gt; Source specified file. The file path is relative to the module root
directory. Default: the file with largest size matching directory. Default: the file with largest size matching
<strong>{init.zsh,module_name.{zsh,plugin.zsh,zsh-theme,sh}}</strong>, if any exist. <strong>{init.zsh,module_name.{zsh,plugin.zsh,zsh-theme,sh}}</strong>, if any exist.
<strong>-c</strong>|<strong>--cmd</strong> &lt;command&gt; Execute specified command. Occurrences of the <strong>{}</strong> placeholder in the <strong>-c</strong>|<strong>--cmd</strong> &lt;command&gt; Execute specified command. Occurrences of the <strong>{}</strong> placeholder in the
command are substituted by the module root directory path. command are substituted by the module root directory path.
<strong>-s 'script.zsh'</strong> and <strong>-c 'source {}/script.zsh'</strong> are equivalent. <strong>-s 'script.zsh'</strong> and <strong>-c 'source {}/script.zsh'</strong> are equivalent.
<strong>-d</strong>|<strong>--disabled</strong> Don't initialize or uninstall the module. <strong>-d</strong>|<strong>--disabled</strong> Don't initialize or uninstall the module.
</pre> </pre>
### zimfw ### zimfw

View file

@ -4,29 +4,29 @@ zmodule() {
Add %Bzmodule%b calls to your %B${ZDOTDIR:-${HOME}}/.zimrc%b file to define the modules to be initialized. Add %Bzmodule%b calls to your %B${ZDOTDIR:-${HOME}}/.zimrc%b file to define the modules to be initialized.
The modules are initialized in the same order they are defined. The modules are initialized in the same order they are defined.
<url> Module absolute path or repository URL. The following URL formats <url> Module absolute path or repository URL. The following URL formats
are equivalent: %Bname%b, %Bzimfw/name%b, %Bhttps://github.com/zimfw/name.git%b. are equivalent: %Bname%b, %Bzimfw/name%b, %Bhttps://github.com/zimfw/name.git%b.
%B-n%b|%B--name%b <module_name> Set a custom module name. Default: the last component in the <url>. %B-n%b|%B--name%b <module_name> Set a custom module name. Default: the last component in the <url>.
Repository options: Repository options:
%B-b%b|%B--branch%b <branch_name> Use specified branch when installing and updating the module. %B-b%b|%B--branch%b <branch_name> Use specified branch when installing and updating the module.
Overrides the tag option. Default: %Bmaster%b. Overrides the tag option. Default: %Bmaster%b.
%B-t%b|%B--tag%b <tag_name> Use specified tag when installing and updating the module. %B-t%b|%B--tag%b <tag_name> Use specified tag when installing and updating the module.
Overrides the branch option. Overrides the branch option.
%B-z%b|%B--frozen%b Don't install or update the module. %B-z%b|%B--frozen%b Don't install or update the module.
Initialization options: Initialization options:
%B-f%b|%B--fpath%b <path> Add specified path to fpath. The path is relative to the module %B-f%b|%B--fpath%b <path> Add specified path to fpath. The path is relative to the module
root directory. Default: %Bfunctions%b, if the subdirectory exists. root directory. Default: %Bfunctions%b, if the subdirectory exists.
%B-a%b|%B--autoload%b <function_name> Autoload specified function. Default: all valid names inside the %B-a%b|%B--autoload%b <func_name> Autoload specified function. Default: all valid names inside the
module's specified fpath paths. module's specified fpath paths.
%B-s%b|%B--source%b <file_path> Source specified file. The file path is relative to the module root %B-s%b|%B--source%b <file_path> Source specified file. The file path is relative to the module root
directory. Default: the file with largest size matching directory. Default: the file with largest size matching
%B{init.zsh,module_name.{zsh,plugin.zsh,zsh-theme,sh}}%b, if any exist. %B{init.zsh,module_name.{zsh,plugin.zsh,zsh-theme,sh}}%b, if any exist.
%B-c%b|%B--cmd%b <command> Execute specified command. Occurrences of the %B{}%b placeholder in the %B-c%b|%B--cmd%b <command> Execute specified command. Occurrences of the %B{}%b placeholder in the
command are substituted by the module root directory path. command are substituted by the module root directory path.
%B-s 'script.zsh'%b and %B-c 'source {}/script.zsh'%b are equivalent. %B-s 'script.zsh'%b and %B-c 'source {}/script.zsh'%b are equivalent.
%B-d%b|%B--disabled%b Don't initialize or uninstall the module. %B-d%b|%B--disabled%b Don't initialize or uninstall the module.
" "
if [[ ${${funcfiletrace[1]%:*}:t} != .zimrc ]]; then if [[ ${${funcfiletrace[1]%:*}:t} != .zimrc ]]; then
print -u2 -PR "%F{red}${0}: Must be called from %B<%= home %>/.zimrc%b%f"$'\n\n'${zusage} print -u2 -PR "%F{red}${0}: Must be called from %B<%= home %>/.zimrc%b%f"$'\n\n'${zusage}

View file

@ -6,7 +6,7 @@ class Zim
@home = "${ZDOTDIR:-${HOME}}" @home = "${ZDOTDIR:-${HOME}}"
@min_zsh_version = "5.2" @min_zsh_version = "5.2"
@startup_files_glob = ".z(shenv|profile|shrc|login|logout)" @startup_files_glob = ".z(shenv|profile|shrc|login|logout)"
@version = "1.3.2" @version = "1.3.3-SNAPSHOT"
@ellipsis = " ..." @ellipsis = " ..."
@okay = "%F{green})%f " @okay = "%F{green})%f "
@warn = "! " @warn = "! "

View file

@ -107,29 +107,29 @@ zmodule() {
Add %Bzmodule%b calls to your %B${ZDOTDIR:-${HOME}}/.zimrc%b file to define the modules to be initialized. Add %Bzmodule%b calls to your %B${ZDOTDIR:-${HOME}}/.zimrc%b file to define the modules to be initialized.
The modules are initialized in the same order they are defined. The modules are initialized in the same order they are defined.
<url> Module absolute path or repository URL. The following URL formats <url> Module absolute path or repository URL. The following URL formats
are equivalent: %Bname%b, %Bzimfw/name%b, %Bhttps://github.com/zimfw/name.git%b. are equivalent: %Bname%b, %Bzimfw/name%b, %Bhttps://github.com/zimfw/name.git%b.
%B-n%b|%B--name%b <module_name> Set a custom module name. Default: the last component in the <url>. %B-n%b|%B--name%b <module_name> Set a custom module name. Default: the last component in the <url>.
Repository options: Repository options:
%B-b%b|%B--branch%b <branch_name> Use specified branch when installing and updating the module. %B-b%b|%B--branch%b <branch_name> Use specified branch when installing and updating the module.
Overrides the tag option. Default: %Bmaster%b. Overrides the tag option. Default: %Bmaster%b.
%B-t%b|%B--tag%b <tag_name> Use specified tag when installing and updating the module. %B-t%b|%B--tag%b <tag_name> Use specified tag when installing and updating the module.
Overrides the branch option. Overrides the branch option.
%B-z%b|%B--frozen%b Don't install or update the module. %B-z%b|%B--frozen%b Don't install or update the module.
Initialization options: Initialization options:
%B-f%b|%B--fpath%b <path> Add specified path to fpath. The path is relative to the module %B-f%b|%B--fpath%b <path> Add specified path to fpath. The path is relative to the module
root directory. Default: %Bfunctions%b, if the subdirectory exists. root directory. Default: %Bfunctions%b, if the subdirectory exists.
%B-a%b|%B--autoload%b <function_name> Autoload specified function. Default: all valid names inside the %B-a%b|%B--autoload%b <func_name> Autoload specified function. Default: all valid names inside the
module's specified fpath paths. module's specified fpath paths.
%B-s%b|%B--source%b <file_path> Source specified file. The file path is relative to the module root %B-s%b|%B--source%b <file_path> Source specified file. The file path is relative to the module root
directory. Default: the file with largest size matching directory. Default: the file with largest size matching
%B{init.zsh,module_name.{zsh,plugin.zsh,zsh-theme,sh}}%b, if any exist. %B{init.zsh,module_name.{zsh,plugin.zsh,zsh-theme,sh}}%b, if any exist.
%B-c%b|%B--cmd%b <command> Execute specified command. Occurrences of the %B{}%b placeholder in the %B-c%b|%B--cmd%b <command> Execute specified command. Occurrences of the %B{}%b placeholder in the
command are substituted by the module root directory path. command are substituted by the module root directory path.
%B-s 'script.zsh'%b and %B-c 'source {}/script.zsh'%b are equivalent. %B-s 'script.zsh'%b and %B-c 'source {}/script.zsh'%b are equivalent.
%B-d%b|%B--disabled%b Don't initialize or uninstall the module. %B-d%b|%B--disabled%b Don't initialize or uninstall the module.
" "
if [[ ${${funcfiletrace[1]%:*}:t} != .zimrc ]]; then if [[ ${${funcfiletrace[1]%:*}:t} != .zimrc ]]; then
print -u2 -PR "%F{red}${0}: Must be called from %B${ZDOTDIR:-${HOME}}/.zimrc%b%f"$'\n\n'${zusage} print -u2 -PR "%F{red}${0}: Must be called from %B${ZDOTDIR:-${HOME}}/.zimrc%b%f"$'\n\n'${zusage}
@ -315,7 +315,7 @@ _zimfw_compile() {
} }
_zimfw_info() { _zimfw_info() {
print -R 'zimfw version: '${_zversion}' (previous commit is ccace0c)' print -R 'zimfw version: '${_zversion}' (previous commit is fbf0fe0)'
print -R 'ZIM_HOME: '${ZIM_HOME} print -R 'ZIM_HOME: '${ZIM_HOME}
print -R 'Zsh version: '${ZSH_VERSION} print -R 'Zsh version: '${ZSH_VERSION}
print -R 'System info: '$(command uname -a) print -R 'System info: '$(command uname -a)
@ -359,7 +359,7 @@ _zimfw_upgrade() {
} }
zimfw() { zimfw() {
local -r _zversion='1.3.2' local -r _zversion='1.3.3-SNAPSHOT'
local -r zusage="Usage: %B${0}%b <action> [%B-q%b|%B-v%b] local -r zusage="Usage: %B${0}%b <action> [%B-q%b|%B-v%b]
Actions: Actions: