v1.0.0
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:
parent
edee218bb6
commit
dd84c41ae5
7 changed files with 18 additions and 19 deletions
2
LICENSE
2
LICENSE
|
@ -1,7 +1,7 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2015-2016 Matt Hamilton and contributors
|
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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
16
README.md
16
README.md
|
@ -3,7 +3,7 @@ Zsh IMproved FrameWork
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<a href="https://github.com/zimfw/zimfw">
|
<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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -41,11 +41,11 @@ Installing Zim is easy:
|
||||||
|
|
||||||
* With curl:
|
* 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:
|
* 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
|
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.
|
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
|
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`.
|
`~/.zim/zimfw.zsh`.
|
||||||
|
|
||||||
4. Add the lines in the following templates to the respective dot files:
|
4. Add the lines in the following templates to the respective dot files:
|
||||||
* [~/.zshenv](https://github.com/zimfw/install/blob/develop/src/templates/zshenv)
|
* [~/.zshenv](https://github.com/zimfw/install/blob/master/src/templates/zshenv)
|
||||||
* [~/.zshrc](https://github.com/zimfw/install/blob/develop/src/templates/zshrc)
|
* [~/.zshrc](https://github.com/zimfw/install/blob/master/src/templates/zshrc)
|
||||||
* [~/.zlogin](https://github.com/zimfw/install/blob/develop/src/templates/zlogin)
|
* [~/.zlogin](https://github.com/zimfw/install/blob/master/src/templates/zlogin)
|
||||||
* [~/.zimrc](https://github.com/zimfw/install/blob/develop/src/templates/zimrc)
|
* [~/.zimrc](https://github.com/zimfw/install/blob/master/src/templates/zimrc)
|
||||||
|
|
||||||
5. Install the modules defined in `~/.zimrc` and build the initialization scripts:
|
5. Install the modules defined in `~/.zimrc` and build the initialization scripts:
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ _zimfw_build_init() {
|
||||||
command mv -f ${ztarget}{,.old} || return 1
|
command mv -f ${ztarget}{,.old} || return 1
|
||||||
fi
|
fi
|
||||||
_zimfw_mv =(
|
_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})'
|
(( ${#_zfpaths} )) && print -R 'fpath=('${_zfpaths:P}' ${fpath})'
|
||||||
(( ${#_zfunctions} )) && print -R 'autoload -Uz '${_zfunctions}
|
(( ${#_zfunctions} )) && print -R 'autoload -Uz '${_zfunctions}
|
||||||
print -Rn ${(F):-source ${^_zscripts:P}}
|
print -Rn ${(F):-source ${^_zscripts:P}}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
_zimfw_upgrade() {
|
_zimfw_upgrade() {
|
||||||
local -r ztarget=${ZIM_HOME}/<%= script_filename %>
|
local -r ztarget=${ZIM_HOME}/zimfw.zsh
|
||||||
local -r zurl=https://raw.githubusercontent.com/zimfw/zimfw/develop/<%= script_filename %>
|
local -r zurl=https://raw.githubusercontent.com/zimfw/zimfw/master/zimfw.zsh
|
||||||
{
|
{
|
||||||
if (( ${+commands[wget]} )); then
|
if (( ${+commands[wget]} )); then
|
||||||
command wget -nv -O ${ztarget}.new ${zurl} || return 1
|
command wget -nv -O ${ztarget}.new ${zurl} || return 1
|
||||||
|
|
|
@ -12,7 +12,7 @@ Actions:
|
||||||
%Binstall%b Install new modules
|
%Binstall%b Install new modules
|
||||||
%Buninstall%b Delete unused modules
|
%Buninstall%b Delete unused modules
|
||||||
%Bupdate%b Update current modules
|
%Bupdate%b Update current modules
|
||||||
%Bupgrade%b Upgrade <%= script_filename %>
|
%Bupgrade%b Upgrade zimfw.zsh
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
%B-q%b Quiet, only outputs errors
|
%B-q%b Quiet, only outputs errors
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
<%
|
<%
|
||||||
class Zim
|
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
|
def initialize
|
||||||
@home = "${ZDOTDIR:-${HOME}}"
|
@home = "${ZDOTDIR:-${HOME}}"
|
||||||
@min_zsh_version = "5.2"
|
@min_zsh_version = "5.2"
|
||||||
@script_filename = "zimfw.zsh"
|
|
||||||
@startup_files_glob = ".z(shenv|shrc|login|logout)"
|
@startup_files_glob = ".z(shenv|shrc|login|logout)"
|
||||||
@version = "1.0.0-SNAPSHOT"
|
@version = "1.0.0"
|
||||||
@ellipsis = " ..."
|
@ellipsis = " ..."
|
||||||
@okay = "%F{green})%f "
|
@okay = "%F{green})%f "
|
||||||
@error = "x "
|
@error = "x "
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# MIT License
|
# MIT License
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015-2016 Matt Hamilton and contributors
|
# 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
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -263,7 +263,7 @@ _zimfw_compile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_zimfw_info() {
|
_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 'ZIM_HOME: '${ZIM_HOME}
|
||||||
print -R 'Zsh version: '${ZSH_VERSION}
|
print -R 'Zsh version: '${ZSH_VERSION}
|
||||||
print -R 'System info: '$(command uname -a)
|
print -R 'System info: '$(command uname -a)
|
||||||
|
@ -286,7 +286,7 @@ _zimfw_uninstall() {
|
||||||
|
|
||||||
_zimfw_upgrade() {
|
_zimfw_upgrade() {
|
||||||
local -r ztarget=${ZIM_HOME}/zimfw.zsh
|
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
|
if (( ${+commands[wget]} )); then
|
||||||
command wget -nv -O ${ztarget}.new ${zurl} || return 1
|
command wget -nv -O ${ztarget}.new ${zurl} || return 1
|
||||||
|
|
Loading…
Reference in a new issue