1
0
Fork 0
mirror of synced 2024-11-30 03:05:35 -05:00

chmod a+r init.zsh so all users can read it

This better allows a global instalation of Zim that can be sourced by
other users in the same machine.

See #486
This commit is contained in:
Eric Nielsen 2024-06-03 08:51:20 -05:00
parent 96f60da366
commit 9dc4056c4e
No known key found for this signature in database
GPG key ID: 678AF5E338C87D99
4 changed files with 12 additions and 5 deletions

View file

@ -12,6 +12,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Don't allow calling `zmodule` from the command line. Let it fail with "command - Don't allow calling `zmodule` from the command line. Let it fail with "command
not found" instead. It's inteded to be used only in the .zimrc script. not found" instead. It's inteded to be used only in the .zimrc script.
### Fixed
- Update error messages to hopefully make it clearer when either the git or the
degit tool is being used.
- Set read permissions to generated init.zsh script, so it can be read from
other users.
## [1.13.1] - 2024-04-28 ## [1.13.1] - 2024-04-28
### Fixed ### Fixed

View file

@ -7,6 +7,6 @@ _zimfw_mv() {
if [[ -e ${2} ]]; then if [[ -e ${2} ]]; then
command mv -f ${2}{,.old} || return 1 command mv -f ${2}{,.old} || return 1
fi fi
command mv -f ${1} ${2} && _zimfw_print -R $'<%= okay %><%= bold %>'${2}$':<%= normal %> Updated.'${_zrestartmsg} command mv -f ${1} ${2} && command chmod a+r ${2} && _zimfw_print -R $'<%= okay %><%= bold %>'${2}$':<%= normal %> Updated.'${_zrestartmsg}
fi fi
} }

View file

@ -4,7 +4,7 @@ class Zim
:bold, :normal, :red, :normalred, :yellow, :normalyellow, :clear_line, :ellipsis, :okay, :warn, :error :bold, :normal, :red, :normalred, :yellow, :normalyellow, :clear_line, :ellipsis, :okay, :warn, :error
def initialize def initialize
@version = "1.13.1" @version = "1.14.0-SNAPSHOT"
@home = "${ZDOTDIR:-${HOME}}" @home = "${ZDOTDIR:-${HOME}}"
@min_zsh_version = "5.2" @min_zsh_version = "5.2"
# Matches {ssh,http,https,git}://{user@,}host/org/repo and {user@,}host:org/repo # Matches {ssh,http,https,git}://{user@,}host/org/repo and {user@,}host:org/repo

View file

@ -46,7 +46,7 @@ _zimfw_mv() {
if [[ -e ${2} ]]; then if [[ -e ${2} ]]; then
command mv -f ${2}{,.old} || return 1 command mv -f ${2}{,.old} || return 1
fi fi
command mv -f ${1} ${2} && _zimfw_print -R $'\E[32m)\E[0m \E[1m'${2}$':\E[0m Updated.'${_zrestartmsg} command mv -f ${1} ${2} && command chmod a+r ${2} && _zimfw_print -R $'\E[32m)\E[0m \E[1m'${2}$':\E[0m Updated.'${_zrestartmsg}
fi fi
} }
@ -457,7 +457,7 @@ _zimfw_compile() {
} }
_zimfw_info() { _zimfw_info() {
print -R 'zimfw version: '${_zversion}' (built at 2024-05-30 14:34:14 UTC, previous commit is cdd9258)' print -R 'zimfw version: '${_zversion}' (built at 2024-06-03 13:45:11 UTC, previous commit is 96f60da)'
local zparam local zparam
for zparam in LANG ${(Mk)parameters:#LC_*} OSTYPE TERM TERM_PROGRAM TERM_PROGRAM_VERSION ZIM_HOME ZSH_VERSION; do for zparam in LANG ${(Mk)parameters:#LC_*} OSTYPE TERM TERM_PROGRAM TERM_PROGRAM_VERSION ZIM_HOME ZSH_VERSION; do
print -R ${(r.22....:.)zparam}${(P)zparam} print -R ${(r.22....:.)zparam}${(P)zparam}
@ -884,7 +884,7 @@ _zimfw_run_tool_action() {
zimfw() { zimfw() {
builtin emulate -L zsh -o EXTENDED_GLOB builtin emulate -L zsh -o EXTENDED_GLOB
local -r _zversion='1.13.1' _zversion_target=${ZIM_HOME}/.latest_version zusage=$'Usage: \E[1m'${0}$'\E[0m <action> [\E[1m-q\E[0m|\E[1m-v\E[0m] local -r _zversion='1.14.0-SNAPSHOT' _zversion_target=${ZIM_HOME}/.latest_version zusage=$'Usage: \E[1m'${0}$'\E[0m <action> [\E[1m-q\E[0m|\E[1m-v\E[0m]
Actions: Actions:
\E[1mbuild\E[0m Build \E[1m'${ZIM_HOME}$'/init.zsh\E[0m and \E[1m'${ZIM_HOME}$'/login_init.zsh\E[0m. \E[1mbuild\E[0m Build \E[1m'${ZIM_HOME}$'/init.zsh\E[0m and \E[1m'${ZIM_HOME}$'/login_init.zsh\E[0m.