1
0
Fork 0
mirror of synced 2024-06-15 05:21:09 -04:00
Changes:
*  Reduce the Zim "core" to a single file
*  Simplify installation with an installation script (Closes #182)
*  Put the configuration into .zshrc instead of a separate .zimrc
   (Closes #288)
*  Do not support themes that require promptinit (See #325)
*  Generate a static script that does autoload the functions and source
   the modules

This version is not backwards-compatible with previous versions, so a
new installation of Zim is required.
This commit is contained in:
Eric Nielsen 2020-01-02 13:05:53 -05:00
parent edee218bb6
commit dd84c41ae5
No known key found for this signature in database
GPG key ID: 47D1DBFA0765A1FB
7 changed files with 18 additions and 19 deletions

View file

@ -1,7 +1,7 @@
MIT License
Copyright (c) 2015-2016 Matt Hamilton and contributors
Copyright (c) 2016-2019 Eric Nielsen, Matt Hamilton and contributors
Copyright (c) 2016-2020 Eric Nielsen, Matt Hamilton and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -3,7 +3,7 @@ Zsh IMproved FrameWork
<div align="center">
<a href="https://github.com/zimfw/zimfw">
<img width=650px src="https://zimfw.github.io/images/zim_banner.png">
<img width="650" src="https://zimfw.github.io/images/zim_banner.png">
</a>
</div>
@ -41,11 +41,11 @@ Installing Zim is easy:
* With curl:
curl -fsSL https://raw.githubusercontent.com/zimfw/install/develop/install.zsh | zsh
curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
* With wget:
wget -nv -O - https://raw.githubusercontent.com/zimfw/install/develop/install.zsh | zsh
wget -nv -O - https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
Open a new terminal and you're done! Enjoy your Zsh IMproved! Take some time to
read about the [available modules] and tweak your `.zshrc` file.
@ -63,14 +63,14 @@ If you have a different shell framework installed (like oh-my-zsh or prezto),
chsh -s =zsh
3. Copy https://raw.githubusercontent.com/zimfw/zimfw/develop/zimfw.zsh to
3. Copy https://raw.githubusercontent.com/zimfw/zimfw/master/zimfw.zsh to
`~/.zim/zimfw.zsh`.
4. Add the lines in the following templates to the respective dot files:
* [~/.zshenv](https://github.com/zimfw/install/blob/develop/src/templates/zshenv)
* [~/.zshrc](https://github.com/zimfw/install/blob/develop/src/templates/zshrc)
* [~/.zlogin](https://github.com/zimfw/install/blob/develop/src/templates/zlogin)
* [~/.zimrc](https://github.com/zimfw/install/blob/develop/src/templates/zimrc)
* [~/.zshenv](https://github.com/zimfw/install/blob/master/src/templates/zshenv)
* [~/.zshrc](https://github.com/zimfw/install/blob/master/src/templates/zshrc)
* [~/.zlogin](https://github.com/zimfw/install/blob/master/src/templates/zlogin)
* [~/.zimrc](https://github.com/zimfw/install/blob/master/src/templates/zimrc)
5. Install the modules defined in `~/.zimrc` and build the initialization scripts:

View file

@ -5,7 +5,7 @@ _zimfw_build_init() {
command mv -f ${ztarget}{,.old} || return 1
fi
_zimfw_mv =(
print -R "zimfw() { source ${ZIM_HOME}/<%= script_filename %> \"\${@}\" }"
print -R "zimfw() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
(( ${#_zfpaths} )) && print -R 'fpath=('${_zfpaths:P}' ${fpath})'
(( ${#_zfunctions} )) && print -R 'autoload -Uz '${_zfunctions}
print -Rn ${(F):-source ${^_zscripts:P}}

View file

@ -1,6 +1,6 @@
_zimfw_upgrade() {
local -r ztarget=${ZIM_HOME}/<%= script_filename %>
local -r zurl=https://raw.githubusercontent.com/zimfw/zimfw/develop/<%= script_filename %>
local -r ztarget=${ZIM_HOME}/zimfw.zsh
local -r zurl=https://raw.githubusercontent.com/zimfw/zimfw/master/zimfw.zsh
{
if (( ${+commands[wget]} )); then
command wget -nv -O ${ztarget}.new ${zurl} || return 1

View file

@ -12,7 +12,7 @@ Actions:
%Binstall%b Install new modules
%Buninstall%b Delete unused modules
%Bupdate%b Update current modules
%Bupgrade%b Upgrade <%= script_filename %>
%Bupgrade%b Upgrade zimfw.zsh
Options:
%B-q%b Quiet, only outputs errors

View file

@ -1,13 +1,12 @@
<%
class Zim
attr_reader :home, :min_zsh_version, :script_filename, :startup_files_glob, :version, :ellipsis, :okay, :error, :done, :failed
attr_reader :home, :min_zsh_version, :startup_files_glob, :version, :ellipsis, :okay, :error, :done, :failed
def initialize
@home = "${ZDOTDIR:-${HOME}}"
@min_zsh_version = "5.2"
@script_filename = "zimfw.zsh"
@startup_files_glob = ".z(shenv|shrc|login|logout)"
@version = "1.0.0-SNAPSHOT"
@version = "1.0.0"
@ellipsis = " ..."
@okay = "%F{green})%f "
@error = "x "

View file

@ -4,7 +4,7 @@
# MIT License
#
# Copyright (c) 2015-2016 Matt Hamilton and contributors
# Copyright (c) 2016-2019 Eric Nielsen, Matt Hamilton and contributors
# Copyright (c) 2016-2020 Eric Nielsen, Matt Hamilton and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@ -263,7 +263,7 @@ _zimfw_compile() {
}
_zimfw_info() {
print 'Zim version: 1.0.0-SNAPSHOT (previous commit is 94526d6)'
print 'Zim version: 1.0.0 (previous commit is edee218)'
print -R 'ZIM_HOME: '${ZIM_HOME}
print -R 'Zsh version: '${ZSH_VERSION}
print -R 'System info: '$(command uname -a)
@ -286,7 +286,7 @@ _zimfw_uninstall() {
_zimfw_upgrade() {
local -r ztarget=${ZIM_HOME}/zimfw.zsh
local -r zurl=https://raw.githubusercontent.com/zimfw/zimfw/develop/zimfw.zsh
local -r zurl=https://raw.githubusercontent.com/zimfw/zimfw/master/zimfw.zsh
{
if (( ${+commands[wget]} )); then
command wget -nv -O ${ztarget}.new ${zurl} || return 1