So we can have the following code in the zlogin template:
source ${ZIM_HOME}/login_init.zsh -q &!
instead of depending on the zimfw function there. This allows fixing the
issue were a non-interactive login shell currently yields:
command not found: zimfw.
To fully fix the issue, we also need a new zshenv template containing:
ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
Templates will be updated in the install script.
we want to be a universal Zsh framework, and send the message that
"less is less"! ;- )
Don't indent done and failed messages with an indicator, at the end of
actions, to differentiate them from intermediate okay and error messages.
and make code closer to the one in the manual pages (unless for our code
style). Why reinvent the wheel?
This last change makes the arguments to zrecompile shorter (passing
relative paths instead of full paths to each function file).
The number of arguments can be huge. There are 1143 of them currently
for /usr/local/Cellar/zsh/5.7.1/share/zsh/functions!
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).
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
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.
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.
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.
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`.
Only 5% (18/342) of the themes listed under [unixorn/awesome-zsh-plugins]
are actually compatible with prompinit. Of these, [clean] also allows
being sourced directly. On the other hand, 3 others are prezto themes.
promptinit would be useful for who wants to try many themes without the
need to restart their shell session. And must be many many, so
"brute-force" starting a new shell to experiment each new theme would be
a burden! Even the cleanup feature of promptinit is still incomplete, so
you eventually get a messy prompt after trying many with it. And that's
not even a everyday use case of the average Zsh user.
So prompinit it not widely supported out there, and also not very useful
for the everyday let-me-use-my-beloved-and-carefully-customized-prompt-during-the-whole-shell-session-pleasee
scenario. It's also faster and simpler to directly just source the prompt
theme to be used, not even having to autoload promptinit and let it scan
all the others themes in fpath that won't be used.
And the Zim "philosophy" is to use fast and simple solutions.
So here we go.
Fixes#325
[unixorn/awesome-zsh-plugins]: e226f3de04/README.md (themes)
[clean]: https://github.com/BrandonRoehl/zsh-clean
so going into their ${ZIM_HOME}/modules/foo directory would be like
still being inside the Zim repo, in ${ZIM_HOME}. Don't try to update
them in this case.
This was supposed to be working before, but my ${ZIM_HOME} was not a
repo when I was still developing this locally.
Also change formatting of the settings. Using `<em></em>` to prevent
URL autolinking in some cases, and to add emphasis where `*foo*` would
be ambiguous for the Markdown format.
Copy was also slightly improved, hopefully for better clarity.
This is a major change, where Zsh modules/plugins are not git submodules
in the Zim repo anymore, but customized and installed separately as
individual repositories. The discussion about this started more than 2
years ago in #88. Closes#299.
This will allow contributors' modules to live in their own repositories.
See #33, #138, #262, #281, #324.
The current code has what, up to this point, I considered to be the best
balance between simplicity, execution speed and number of files.
One measured decision was to make the initialization of modules depend
only on the `':zim' modules` style, keeping it as fast as possible.
The `':zim:module' module` style is used to install, update and clean
the modules, all operations that happen after the user got his
as-blazing-fast-possible shell prompt.
Even though I didn't care much about making install or update fast,
`xargs` has a nice feature of allowing commands to be executed in
parallel with `-P`. I took advantage of that.
I've also worked on making the `zimfw` utility give the user some nice
(while still minimalistic) output. Also I'm suggesting this as the new
name for the `zmanage` tool, since `zimfw` does not shadow the `zim`
wiki tool.
* zsh-autosuggestions to release v0.6.3
* zsh-completions to release 0.30.0
* zsh-history-substring-search to HEAD
* zsh-syntax-highlighting to HEAD
* lean to HEAD
* liquidprompt to HEAD
* pure to release v1.10.3
Not needed in MacOS iTerm and Terminal, (u)rxvt, termite, alacritty and
gnome-terminal.
Does it do any good in any situation?
Closes#337
The develop branch already has this out:
229cea08e5/src/templates/zimrc.zsh.erb (L83-L85)
Use fuller format with committer info instead of medium format, as that
is more complete, and info for author and committer seems to fit in one
line each.
Fix one-line medium format so it truncates the subject at 50, instead of
at the fixed column 60, as that was not good to graph logs.
Remove `--all` from graph log aliases, to increase their flexibility.
We're then able to use it just for the current or for a branch passed
as parameter (as we already could with the other log aliases).
Copied from zimfw/git@63008c817e
Adds the following aliases:
- gmS: GPG-sign the resulting merge commit.
- gmV: Verify that the tip commit of the side branch being merged is
signed with a valid key, i.e. a key that has a valid uid: in the
default trust model, this means the signing key has been signed by a
trusted key. If the tip commit of the side branch is not signed with a
valid key, the merge is aborted.
Closes#333
and change the commit format to bold yellow, since that's the default
git log format for the commit when colored.
Closes#334
Copied from zimfw/git@013c9d9bf3
Stick with the following style:
* Header 1 with the module name is in `lowercase`.
* Other headers are in `Sentence case`. Common header names that should
be consistently used are `Aliases`, `Contributing`, `Functions`,
`Settings`, and `Zsh options`.
* The names `Zim` and `Zsh` always appear capitalized, even in the
middle of sentences.
* Prefer
print 'code indented with 4 spaces'
instead of
```zsh
print 'code fenced by lines with three back-ticks'
print 'unless you want syntax highlighting'
```
Prefer `setopt NO_FOO` instead of `unsetopt FOO`, as former is easier to
document in the README.
Stick with the following style for the README:
* Header 1 with the module name is in `lowercase`.
* Other headers are in `Sentence case`. Common header names that should
be consistently used are `Aliases`, `Contributing`, `Functions`,
`Settings`, and `Zsh options`.
as they are not required (not even recommended) to be set along with
`SHARE_HISTORY`. See zshoptions(1) on `SHARE_HISTORY`:
> This option ... also causes your typed commands to be appended to the
> history file (the latter is like specifying `INC_APPEND_HISTORY`,
> which should be turned off if this option is in effect). The history
> lines are also output with timestamps ala `EXTENDED_HISTORY` ...
Also update copy in comments and in the README. Stick with the following
style for the README:
* Header 1 with the module name is in `lowercase`.
* Other headers are in `Sentence case`. Common header names that should
be consistently used are `Aliases`, `Functions`, `Settings`, and
`Zsh options`.
* The names `Zim` and `Zsh` always appear capitalized, even in the
middle of sentences.
Closes#313
Add a first step to explicitly start the Zsh shell, as some issues were
reported before because users were skipping this. See #214 for example.
Also mention `~/.zlogin` as part of the uninstalling process.
Use the following formatting styles:
* Headers >1 are in `Sentence case`.
* The names `Zim` and `Zsh` always appear capitalized, even in the
middle of sentences.
* Prefer
code indented with 4 spaces
instead of
```
code fenced by lines with three back-ticks
```
Closes#315
namely, the `gfu` alias, the `git-branch-delete-interactive` function,
and a couple of commands that are shadowed.
Command `gm` was reported in #59, and `grc` was reported in #139.
Prevent main repo `git status` reporting submodules having new files.
New files are usually zcompiled zsh files.
There's no way to .gitignore from main repo specific files in submodules
Closes#297
Current code will create an archive in the current directory with:
% archive ../test.tar.gz test.*
or will complain that the following archive doesn't exist in the current
directory (given it actually exists in the parent one):
% unarchive ../test.tar.gz
Fix that and allow archives in any directory.
Other changes:
* Use `<required_param>` instead of `[required_param]` in the usage text
* Don't explictly check if archive exists in `unarchive`, but let the
respective tool fail with its own message
Closes#312
My fault, I removed them in commit 78611457, but they are necessary.
Without them, we are getting the following error when one of the
terminfo[] values is empty:
init.zsh:14: bad set of key/value pairs for associative array
Fixes#310