Commit Graph

18 Commits

Author SHA1 Message Date
Eric Nielsen 5bcfb8cc9f
Override repository options along zmodule calls
for the same module name. Other minor fixes:
* Show skipping already installed modules with install action and `-v`.
* Consider external module dirs when calling compile action directly, by
  making sure _zimfw_source_zimrc is called first.
* Ignore return value from `zargs` with `-P`, as it's oddly returning
  123 since Zsh 5.9. Maybe related to these changes:
  67f932e7c5
2022-05-17 18:43:59 -05:00
Eric Nielsen d6b4aa6ff4
v1.9.0 2022-05-09 18:36:03 -05:00
Eric Nielsen 741bb78a04
Add `--on-pull` option to `zmodule`
Fixes #456
2022-05-07 16:31:08 -05:00
Eric Nielsen 27dcd4832e
Add `--no-submodules` option to `zmodule`
Fixes #409
2022-01-25 09:32:50 -05:00
Eric Nielsen a5fb148ccf
Force local zsh emulation options
so the code is not broken by unexpected option changes, like

    setopt RC_EXPAND_PARAM

which breaks

    print -R 'fpath=('${${_zfpaths#${~zpre}}:A}' ${fpath})'

in the _zimfw_build_init function, for example.

See #444.
2021-11-21 14:39:20 -05:00
Eric Nielsen de685e8ef3
Minor text updates in warnings, errors, and usages 2021-11-15 19:37:40 -05:00
Eric Nielsen e060934a9e
.git can be either a directory or a file
Git submodules usually have .git as file, actually. Zim modules should
not be git submodules, but we don't want Zim to be too smart here either.
See https://git-scm.com/docs/gitrepository-layout#_description
2021-11-11 13:46:28 -05:00
Eric Nielsen cd71c8d228
Use git -C instead of changing to the module dir
when doing update using the git tool.
2021-11-10 22:50:17 -05:00
Eric Nielsen 811616cc60
Add missing `-l` in git tool print_okay
This fixes a regression introduced in commit b1edcf34d0.

Also don't use any option after `-R` just to be safe. The zshbuiltins(1)
manual states:

> Only the -e and -n flags are recognized after -R; all other arguments
> and options are printed.
2021-11-08 11:38:56 -05:00
Eric Nielsen a86f69a2f1
Warn when module isn't installed with current tool
instead of showing it as an error. This change allow the message to be
omitted with `-q`.
2021-10-19 08:36:51 -05:00
Eric Nielsen de7d2b131f
More verbose output in install and update actions
listing modules that are frozen or exernal.

Also be less colorful. And some other minor fixes: allow autoloading a
function name that starts with `-`, and add required quotes around
command subsitution (otherwise words are split).
2021-09-29 21:22:28 -05:00
Eric Nielsen b1edcf34d0
Use `print -l` to print multiple lines
and also remove extra quotes. Still only leave redundant quotes in

    zstyle -s 'context' style 'name'

as that's kind of a convention already.
2021-09-23 14:29:40 -05:00
Eric Nielsen e097e6bf71
Add list action, don't run tool on external module
Using the `list` action with `-v` shows all current details for the
existing modules.
Don't try to install or update external modules, since they have an
absolute path instead of a valid URL.
2021-09-19 13:37:13 -05:00
Eric Nielsen df70a1ca99
Fix update with git tool when module dir is under
an unresolved symlink.
2021-08-26 18:15:39 -05:00
Eric Nielsen f6b623f515
Do git clone with `core.autocrlf=false`
to override any `core.autocrlf=true` the user could have set globally.
Fixes #404
2021-08-09 20:32:32 -05:00
Eric Nielsen 7d43589843
Add zstyle to set default zmodule tool
and also simplify code by setting multiple variables at once. This
should make the resulting script a tiny bit smaller, while not
compromising on legibility.
2021-07-11 15:58:15 -05:00
Eric Nielsen 2c8f8e348e
Update help and error messages
and bring back the help message for -z|--frozen that was deleted
accidentally.
2021-07-01 18:08:25 -05:00
Eric Nielsen cffd456556
Add new degit tool \o/
and rename previous to git.

Tools allow for different install and update scripts. The git tool does
what the previous implementation did (installs and updates using the git
client). The new tool installs and updates with the GitHub API, not
using the git client, but using curl/wget and tar instead.

Closes #373
2021-04-07 17:54:47 -05:00