1
0
Fork 0
mirror of synced 2024-06-17 06:11:09 -04:00
Commit graph

10 commits

Author SHA1 Message Date
Eric Nielsen e61e9937d6
Rename zimfw action clean-modules to uninstall
and have `zimfw clean` only do `clean-compiled` and `clean-dumpfile`.
Semantically, it makes much more sense because we will be then cleaning
temporary files that are later compiled/generated again, which is not
the case for a module (which we'll be uninstalling now instead of
cleaning).
2019-12-10 18:19:01 -05:00
Eric Nielsen 69d609dfb2
Don't fail zimfw compile on empty fpath dir
otherwise it would fail with, for example

    zrecompile:zcompile:133: can't open file /usr/local/share/zsh/site-functions
2019-12-09 21:34:12 -05:00
Eric Nielsen 74404e6d03
Add LICENSE to zimfw.zsh 2019-12-08 20:03:45 -05:00
Eric Nielsen 106335e1d8
Add zimfw init action for a quick build
Having to manually do `zimfw build` every time after you edit your
.zimrc file is boring. So by having the following in .zshrc before
sourcing init.zsh will do a quick build automatically when needed:

    if [[ ~/.zim/init.zsh -ot ~/.zimrc ]]; then
      source ~/.zim/zimfw.zsh init -q
    fi
2019-12-07 21:23:20 -05:00
Eric Nielsen c330f617bd
Compile also after upgrade, add ZIM_HOME to info
We want to recompile zimfw.zsh if it changes.
ZIM_HOME is not required to be set beforehand anymore, so let's give the
users the variable info back.
2019-12-05 13:51:34 -05:00
Eric Nielsen db9c104457
Source .zimrc twice when installing/updating
Once before installing/updating to prepare _zmodule_xargs, and once
after modules are updated, so functions and scripts can be found inside
them. Installation of Zim from scratch was failing because all modules
are empty at first.
2019-12-03 18:47:35 -05:00
Eric Nielsen ed9d08a091
Generate static init.zsh script \o/
to autoloads the functions and sources the scripts, instead of executing
zimfw during startup, and having it always figuring out what do to on
the fly.

This takes out the worry about zimfw interfering with the startup time,
and allows room to add more features to it. So, zstyle was replaced by a
custom zmodule function to define the modules, with the extra ability of
allowing users to set custom fpath paths, autoloaded functions and
sourced scripts per module.
2019-12-03 18:47:12 -05:00
Eric Nielsen e81c1d197b
Indent git log in zimfw update 2019-10-31 22:49:26 -05:00
Eric Nielsen 601941f121
Fix git log in zimfw update not showing backtick
because it was being processed as the beginning of a escape sequence.
Using `print -R` fixes that. Probably a good idea to use it when
printing other messages that contain externally-generated output.
2019-08-01 18:25:32 -05:00
Eric Nielsen 3af566d46b
Zim script in a single file \o/
Also moved the templates out of this repository, and into the
zimfw/install repo.

This is a second big change after introducing the plugin mechanism. This
makes installation and upgrading of Zim straightforward. Maybe the most
important aspect of having the script in a single file is not having to
manage "git repos inside git repos" (see #297), since the single file
exists by itself and is not version-controlled (with git).

I've implemented a two-stage sourcing of the file, so most of the file
is only sourced when needed (namely when calling `zimfw` with any action
other than `login-init`). The two-stage process is designed to avoid
compromising the startup speed, which is our top priority.

In an effort to help making the script maintainable, I've broken it into
small ERB templates. This also adds the ability to pre-process the Zsh
code with Ruby code. To build the script, use `make`.
2019-02-03 08:38:40 -05:00