1
0
Fork 0
mirror of synced 2024-11-22 15:25:34 -05:00

Narrow zmodule help text again

to avoid the horizontal scroll in the https://github.com/zimfw/zimfw
GitHub homepage, as GitHub made the width of the pre block further
narrower. (It's 94 characters now, was 97 before)
This commit is contained in:
Eric Nielsen 2021-11-08 20:05:32 -05:00
parent 503f2daf4c
commit ab613bf398
No known key found for this signature in database
GPG key ID: 47D1DBFA0765A1FB
5 changed files with 80 additions and 76 deletions

View file

@ -85,7 +85,7 @@ A module from the [zimfw] organization: `zmodule archive`
A module from another GitHub organization: `zmodule StackExchange/blackbox` A module from another GitHub organization: `zmodule StackExchange/blackbox`
A module not from GitHub: `zmodule https://gitlab.com/Spriithy/basher.git` A module with a custom URL: `zmodule https://gitlab.com/Spriithy/basher.git`
A module at an absolute path, that is already installed: A module at an absolute path, that is already installed:
`zmodule /usr/local/share/zsh-autosuggestions` `zmodule /usr/local/share/zsh-autosuggestions`
@ -111,27 +111,27 @@ and the degit'ed module had 2.9M and took 3s to be installed. -->
<pre>Usage: <b>zmodule</b> &lt;url&gt; [<b>-n</b>|<b>--name</b> &lt;module_name&gt;] [options] <pre>Usage: <b>zmodule</b> &lt;url&gt; [<b>-n</b>|<b>--name</b> &lt;module_name&gt;] [options]
Add <b>zmodule</b> calls to your <b>~/.zimrc</b> file to define the modules to be initialized. The modules are Add <b>zmodule</b> calls to your <b>~/.zimrc</b> file to define the modules to be initialized. The modules
initialized in the same order they are defined. are 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: <b>name</b>, <b>zimfw/name</b>, <b>https://github.com/zimfw/name.git</b>. are equivalent: <b>foo</b>, <b>zimfw/foo</b>, <b>https://github.com/zimfw/foo.git</b>.
<b>-n</b>|<b>--name</b> &lt;module_name&gt; Set a custom module name. Default: the last component in the &lt;url&gt;. <b>-n</b>|<b>--name</b> &lt;module_name&gt; Set a custom module name. Default: the last component in &lt;url&gt;.
Use slashes inside the name to organize the module into subdirecto- Use slashes inside the name to organize the module into subdirec-
ries. tories.
Repository options: Repository options:
<b>-b</b>|<b>--branch</b> &lt;branch_name&gt; Use specified branch when installing and updating the module. <b>-b</b>|<b>--branch</b> &lt;branch_name&gt; Use specified branch when installing and updating the module.
Overrides the tag option. Default: the repository&apos;s default branch. Overrides the tag option. Default: the repository default branch.
<b>-t</b>|<b>--tag</b> &lt;tag_name&gt; Use specified tag when installing and updating the module. <b>-t</b>|<b>--tag</b> &lt;tag_name&gt; Use specified tag when installing and updating the module. Over-
Overrides the branch option. rides the branch option.
<b>-u</b>|<b>--use</b> &lt;<b>git</b>|<b>degit</b>&gt; Install and update the module using the defined tool. Default is <b>-u</b>|<b>--use</b> &lt;<b>git</b>|<b>degit</b>&gt; Install and update the module using the defined tool. Default is
defined by <b>zstyle &apos;:zim:zmodule&apos; use &apos;</b>&lt;<b>git</b>|<b>degit</b>&gt;<b>&apos;</b>, or <b>git</b> if none either defined by <b>zstyle &apos;:zim:zmodule&apos; use &apos;</b>&lt;<b>git</b>|<b>degit</b>&gt;<b>&apos;</b>, or <b>git</b>
is provided. if none is provided.
<b>git</b> requires git itself. Local changes are preserved during updates. <b>git</b> requires git itself. Local changes are preserved on updates.
<b>degit</b> requires curl or wget, and currently only works with GitHub <b>degit</b> requires curl or wget, and currently only works with GitHub
URLs. Modules install faster and take less disk space. Local changes URLs. Modules install faster and take less disk space. Local
are lost during updates. Git submodules are not supported. changes are lost on updates. Git submodules are not supported.
<b>-z</b>|<b>--frozen</b> Don&apos;t install or update the module. <b>-z</b>|<b>--frozen</b> Don&apos;t install or update the module.
Initialization options: Initialization options:
@ -139,18 +139,18 @@ Initialization options:
root directory. Default: <b>functions</b>, if the subdirectory exists. root directory. Default: <b>functions</b>, if the subdirectory exists.
<b>-a</b>|<b>--autoload</b> &lt;func_name&gt; Autoload specified function. Default: all valid names inside the <b>-a</b>|<b>--autoload</b> &lt;func_name&gt; Autoload specified function. Default: all valid names inside the
module&apos;s specified fpath paths. module&apos;s specified fpath paths.
<b>-s</b>|<b>--source</b> &lt;file_path&gt; Source specified file. The file path is relative to the module root <b>-s</b>|<b>--source</b> &lt;file_path&gt; Source specified file. The file path is relative to the module
directory. Default: <b>init.zsh</b>, if the <b>functions</b> subdirectory also root directory. Default: <b>init.zsh</b>, if the <b>functions</b> subdirectory
exists, or the file with largest size matching also exists, or the file with largest size and with name 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.
<b>-c</b>|<b>--cmd</b> &lt;command&gt; Execute specified command. Occurrences of the <b>{}</b> placeholder in the <b>-c</b>|<b>--cmd</b> &lt;command&gt; Execute specified command. Occurrences of the <b>{}</b> placeholder in
command are substituted by the module root directory path. the command are substituted by the module root directory path.
I.e., <b>-s &apos;script.zsh&apos;</b> and <b>-c &apos;source {}/script.zsh&apos;</b> are equivalent. I.e., <b>-s &apos;foo.zsh&apos;</b> and <b>-c &apos;source {}/foo.zsh&apos;</b> are equivalent.
<b>-d</b>|<b>--disabled</b> Don&apos;t initialize or uninstall the module. <b>-d</b>|<b>--disabled</b> Don&apos;t initialize or uninstall the module.
Setting any initialization option above will disable all the default values from the other ini- Setting any initialization option above will disable all the default values from the other
tialization options, so only your provided values are used. I.e. these values are either all initialization options, so only your provided values are used. I.e. these values are either
automatic, or all manual. all automatic, or all manual.
</pre> </pre>
</details> </details>

View file

@ -5,23 +5,23 @@ Add %Bzmodule%b calls to your %B${ZDOTDIR:-${HOME}}/.zimrc%b file to define the
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: %Bfoo%b, %Bzimfw/foo%b, %Bhttps://github.com/zimfw/foo.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 <url>.
Use slashes inside the name to organize the module into subdirecto- Use slashes inside the name to organize the module into subdirec-
ries. tories.
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: the repository's default branch. Overrides the tag option. Default: the repository default branch.
%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. Over-
Overrides the branch option. rides the branch option.
%B-u%b|%B--use%b <%%Bgit%b|%Bdegit%b> Install and update the module using the defined tool. Default is %B-u%b|%B--use%b <%%Bgit%b|%Bdegit%b> Install and update the module using the defined tool. Default is
defined by %Bzstyle ':zim:zmodule' use '%b<%%Bgit%b|%Bdegit%b>%B'%b, or %Bgit%b if none either defined by %Bzstyle ':zim:zmodule' use '%b<%%Bgit%b|%Bdegit%b>%B'%b, or %Bgit%b
is provided. if none is provided.
%Bgit%b requires git itself. Local changes are preserved during updates. %Bgit%b requires git itself. Local changes are preserved on updates.
%Bdegit%b requires curl or wget, and currently only works with GitHub %Bdegit%b requires curl or wget, and currently only works with GitHub
URLs. Modules install faster and take less disk space. Local changes URLs. Modules install faster and take less disk space. Local
are lost during updates. Git submodules are not supported. changes are lost on updates. Git submodules are not supported.
%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:
@ -29,18 +29,18 @@ Initialization options:
root directory. Default: %Bfunctions%b, if the subdirectory exists. root directory. Default: %Bfunctions%b, if the subdirectory exists.
%B-a%b|%B--autoload%b <func_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
directory. Default: %Binit.zsh%b, if the %Bfunctions%b subdirectory also root directory. Default: %Binit.zsh%b, if the %Bfunctions%b subdirectory
exists, or the file with largest size matching also exists, or the file with largest size and with name 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.
%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
command are substituted by the module root directory path. the command are substituted by the module root directory path.
I.e., %B-s 'script.zsh'%b and %B-c 'source {}/script.zsh'%b are equivalent. I.e., %B-s 'foo.zsh'%b and %B-c 'source {}/foo.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.
Setting any initialization option above will disable all the default values from the other ini- Setting any initialization option above will disable all the default values from the other
tialization options, so only your provided values are used. I.e. these values are either all initialization options, so only your provided values are used. I.e. these values are either
automatic, or all manual." all automatic, or all manual."
if [[ ${${funcfiletrace[1]%:*}:t} != .zimrc ]]; then if [[ ${${funcfiletrace[1]%:*}:t} != .zimrc ]]; then
print -u2 -PlR "%F{red}${0}: Must be called from %B<%= home %>/.zimrc%b%f" '' ${zusage} print -u2 -PlR "%F{red}${0}: Must be called from %B<%= home %>/.zimrc%b%f" '' ${zusage}
return 2 return 2

View file

@ -10,10 +10,12 @@ Actions:
%Bcompile%b Compile Zsh files. %Bcompile%b Compile Zsh files.
%Bhelp%b Print this help. %Bhelp%b Print this help.
%Binfo%b Print Zim and system info. %Binfo%b Print Zim and system info.
%Blist%b List all modules. Use %B-v%b to also see the current details for all modules. %Blist%b List all modules currently defined in %B<%= home %>/.zimrc%b.
Use %B-v%b to also see the modules details.
%Binstall%b Install new modules. Also does %Bbuild%b and %Bcompile%b. Use %B-v%b to also see their %Binstall%b Install new modules. Also does %Bbuild%b and %Bcompile%b. Use %B-v%b to also see their
output, and see skipped modules. output, and see skipped modules.
%Buninstall%b Delete unused modules. Prompts for confirmation. Use %B-q%b to uninstall quietly. %Buninstall%b Delete unused modules. Prompts for confirmation. Use option %B-q%b to uninstall
quietly.
%Bupdate%b Update current modules. Also does %Bbuild%b and %Bcompile%b. Use %B-v%b to see their %Bupdate%b Update current modules. Also does %Bbuild%b and %Bcompile%b. Use %B-v%b to see their
output, and see skipped modules. output, and see skipped modules.
%Bupgrade%b Upgrade zimfw. Also does %Bcompile%b. Use %B-v%b to also see its output. %Bupgrade%b Upgrade zimfw. Also does %Bcompile%b. Use %B-v%b to also see its output.

View file

@ -4,7 +4,7 @@ class Zim
:clear_line, :ellipsis, :okay, :warn, :error, :done, :failed :clear_line, :ellipsis, :okay, :warn, :error, :done, :failed
def initialize def initialize
@version = "1.6.1" @version = "1.6.2-SNAPSHOT"
@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)"

