Zimfw: installation difficult

Created on 11 Dec 2019  路  8Comments  路  Source: zimfw/zimfw

Can you reduce install steps into 1 (max)?

"Installation is easy"

step 2

  • wondering why it exists. it works only under one shell. how can you deploy on servers or containers. how to deploy remotely with default shells not zsh.

step 3 "this is only needed once,"

  • i pray. one system detected changes and informed about reverting them later.
    Warning: settings changed through the CLI are not written to
    the configuration database and will be reset on reboot.

really surprised how frameworks supposed to make life easy create new complexity.
looking for a solution which installs zsh with the completion/suggestions/etc with one command, zsh to fish in one command, that's it. without git, npm and other 100s of MB of packages. so far 99% of managers are good only for developer machines and im in the end of the list already.

Most helpful comment

@gitthangbaby could you try to be less offensive in your writing? Your writing reads demanding and I think it's not fair to address @ericbn and any other person who puts his free time in trying to build a great piece of software, in this manner.

You have nothing to demand or expect here and are free to move on anytime you like.

If you think that improvements can be made, I suggest you create a Pull Request with some great code, or kindly ask if it is possible and in the spirit of this project if things can be changed as you'd like it.

All 8 comments

Hi @gitthangbaby, we're just working on improving Zim, and this includes making installation easy.

Please check https://github.com/zimfw/zimfw/tree/develop (the develop branch)

You will need git, and also curl or wget. Which minimum requirements are you looking for?

that looks much better, just one curl|sh git-less command. there's cool factor about it, i remember ohmyzsh slap similar easy install command on their website and people love to copy paste it. but the other reason is practical - there's no git on many systems. new workstations, VMs, dockers, linux containers, bsd jails, all of this is without git. also git/npm install size is huge, multiply per each install, ouch.

so yes, i have a different view how a framework should work after trying them all.

  1. install with one command
  2. provide a framework command to operate it ( plugin, theme control )
  3. hep with sane choices <-THIS!

now that 1) is not an issue
i found 2) is not enough - there's so many plugins, conficliting with each other that it creates one huge mix of duplicit behaviours, plugins fighting for bindkeys.
that i think 3) gets most important. this should make the highest values. having all setup right way. something like slimzsh. have a wizard or config profiles which has sourcing of scripts, bindkeys done right.
imagine:
zim profile blank #default settings, just framework becomes available
fish #fish like setup
navigator #strong CLI profile, feat fasd+fzf

profiles could add extra zmodload/zstyle tweaks e.g. add search into completion.

i believe setting up zsh right is of the highest value.. not just installing thousands of plugins/themes. what do you think? fish is doing it right, zsh emulates and it's not easy. we need help.

currently i decided to install packages manually:

  • zsh autosuggestions
  • zsh completions (super slow)
  • zsh navigation tools (conflicting with fasd and fzf)
  • zsh syntax highlightning
  • fasd (for the "," autocomplete)
  • fzf (for their 3 quick menus)
    and their source files.
    when i look at the execution, i see the horror of overwriting each settings, replacing the bindkeys, changes in the beginning of .zshrc are not valid in the end of .zshrc.
    mixture of navigation-tools conflicting with fasd which conflicts with fzf, super slow completion.
    doesn't feel right.
    hope 'zim profile' command will exist!
  1. install with one command
  2. provide a framework command to operate it ( plugin, theme control )
  3. hep with sane choices <-THIS!

We just released Zim 1.0.0, and I dare to say it's the first Zsh project to provide the 3 items above you mentioned.

As for providing "sane choices", the way we're doing it is by providing pre-installed modules with a pre-defined sane configuration, and adding a minimal set of configuration options to the modules for further customization.

Asking for novice users for which customization/profile they want to have installed may be scary in terms of asking questions that the user might not be sure which one he/she wants to choose at first. I like to think we're doing something for Zsh like Tim Pope is doing for Vim with vim-sensible.

