Commit Graph

72 Commits

Author SHA1 Message Date
Eric Nielsen 4200e6cdb3
v1.13.1 2024-04-28 14:07:41 -05:00
Eric Nielsen c86223f473
Don't use tar --strip
as it's not compatible with BSD distributions.
Fixes #534
2024-04-28 14:06:24 -05:00
Eric Nielsen 39d2087ad4
v1.13.0 2024-02-16 21:06:36 -05:00
Eric Nielsen 5f649d3031
v1.12.1 2023-09-16 13:26:53 -05:00
Eric Nielsen 26151d2f54
Remove prompt expansion from print statements
and replace the foreground color and bold expansions by ANSI escape
codes. This should make the print calls now safe and no expansion at all
should happen as we're using `-R` -- unless the `-e` flag is given.
Fixes #521. Closes #522
2023-09-16 13:21:14 -05:00
Eric Nielsen d33d632ec1
Use `--sort=-v:refname` in _zimfw_check_version
to sort tags, instead of using Zsh's `(On)`. The tags will come sorted
already.
2023-09-15 19:55:43 -05:00
Eric Nielsen e0d067977c
v1.12.0 2023-07-17 18:55:26 -05:00
Eric Nielsen ee93f7944f
Don't use a new shell to run tool anymore
This was needed when we were using xargs, but we're already using zargs
instead for quite some time. Pro is that now common functions are reused
instead of repeated. Con (or change) is that due to that reuse, and in
favor of simplification, the warning for a module with git submodules in
degit is in a separate line from a separate print call now.

Also fix regressions from recent commits:
- Need to call _zimfw_source_zimrc twice with 1 and 2 flags instead of
  with flag 3, since flag 2 must be used after module is installed or
  updated.
- Need to call _zimfw_print_okay from the function that handles on-pull,
  since we want to include the on-pull output in verbose mode. This
  function was called just `handle` before, now it's called
  _zimfw_pull_print_okay.

Still need to figure out how to return a final error code from
_zimfw_run_tool_action.
2023-03-28 07:56:37 -05:00
Eric Nielsen a34b8dab64
Add version-check action
And don't run the dumping of the .latest_version file in
_zimfw_version_check in the background (with `&!`) anymore.

See #503
2023-03-24 08:44:52 -05:00
Eric Nielsen 222c971542
v1.11.3 2023-02-25 19:44:58 -05:00
Eric Nielsen 6a24459de9
Deprecate check-dumpfile action
The completion module alone will handle checking the dumpfile.
See https://github.com/zimfw/completion/pull/12
2023-02-25 19:03:37 -05:00
Eric Nielsen fff151be09
v1.11.2 2023-02-16 07:59:49 -05:00
Eric Nielsen d10d7c627c
Revert "Further improve check-dumpfile action accuracy"
This reverts commit e47eaae2e4.
2023-02-16 07:51:30 -05:00
Eric Nielsen e47eaae2e4
Further improve check-dumpfile action accuracy
Previous change fixed the old dumpfile vs. new dumpfile check, but
removed an existing (but flawled) old Zim fpath vs. new Zim fpath check.
We should be doing both checks the right way now.
2023-02-06 19:19:15 -05:00
Eric Nielsen 05164357b8
v1.11.1 2023-02-04 09:47:19 -05:00
Eric Nielsen 281cde57f7
v1.11.0 2022-12-18 16:09:04 -05:00
Eric Nielsen 8a9d63c522
Fix quoting string in glob
so it does not get expanded as a glob itself, if it contains special
characters.
2022-09-28 19:42:05 -05:00
Eric Nielsen 238da94b54
v1.10.0 2022-09-27 17:45:16 -05:00
Eric Nielsen 887bfd6a03
Update info action output and update README.md
Show the value of some relevant environment variables instead of calling
uname, which might show private information like the host name.

