Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The existence of this repo feels really hacky #1

Open
alichtman opened this issue Nov 19, 2021 · 3 comments
Open

The existence of this repo feels really hacky #1

alichtman opened this issue Nov 19, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@alichtman
Copy link
Member

# The invocation uses https://github.com/zdharma/null repo as a placeholder
# for the atclone'' and atpull'' hooks

zplugin ice as"program" pick"$ZPFX/sdkman/bin/sdk" id-as'sdkman' run-atpull \
  atclone"wget https://get.sdkman.io -O scr.sh; SDKMAN_DIR=$ZPFX/sdkman bash scr.sh" \
  atpull"SDKMAN_DIR=$ZPFX/sdkman sdk selfupdate" \
  atinit"export SDKMAN_DIR=$ZPFX/sdkman; source $ZPFX/sdkman/bin/sdkman-init.sh"
zplugin light zdharma/null

If we don't want to do a potentially complicated re-engineering, we can just add special handling for zinit light NULL or something, but I'd prefer to see a properly engineered solution.

@alichtman alichtman added the enhancement New feature or request label Nov 19, 2021
@alichtman alichtman changed the title This feels really hacky The existence of this repo feels really hacky Nov 19, 2021
@luong-komorebi
Copy link
Member

Utterly agree with you on this :)

@chuan137
Copy link

chuan137 commented Nov 30, 2021

Totally agree. Would be nice to have a simpler API handling the local scripts, sth like zinit light $local_dir, and make the $local_dir as working directory of the ices. The above example could be simplified to sth like

zinit for \
  as"program" pick"bin/sdk" \
  atclone"wget https://get.sdkman.io -O scr.sh; bash scr.sh" \
  atpull"sdk selfupdate"\
  atinit"source bin/sdkman-init.sh" \
  light-mode sdkman

@turboBasic
Copy link

turboBasic commented Jun 28, 2022

@chuan137 I think some extra command line option is required as $local_dir might conflict with static mapping of some Github repos to single word tokens (see here)

PS: as an afterthought I realised that it would fly if $local_dir is absolute path i.e. starts with /

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants