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

48 commits

Author SHA1 Message Date
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
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
Lucas Sunsi
4b0a6f9c7c Source syntax-highlighting after completion
syntax-highlighting should be sourced after compinit (see
https://github.com/zsh-users/zsh-syntax-highlighting#why-must-zsh-syntax-highlightingzsh-be-sourced-at-the-end-of-the-zshrc-file),
and history-substring-search should be sourced after syntax-highlighting
(see https://github.com/zsh-users/zsh-history-substring-search#usage).

Closes #276
2018-05-31 19:17:04 -05:00
Eric Nielsen
4acd1b8533 Update comments in zimrc template
mainly to change "command correction prompts" to "spelling correction
prompt for commands" and make it clear that this is related to spelling
(and to the `SPROMPT` below that).
2018-04-24 08:59:58 -05:00
AtomicCoding
52604eb234 Add custom SPROMPT
Closes #263
2018-04-23 12:09:04 -05:00
Anton Shiryaev
acdb1d4bc7 Add .zimrc option 'zinput_mode'
Closes #261
2018-04-19 12:32:56 -05:00
Eric Nielsen
e0a7c679e0 [meta] Move zmanage to function in init.zsh
and delete the meta module altogether.

Also refactor `tools/zim_issue` to use `tools/zim_info`, use local
variables, and print the output directly without the need of the
intermediate `issue_md` array.

Closes #218
2017-11-24 19:08:39 -05:00
Eric Nielsen
a8244a555a [template] Add new templates/zlogin
that sources `login_init.zsh`.

Also refactor templates/zshrc to use a one-liner instead of if/then/fi.

Closes #218
2017-11-24 19:08:29 -05:00
Eric Nielsen
fc84b645e9 [template] Move templates/zlogin to login_init.zsh
so it's not a template anymore and can be under version control, instead
of being manually updated by the user, as currently is the case with
`~/.zlogin` and `${ZIM_HOME}/templates/zlogin`.

Closes #218
2017-11-24 19:08:25 -05:00
Eric Nielsen
55df5a4755 [template] Use zrecompile and create digest file
for the autoloaded functions. According to the `zshbuiltins`
documentation:

    Files containing multiple compiled functions are called `digest'
    files,  and are intended to be used as elements of the FPATH/fpath
    special array.

Compile all module init files, instead of some selected ones.
This didn't impact performance much (time to run async block in zlogin
when from 0.22s to 0.25s on my machine).

Also refactor the zim `init.zsh` script, and do not unset `zmodules`
anymore because we need it in zlogin.

Didn't manage to make adding the prompt `prompt_*_setup` functions to
the digest file work, so kept these separate.

Fixes #86. Closes #218.
2017-11-24 19:08:11 -05:00
Eric Nielsen
a4f6b757be [template] Add zcompile of git-info to zlogin
and declare `zim_mods` as a local variable.
Also minor formatting changes.

Closes #215
2017-09-26 15:23:30 +02:00
Eric Nielsen
2a9a003271 [template] don't compile highlighters test-data
for syntax-highlighting submodule. See discussion on
https://github.com/zsh-users/zsh-syntax-highlighting/pull/443

Fixes #205
2017-09-11 14:27:12 -05:00
Thiago Kenji Okada
f6bb75579f Allow arbitrary ZIM location with ZIM_HOME
This change allow arbitrary Zim location path by setting a new
environment variable, ZIM_HOME. If the user does not set it, Zim falls
back to the old "${ZDOTDIR:-${HOME}}/.zim" location.

Closes #203
2017-09-04 17:25:01 -05:00
Eric Nielsen
f97e43a39f Add git-info zmodule to templates/zimrc
so it is enabled by default in new Zim installations.

Closes #153
2017-03-27 13:56:47 -07:00
Matt Hamilton
cc34e3f310 [environment] add customizable term title
Adds customizable terminal/window title. Set `${ztermtitle}` in `.zimrc`
to use this functionality.

Check the notes added in templates/zimrc for additional usage info.

Closes #52
2017-01-21 08:54:32 -08:00
Eric Nielsen
0a9d105107 [utility] Simplify correction prompt config
For `setopt CORRECT`. Let the user uncomment a line with the `setopt`
directly in the configuration file, instead of having a flag variable
for it.

Closes #90
2016-10-25 16:12:40 -07:00
Matt Hamilton
c533afc0cb [template] zimrc: add meta module 2016-09-05 15:30:29 -07:00
Sandor Nagy
ce73d62764 [template] expand note of highlighter conflicts
Closes #68
2016-07-27 19:38:08 -07:00
Matt Hamilton
7439df5836 [input] add double-dot expansion option
Closes #49
2016-05-20 20:25:04 -07:00
Matt Hamilton
40cbc82ac3 [install] ignore escapes in user configs
closes issue #45
2016-05-15 09:01:03 -07:00
Matt Hamilton
4ac66646c4 [completion] add ${zcompdump_file} option
This commit assumes that the user-provided variable for the filename
will start with '.zcomp'. This is used in the .zlogin for zcompiling the
completion file. Sourcing the .zimrc file within the .zlogin file is
something I'd rather not do, and this seems like a good compromise. If
this becomes an issue, the file can be sourced an the var can be used
instead.

Closes #42
2016-04-16 14:56:53 -07:00
Matt Hamilton
03f15c4495 [fasd] add initial fasd support
[zlogin] zcompare fasd and all functions

[fasd] trim non-zsh options

[fasd] merge PR #75 from clvv/fasd

[fasd] partial merge PR #77 from clvv/fasd

This closes #24
2016-03-27 18:45:05 -04:00
Matt Hamilton
0fdfdef502 [zlogin] zcompare functions in custom/functions/* 2016-02-08 22:16:19 -05:00
Matt Hamilton
5cb0a51049 [template] expand note of highlighter conflicts 2016-01-28 08:51:21 -05:00
Matt Hamilton
acc3adffcb [utility] don't set zcorrection by default
The code in the utility module only checks if the value is 'true'. There
is no need to set it to 'false'; just don't set it at all.

This should make it easier to enable/disable (uncomment vs value
change).
2016-01-17 07:15:55 -05:00
Matt Hamilton
95cc94d9a0 [utility] add setopt correct option
This option can be enabled by setting `zcorrection='true'` in .zimrc

Closes #25
2016-01-17 07:08:08 -05:00
Matt Hamilton
bf10ce72c5 cleanup zlogin 2016-01-04 19:15:43 -05:00
Matt Hamilton
5237b76e81 grammar fixup 2015-12-31 11:17:51 -05:00
Matt Hamilton
a599a63ccd leave ssh ids up to user 2015-12-31 11:13:39 -05:00
Matt Hamilton
ef8e4bd3be remove zcompare's return
No need to make returns for tests that we aren't making success/failure
checks for; the function itself deals with what needs to be zcompiled.
2015-12-31 11:09:08 -05:00
Matt Hamilton
7f0dc26de3 fix typo in zimrc template 2015-12-29 14:53:26 -05:00
Matt Hamilton
534e627331 cleanup pacman module and options 2015-12-29 14:51:08 -05:00
Matt Hamilton
c3130eda38 disabling 'cursor' breaks color changes
the 'cursor' highlighter needs to be enabled for character color changes
to take place beneath the cursor on non-(u)rxvt terminals.

Partial revert of ab99776
2015-12-29 05:00:48 -05:00
Matt Hamilton
ab99776d4e Disable 'cursor' as default highlighter
'cursor' isn't super useful and causes problems with rxvt.

Also make note of where documentation can be found for the various
highlighters.
2015-12-29 04:47:25 -05:00
Matt Hamilton
fb7defa729 cleanup of zlogin
Change the scope of the job: {} to (); removes need for unfunction

Because we changed the job scope, we no longer need the anonymous
function/local var.
2015-12-28 03:11:39 -05:00
ishitatsuyuki
3ddc1703af Fix zlogin typos 2015-12-27 18:14:35 +09:00
Matt Hamilton
7d8601089a zcompile custom init.zsh; this may become large 2015-12-22 06:26:54 -05:00
Matt Hamilton
65841b002b add 'custom' module to default zmodules 2015-12-22 05:56:56 -05:00
Matt Hamilton
b0bf9d2ebc load-time optimizations 2015-12-20 20:42:48 -05:00
Matt Hamilton
a632bff0e5 remove ssh from default modules 2015-12-20 19:25:11 -05:00
Matt Hamilton
a1a56ac63f use consistent variable style 2015-12-19 09:48:29 -05:00
Matt Hamilton
9c9d1ac779 eriner prompt requires fonts; use steeef 2015-12-18 10:13:38 -05:00
Matt Hamilton
3633ffa7d1 fix history-sustring-search typo 2015-12-17 12:28:27 -05:00
Matt Hamilton
8e4fc03038 update completion docs to reflect zmodules order 2015-12-17 03:06:12 -05:00
Matt Hamilton
f448c6663e zcompile .zshrc 2015-12-16 02:23:18 -05:00
Matt Hamilton
6ca71da68d update documentation and enable input module by default 2015-12-16 01:22:33 -05:00
Matt Hamilton
6bab0875fd update template .zimrc 2015-12-15 18:51:28 -05:00
Matt Hamilton
3a62391e0e initial commit 2015-12-15 00:12:17 -05:00