1
0
Fork 0
mirror of synced 2024-11-18 05:55:34 -05:00
Commit graph

40 commits

Author SHA1 Message Date
Eric Nielsen
bccb1fce63
Add manual installation to README.md 2019-12-04 07:22:17 -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
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
Eric Nielsen
a1291c5f28 Stop supporting themes that require prompinit
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
2019-01-25 07:33:56 -05:00
Eric Nielsen
14fa63e148 Update README.md with automatic installer
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.
2019-01-10 19:59:04 -05:00
Eric Nielsen
4c14cb0f73 Add a plugin mechanism \o/
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.
Closes #33, closes #138, closes #262, closes #277, closes #281.

Some discussion topics that I think are worth considering before merging
this:
- [ ] Reduce the Zim "core" to a single file?
- [ ] Simplify installation? With an installation script? (See #182)
- [ ] Put the configuration into `.zshrc` instead of a separate `.zimrc`?
  (See #288)
- [ ] Rerun the Eriner/zsh-framework-benchmark?

I suggest we create individual GitHub issues/PRs to start the separate
discussions.

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.

I strongly recommend you install this from scratch in a separate
directory, instead of checking out `develop` in your current Zim
installation repo.
2019-01-07 18:25:34 -05:00
Eric Nielsen
5371975f37 Update README.md instructions
> You should never have a pipeline both reading from and writing to a file.

My bad. See https://stackoverflow.com/a/25335116/2654518

Fixes #316
2019-01-05 18:18:42 -05:00
Eric Nielsen
b4ae40652d Update README.md instructions and formatting
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
2018-12-15 07:58:03 -05:00
Eric Nielsen
a05890e8b4
Use cat to concatenate files in installation
Update installation instructions in README.md to use cat. Also add blank
lines at the end (instead of beginning) of template files, since they're
prepended (not appended) to existing files.

See difference of output between print and cat (zlogin having a blank
like at the end):

    % print -rn "$(<zlogin)$(<test)"
    #
    # User configuration sourced by login shells
    #

    # Initialize zim
    [[ -s ${ZIM_HOME}/login_init.zsh ]] && source ${ZIM_HOME}/login_init.zsh# Hello world
    % cat zlogin test
    #
    # User configuration sourced by login shells
    #

    # Initialize zim
    [[ -s ${ZIM_HOME}/login_init.zsh ]] && source ${ZIM_HOME}/login_init.zsh

    # Hello world

Fixes #94. Fixes #280. Closes #300
2018-11-21 11:58:30 -05:00
Eric Nielsen
d371d80af2
Unify the for syntax
For short single commands, prefer a one-liner `for` with the zsh syntax:
```
for x (foo bar) print ${x}
```
Otherwise just place `; do` on the same line as the POSIX `for ... in`:
```
for x in foo bar; do
  print ${x}
done
```

Closes #268
2018-04-25 08:59:19 -05:00
Andrés Calabrese
2a7797c2da Remove old link to meta module in README
Meta module was removed in e0a7c67

Closes #255
2018-04-03 08:52:04 -05:00
Brottweiler
6f8be83920 Update to new repo URL
from `Eriner/zim` to the new `zimfw/zimfw`.

Closes #238
2018-01-03 10:30:12 -05:00
Matt Hamilton
2214494881 [Readme] add update and removal notes
Closes #50
2016-09-05 15:36:50 -07:00
Matt Hamilton
609d94e949 [README] remote note about AUR package
This package is causing issues, and editing Zim to allow for use in this
'packaged' format would be a pain. Installing into your home directory
is the best method of installation.
2016-06-12 11:10:36 -07:00
Matt Hamilton
40cbc82ac3 [install] ignore escapes in user configs
closes issue #45
2016-05-15 09:01:03 -07:00
Matt Hamilton
be2e54c0fc [README] create template file if it doesn't exist 2016-02-11 03:08:40 -05:00
Matt Hamilton
e0fb98242c [README] note install via AUR package 2016-02-06 15:49:08 -05:00
Matt Hamilton
9075729ac3 more elegant chsh 2016-01-31 18:08:00 -05:00
Matt Hamilton
20d84ab79d read from ${commands} rather than subshell 2015-12-31 10:54:57 -05:00
Matt Hamilton
dd2806174f remove unused link 2015-12-29 13:44:52 -05:00
Matt Hamilton
1a7df80b5a s/http/https 2015-12-29 13:44:13 -05:00
Matt Hamilton
c5880eab94 Remove unnecessary braces 2015-12-29 11:34:38 -05:00
Matt Hamilton
fbb748252a Make note of prepend, silence error
If a file doesn't exist, "$(<nonexistent)" will write:
  zsh: no such file or directory: nonexistent
to fd 2. Wrap this with a "() 2>/dev/null" to silence these outputs.
2015-12-29 10:22:27 -05:00
Matt Hamilton
0f5ceab00a Prepend, don't append to user configs
We want to prepend the initialization of zim to any current user
configurations, not append. This way zim doesn't override any manually
configured settings in the user's config files.
2015-12-29 10:09:50 -05:00
Matt Hamilton
d6e2e24c17 make template append explicitly clear 2015-12-22 11:12:06 -05:00
Matt Hamilton
c4d607826c clarify install zsh shell 2015-12-19 16:53:09 -05:00
Matt Hamilton
a1a56ac63f use consistent variable style 2015-12-19 09:48:29 -05:00
Matt Hamilton
de3e74b9ca re-organize themes section, remove image 2015-12-18 13:46:16 -05:00
Matt Hamilton
5412919dc3 update link format 2015-12-18 13:41:58 -05:00
Matt Hamilton
4099909f8f link to speed wiki entry 2015-12-18 13:34:24 -05:00
Matt Hamilton
3fce9ee626 move themes to wiki, add links 2015-12-18 12:04:35 -05:00
Matt Hamilton
1675fd24c1 add theme images 2015-12-18 11:44:57 -05:00
Matt Hamilton
a15476e6c0 fix typos and structure 2015-12-18 07:40:58 -05:00
Matt Hamilton
3ccdaa967d update i.eriner.me links to https 2015-12-17 11:04:01 -05:00
Matt Hamilton
e9703d14a5 re-word project page 2015-12-17 08:06:26 -05:00
Matt Hamilton
48bb5a8a08 Add logo 2015-12-17 07:50:36 -05:00
Matt Hamilton
8c49ac4466 add link to modules wiki article 2015-12-16 18:00:14 -05:00
Matt Hamilton
06cca3e79d re-word "has to offer" 2015-12-15 19:36:05 -05:00
Matt Hamilton
15451eb0ad add gifs and images to README.md 2015-12-15 01:33:49 -05:00
Matt Hamilton
3a62391e0e initial commit 2015-12-15 00:12:17 -05:00