From dd84c41ae517395999985f5c490fda9973b11507 Mon Sep 17 00:00:00 2001 From: Eric Nielsen Date: Thu, 2 Jan 2020 13:05:53 -0500 Subject: [PATCH] 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. --- LICENSE | 2 +- README.md | 16 ++++++++-------- src/stage2/29_zimfw_build_init.zsh.erb | 2 +- src/stage2/50_zimfw_upgrade.zsh.erb | 4 ++-- src/stage2/80_zimfw.zsh.erb | 2 +- src/zimfw.zsh.erb | 5 ++--- zimfw.zsh | 6 +++--- 7 files changed, 18 insertions(+), 19 deletions(-) diff --git a/LICENSE b/LICENSE index abf9ce6..f4f11d8 100644 --- a/LICENSE +++ b/LICENSE @@ -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 diff --git a/README.md b/README.md index 12170ae..ec9feb0 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Zsh IMproved FrameWork
- +
@@ -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: diff --git a/src/stage2/29_zimfw_build_init.zsh.erb b/src/stage2/29_zimfw_build_init.zsh.erb index c3a4c7e..0eb0994 100644 --- a/src/stage2/29_zimfw_build_init.zsh.erb +++ b/src/stage2/29_zimfw_build_init.zsh.erb @@ -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}} diff --git a/src/stage2/50_zimfw_upgrade.zsh.erb b/src/stage2/50_zimfw_upgrade.zsh.erb index d3b1c8a..497c2b8 100644 --- a/src/stage2/50_zimfw_upgrade.zsh.erb +++ b/src/stage2/50_zimfw_upgrade.zsh.erb @@ -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 diff --git a/src/stage2/80_zimfw.zsh.erb b/src/stage2/80_zimfw.zsh.erb index f276ebd..fe40543 100644 --- a/src/stage2/80_zimfw.zsh.erb +++ b/src/stage2/80_zimfw.zsh.erb @@ -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 diff --git a/src/zimfw.zsh.erb b/src/zimfw.zsh.erb index 5061aca..780c3a9 100644 --- a/src/zimfw.zsh.erb +++ b/src/zimfw.zsh.erb @@ -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 " diff --git a/zimfw.zsh b/zimfw.zsh index 85d7f57..75176c6 100644 --- a/zimfw.zsh +++ b/zimfw.zsh @@ -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