Other minor fixes regarding output.
2022-08-02 12:49:09 -05:00
Eric Nielsen a620953556
v1.9.1 2022-05-24 16:25:32 -05:00
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 4fe7c66e07
v1.8.0 2022-01-25 17:19:34 -05:00
Eric Nielsen afd35f6590
v1.7.0 2022-01-11 22:51:06 -05:00
Eric Nielsen 92bfa96993
Further clean up and simplify code
@startup_files_glob is not used anymore.
2022-01-11 11:29:47 -05:00
Eric Nielsen cfc955c9fd
Deprecate compile in background via login_init.zsh
Changes are:
  * Don't compile in the background anymore, only via the `zimfw` tool
    after actions where scripts can change (build, install, update)
  * Move compilation of the completion dumpfile to the completion module:
    9386a76eac/init.zsh (L10-L11)
  * Don't compile users startup scripts anymore (.zshenv, .zshrc, etc.)
  * Make output of `zimfw init` friendlier for the terminal startup
    screen when called without `-q`.

See https://github.com/romkatv/zsh-bench/pull/11#issuecomment-994979683
and https://github.com/romkatv/zsh-bench#cutting-corners

Regarding not compiling users startup scripts anymore, I'm choosing to
only compile the modules' scripts at least for the reason that compile
won't happen so ofter anymore -- it will only happen when the user calls
the `zimfw` build, install or update actions. So it makes more sense to
only compile the files that `zimfw` has control over changes...

Closes #450
2022-01-10 09:29:32 -05:00
Eric Nielsen 90de91ab4f
v1.6.2 2021-11-21 14:41:25 -05:00
Eric Nielsen ab613bf398
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)
2021-11-08 20:05:32 -05:00
Eric Nielsen 503f2daf4c
v1.6.1 2021-11-08 12:03:49 -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 d7229bb6bc
v1.6.0 2021-11-06 17:04:47 -05:00
Eric Nielsen 7deda9c7f4
Show a more informative error when running zmodule
from the shell. This means getting

    zmodule: Must be called from ${ZDOTDIR:-${HOME}}/.zimrc

and the full zmodule usage, instead of getting

    zsh: command not found: zmodule

Fixes #430
2021-09-20 21:21:27 -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 3bbddf2a23
Update zmodule help message 2021-08-25 16:12:48 -05:00
Eric Nielsen c51898fef0
v1.5.0 2021-08-10 09:56: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
Eric Nielsen b4b9829360
v1.4.3 2021-03-19 18:44:53 -05:00
Eric Nielsen f7c0bbeb36
Prefer the prezto module format
to avoid conflicts when we have Zim modules made to also be compatible
with ohmyzsh, like https://github.com/zimfw/pvenv
We don't want to be affected by the noise a `${module_name}.plugin.zsh`
file creates, as we always want to source `init.zsh` when a module also
has a `functions` subdir. Hope this better protects us from the "wild
west out there".
2021-03-16 17:04:40 -05:00
Eric Nielsen 1df02c57df
v1.4.2 2021-02-19 15:30:30 -05:00
Eric Nielsen 6d577d7f6a
Fix update.zsh.erb for renamed HEAD remote branch
We need to fetch all branches first to handle the scenario when the HEAD
remote branch was renamed. Recently repositories started changing their
HEAD branch names from master to main.
Fixes #424
2021-02-19 15:30:27 -05:00
Eric Nielsen ddfba96c88
v1.4.1 2021-02-17 18:28:24 -05:00
Eric Nielsen 36aa1b3fe9
Fix getting default branch in update.zsh.erb
The regression was introduced in commit 3567694. I wrongly assumed that
`git fetch -pq origin HEAD` would fetch from the remote default branch.
Fixes #423
2021-02-17 15:55:38 -05:00
Eric Nielsen 3e06f0aa99
v1.4.0 2021-01-07 13:41:35 -05:00
Eric Nielsen c6f0720abc
Fail when no parameter is provided to `-c|--cmd`
Forgot to add this check when the new option was introduced.
2020-11-07 14:42:04 -05:00
Eric Nielsen ef4fe38716
Narrow zmodule help text
to avoid the horizontal scroll on it in the https://github.com/zimfw/zimfw
GitHub homepage.
2020-10-11 12:24:01 -05:00
Eric Nielsen fbf0fe0ac6
v1.3.2 2020-08-01 09:39:07 -05:00
Eric Nielsen ccace0ca74
Clean compiled files from absolute path modules
We were already compiling at these paths, but not cleaning the compiled
files.
Fixes #399
2020-07-31 21:03:47 -05:00
Eric Nielsen 5059dd2c65
v1.3.1 2020-07-24 10:30:19 -05:00
Eric Nielsen dc93d13903
v1.3.0 2020-07-05 09:36:21 -05:00