Package Details: zsh-zim-git r682.84c59ed-1

Git Clone URL: https://aur.archlinux.org/zsh-zim-git.git (read-only, click to copy)
Package Base: zsh-zim-git
Description: ZIM - Zsh IMproved
Upstream URL: https://github.com/zimfw/zimfw
Keywords: improved plugin theme vim zim zsh
Licenses: MIT
Submitter: ishitatsuyuki
Maintainer: carbolymer (Rhinoceros)
Last Packager: carbolymer
Votes: 18
Popularity: 0.000000
First Submitted: 2015-12-28 02:13 (UTC)
Last Updated: 2024-10-10 07:25 (UTC)

Dependencies (4)

Required by (1)

Sources (5)

Pinned Comments

carbolymer commented on 2021-01-11 21:41 (UTC) (edited on 2021-01-22 07:46 (UTC) by carbolymer)

Ugh, it was a PITA to create this package. Please note that errors are silenced, so if you have any issues with zim, remove &>/dev/null from your /etc/zshrc - https://aur.archlinux.org/cgit/aur.git/tree/zshrc?h=zsh-zim-git&id=5a378e94d516c57d39629de545b78b0f020d86a4

I had to do it this way: $ZIM_HOME is only writable by root and zim constantly tries to update & recompile itself (=write to $ZIM_HOME), which results in permission errors when starting zsh as a normal user.

If you want to add/remove a module:

  1. Add a respective zmodule in /etc/zsh/zimrc
  2. Run as root: zimfw install && zsh

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 Next › Last »

carbolymer commented on 2021-01-13 18:15 (UTC) (edited on 2021-01-13 18:16 (UTC) by carbolymer)

I've cloned zshmarks to /usr/lib/zim/modules then added zmodule zshmarks to /etc/zsh/zimrc, then sudo zsh then zimfw install && zsh and it works.

The command which causes

mv: cannot move '/usr/lib/zim/init.zsh' to '/usr/lib/zim/init.zsh.old': Permission denied

is zrecompile which is necessary I think. The only workaround is to silence this error.

I've added a patch for part of force update you suggested though, thanks for the hint!

Rhinoceros commented on 2021-01-13 03:22 (UTC)

Another bit of weirdness. After updating the package, I have to touch ~/.zimrc in order for it to be sourced in the future at all. It might be related to line 55 of /usr/lib/zim/zimfw.zsh?

  # Force update of init.zsh if it's older than .zimrc

This might need to be patched for installation by a package manager.

Also, regarding the general suppression of error messages, I wonder if a cleaner way would be to patch out the specific command that causes the error

mv: cannot move '/usr/lib/zim/init.zsh' to '/usr/lib/zim/init.zsh.old': Permission denied

FWIW I only ever get this one error. I had a brief look, and I think the command might also be in /usr/lib/zim/zimfw.zsh.

Rhinoceros commented on 2021-01-12 09:31 (UTC)

Thanks again @carbolymer! Manually sourceing powerlevel10k works perfectly. By your GitHub link, did you mean this alternative would require installing powerlevel10k without pacman? I'd much prefer for the package manager to keep everything updated, so if so I'll just use the manual way instead.

On a related note, might you have any suggestions for how to get zshmarks working? I'm the maintainer. Previously I just symlinked the entire project directory into /usr/lib/zim/modules/zshmarks, then edited ~/.zimrc to add zshmarks to the zmodules array, but this no longer works. I tried zmodule zshmarks instead, but this also fails.

Actually, the post after your link suggests this should work, but it doesn't seem to be working for me.

carbolymer commented on 2021-01-12 08:25 (UTC) (edited on 2021-01-12 08:38 (UTC) by carbolymer)

@Rhinoceros, thanks for the hint. I've added it to the package.

I've checked powerlevel10k, and it works fine without zim interaction i.e. I've installed aur package and added

source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme

to /etc/zsh/zshrc below lines sourcing zim.

If you would like to use zim, this also works for me: https://github.com/zimfw/zimfw/issues/368#issuecomment-631520836 but you need to add this zmodule to /etc/zsh/zimrc (which is symlinked by ~root/.zimrc) and then do zimfw install

Rhinoceros commented on 2021-01-12 07:05 (UTC)

Thanks so much @carbolymer! This seems to work well, although I had some problems with my old ~/.zimrc. I had to remove the error suppression in /etc/zsh/zshrc to figure out the problem.

Do you know what the syntax is now to use pacman-installed modules? In the past I linked the files, e.g.

# ln -s /usr/share/zsh-theme-powerlevel10k /usr/lib/zim/modules/prompt/external-themes/powerlevel10k
# ln -s /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme /usr/lib/zim/modules/prompt/functions/prompt_powerlevel10k_setup

then put zprompt_theme='powerlevel10k' into ~/.zimrc, but this now fails silently. I tried zmodule powerlevel10k instead, but this fails with

x /home/rhinoceros/.zimrc:34:powerlevel10k: Not installed. Run zimfw install to install.
Failed to source /home/rhinoceros/.zimrc

I also had one minor suggestion. Instead of using + as a sed delimiter, which will break if this character is in filenames, you could instead use parameter expansion to prevent this limitation.

(Also, there was some discussion here regarding packaging that you might like to contribute to.) Thanks again!

carbolymer commented on 2021-01-11 21:41 (UTC) (edited on 2021-01-22 07:46 (UTC) by carbolymer)

Ugh, it was a PITA to create this package. Please note that errors are silenced, so if you have any issues with zim, remove &>/dev/null from your /etc/zshrc - https://aur.archlinux.org/cgit/aur.git/tree/zshrc?h=zsh-zim-git&id=5a378e94d516c57d39629de545b78b0f020d86a4

I had to do it this way: $ZIM_HOME is only writable by root and zim constantly tries to update & recompile itself (=write to $ZIM_HOME), which results in permission errors when starting zsh as a normal user.

If you want to add/remove a module:

  1. Add a respective zmodule in /etc/zsh/zimrc
  2. Run as root: zimfw install && zsh

eschwartz commented on 2021-01-06 02:11 (UTC)

@mattia,

I can't even call these changes anything other than outright malware. Force reverting and purging from history, disowning, do not do this sudo curl | zsh nonsense ever again, do not rewrite PKGBUILDs to not actually package anything, do not download unchecksummed sources outside of source=() and mysteriously execute them like this.

Rhinoceros commented on 2021-01-03 22:44 (UTC)

@mattia makepkg really shouldn't require sudo. It should be capable of creating a package in a user-owned location. In any case, I'm not sure what the purpose of this sudo is in the PKGBUILD. It's just for the curl right? Why would that need sudo? Finally, it looks like the PKGBUILD attempts to directly run install.zsh from upstream. Doesn't that immediately attempt to install zim rather than place it into the pkgdir? Running makepkg certainly shouldn't be creating anything at /usr/lib/zim!

FWIW there's been an extensive discussion upstream on how to fix this broken package, but there was no resolution.

<deleted-account> commented on 2021-01-03 16:51 (UTC)

@carbolymer now it should go, I forgot a sudo. Thanks so much for the warning

carbolymer commented on 2021-01-03 12:25 (UTC) (edited on 2021-01-03 12:25 (UTC) by carbolymer)

this package is broken

mkdir: cannot create directory ‘/usr/lib/zim’: Permission denied

x Could not download the Zim script to /usr/lib/zim/zimfw.zsh