There should be no conflicts if you're sourcing the modules in the "right" order. Preconditions or conflicts are usually documented in the respective modules' README.md files.

time to test!
so i removed .zshrc, then installer then claims no other framworks exist
installation was "succesful" without git present, therefore full of errors, i'd put a check there
installation with git successfull, no errors, but no change in shell at all
so i do zimfw build and notice this errors:

_zimfw_build_init:10: unrecognized modifier `P'

i remove modifiers from line 8 and 10, perhaps it's older zsh version, and now finally shell is different
zmodule, previously functioning, now disappears:

zsh: command not found: zmodule

then i want to change the prompt, no prompt -l or similar use. have to edit file then load with zimfw then reload shell. could be one action.
did the change this way, and nothing changed. realized .zimrc has duplicit config content inside. removed it and now it works.
installing plugins seems uncomfortable too. the plugin doesnt know what is installed, cannot list it. theres no 'zimfw list'. that's weird as the plugins are clearly in the single folder.
so i dont like the manual installation of prompt and plugins at all, but i like that initial setup (ex bugs) is actually setting up everything even on a platform that cannot have zsh-* packages installed, and with old zsh. that is a big plus for jails, and many headless installs.
lets try second install
no errors, but zimfw build is reuired for changes to take effect.
lets change prompt, i mean this is seriously uncomfortable, not only you need to change the .zimrc file but that's not enough, you need to build, and that's still not enough, you need to reload zsh! for a prompt. zimfw install, same errors, remove P modifier, retry, all good.
compinit could be loaded.
third run: add all .zshrc contenxt except ohmyzsh chunk, and get missing ohmyzsh stuff. so i have to put 'module url', then recompile. no command for that again. after that zsh loads with the new stuff. just needs fg10 fix for autosuggestions, which wasn't needed before. on the other side, compinit is now loaded.
i'd welcome some fasd/fzf stuff to replace pathetic default CtrlR behaviour.

sounding critiical, but the goal is met. it is the best framework for one command install. there are suggestions, completion, highlighting etc out of the box.
worse for modifications. too tricky. i'd imagine 'zimfw install' being done automatically and modify known modules via command line, and add new modules also via command line. perhaps be able to do:

curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
zimfw install https://github.com/romkatv/powerlevel10k.git
zsh

Git is required to install, I've updated the install script to check if git is installed.

Which version of Zsh are you using?

We've dropped support to promptinit. External themes hardly support it, as I examined here. And many prompts will actually require the user to restart the shell anyway after changing its configuration. Plus, once a user settles down with a prompt, we don't expect that he/she will be changing it very frequently after that.

Good.

Using zsh5.2.2, max version for Synology users. No other problem with this version at all. Not worth of dropping those many users for one syntax gimmick.

Nice analysis. I'd like to give some examples also:
antigen - easy to change prompt, it's same as zmodule, however for some reason, zmodule is banned from CLI
fisher - that's how easy the work with plugin could be (add, remove, ls) on CLI
omf - list and apply "theme" on CLI easily

I'll try to reproduce the issue with the zshusers/zsh:5.2 Docker image.

As for zmodule, it's a good idea to let it be executed in the command line and initialize the given module just for the session, as antigen does. This should help with experimenting with different themes or plugins without needing to restart the shell.

@gitthangbaby could you try to be less offensive in your writing? Your writing reads demanding and I think it's not fair to address @ericbn and any other person who puts his free time in trying to build a great piece of software, in this manner.

You have nothing to demand or expect here and are free to move on anytime you like.

If you think that improvements can be made, I suggest you create a Pull Request with some great code, or kindly ask if it is possible and in the spirit of this project if things can be changed as you'd like it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cattyhouse picture cattyhouse  路  4Comments

Eriner picture Eriner  路  9Comments

sQVe picture sQVe  路  13Comments

oscu0 picture oscu0  路  5Comments

sodiumjoe picture sodiumjoe  路  7Comments