View file

@ -115,23 +115,23 @@ Add %Bzmodule%b calls to your %B${ZDOTDIR:-${HOME}}/.zimrc%b file to define the
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: %Bfoo%b, %Bzimfw/foo%b, %Bhttps://github.com/zimfw/foo.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 <url>.
Use slashes inside the name to organize the module into subdirecto- Use slashes inside the name to organize the module into subdirec-
ries. tories.
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: the repository's default branch. Overrides the tag option. Default: the repository default branch.
%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. Over-
Overrides the branch option. rides the branch option.
%B-u%b|%B--use%b <%Bgit%b|%Bdegit%b> Install and update the module using the defined tool. Default is %B-u%b|%B--use%b <%Bgit%b|%Bdegit%b> Install and update the module using the defined tool. Default is
defined by %Bzstyle ':zim:zmodule' use '%b<%Bgit%b|%Bdegit%b>%B'%b, or %Bgit%b if none either defined by %Bzstyle ':zim:zmodule' use '%b<%Bgit%b|%Bdegit%b>%B'%b, or %Bgit%b
is provided. if none is provided.
%Bgit%b requires git itself. Local changes are preserved during updates. %Bgit%b requires git itself. Local changes are preserved on updates.
%Bdegit%b requires curl or wget, and currently only works with GitHub %Bdegit%b requires curl or wget, and currently only works with GitHub
URLs. Modules install faster and take less disk space. Local changes URLs. Modules install faster and take less disk space. Local
are lost during updates. Git submodules are not supported. changes are lost on updates. Git submodules are not supported.
%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:
@ -139,18 +139,18 @@ Initialization options:
root directory. Default: %Bfunctions%b, if the subdirectory exists. root directory. Default: %Bfunctions%b, if the subdirectory exists.
%B-a%b|%B--autoload%b <func_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
directory. Default: %Binit.zsh%b, if the %Bfunctions%b subdirectory also root directory. Default: %Binit.zsh%b, if the %Bfunctions%b subdirectory
exists, or the file with largest size matching also exists, or the file with largest size and with name 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.
%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
command are substituted by the module root directory path. the command are substituted by the module root directory path.
I.e., %B-s 'script.zsh'%b and %B-c 'source {}/script.zsh'%b are equivalent. I.e., %B-s 'foo.zsh'%b and %B-c 'source {}/foo.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.
Setting any initialization option above will disable all the default values from the other ini- Setting any initialization option above will disable all the default values from the other
tialization options, so only your provided values are used. I.e. these values are either all initialization options, so only your provided values are used. I.e. these values are either
automatic, or all manual." all automatic, or all manual."
if [[ ${${funcfiletrace[1]%:*}:t} != .zimrc ]]; then if [[ ${${funcfiletrace[1]%:*}:t} != .zimrc ]]; then
print -u2 -PlR "%F{red}${0}: Must be called from %B${ZDOTDIR:-${HOME}}/.zimrc%b%f" '' ${zusage} print -u2 -PlR "%F{red}${0}: Must be called from %B${ZDOTDIR:-${HOME}}/.zimrc%b%f" '' ${zusage}
return 2 return 2
@ -373,7 +373,7 @@ _zimfw_compile() {
} }
_zimfw_info() { _zimfw_info() {
print -R 'zimfw version: '${_zversion}' (built at 2021-11-08 17:02:56 UTC, previous commit is 811616c)' print -R 'zimfw version: '${_zversion}' (built at 2021-11-09 01:04:00 UTC, previous commit is 503f2da)'
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)
@ -716,7 +716,7 @@ esac
} }
zimfw() { zimfw() {
local -r _zversion='1.6.1' zusage="Usage: %B${0}%b <action> [%B-q%b|%B-v%b] local -r _zversion='1.6.2-SNAPSHOT' zusage="Usage: %B${0}%b <action> [%B-q%b|%B-v%b]
Actions: Actions:
%Bbuild%b Build %B${ZIM_HOME}/init.zsh%b and %B${ZIM_HOME}/login_init.zsh%b. %Bbuild%b Build %B${ZIM_HOME}/init.zsh%b and %B${ZIM_HOME}/login_init.zsh%b.
@ -727,10 +727,12 @@ Actions:
%Bcompile%b Compile Zsh files. %Bcompile%b Compile Zsh files.
%Bhelp%b Print this help. %Bhelp%b Print this help.
%Binfo%b Print Zim and system info. %Binfo%b Print Zim and system info.
%Blist%b List all modules. Use %B-v%b to also see the current details for all modules. %Blist%b List all modules currently defined in %B${ZDOTDIR:-${HOME}}/.zimrc%b.
Use %B-v%b to also see the modules details.
%Binstall%b Install new modules. Also does %Bbuild%b and %Bcompile%b. Use %B-v%b to also see their %Binstall%b Install new modules. Also does %Bbuild%b and %Bcompile%b. Use %B-v%b to also see their
output, and see skipped modules. output, and see skipped modules.
%Buninstall%b Delete unused modules. Prompts for confirmation. Use %B-q%b to uninstall quietly. %Buninstall%b Delete unused modules. Prompts for confirmation. Use option %B-q%b to uninstall
quietly.
%Bupdate%b Update current modules. Also does %Bbuild%b and %Bcompile%b. Use %B-v%b to see their %Bupdate%b Update current modules. Also does %Bbuild%b and %Bcompile%b. Use %B-v%b to see their
output, and see skipped modules. output, and see skipped modules.
%Bupgrade%b Upgrade zimfw. Also does %Bcompile%b. Use %B-v%b to also see its output. %Bupgrade%b Upgrade zimfw. Also does %Bcompile%b. Use %B-v%b to also see its output.