Giter VIP home page Giter VIP logo

Comments (13)

sudormrfbin avatar sudormrfbin commented on June 16, 2024 1

This works fine for me:

% mkdir ~znap/schrej
% touch ~znap/schrej/schrej.zsh-theme
% znap prompt schrej

It might be a good idea to include this in the example .zshrc for visibility (maybe with starship prompt). Great plugin manager btw :)

from zsh-snap.

marlonrichert avatar marlonrichert commented on June 16, 2024 1

@schrej @FardeenCodes @gokulsoumya You can now call znap prompt without arguments to instantly show whatever (custom) prompt you currently have.

Additionally, I added an example of how you can use znap eval to source individual files from the web, without having to clone any repos:

znap eval omz-git \
    'curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/plugins/git/git.plugin.zsh'

from zsh-snap.

marlonrichert avatar marlonrichert commented on June 16, 2024

Can you give me some examples of plugins for which you have to use curl or wget? Then I can test with those. Likewise, what snippets would you like to use?

from zsh-snap.

FardeenCodes avatar FardeenCodes commented on June 16, 2024

Like I want to use Oh My Zsh git plugin(https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git)
so i can download it in a directory with wget or curl and then link it with znap or an option to download it with znap only
I have called snippet from Zinit (https://github.com/zdharma/zinit)

from zsh-snap.

marlonrichert avatar marlonrichert commented on June 16, 2024

I looked into it and it looks like I will need git sparse-checkout for this. However, since that subcommand is still labeled as "experimental", I will put this on the back burner for the moment. I will get back to it once the feature stabilizes.

from zsh-snap.

schrej avatar schrej commented on June 16, 2024

I think the initial idea was to be able to include plugins from the local filesystem, skipping the git clone logic.

For example: I have a custom zsh theme that I store in $DOTFILES/.themes/schrej.zsh-theme. Znap doesn't seem to allow me to include that right now, but I'd like to.
An easy way to solve this might be to allow using absolute paths (beginning with / or ~) instead of repository names.

from zsh-snap.

marlonrichert avatar marlonrichert commented on June 16, 2024

@schrej What features from Znap would you like to use with plugins on your local file system? Can you give me some examples of what you would expect to be able to put into your .zshrc file or type on the command line?

from zsh-snap.

FardeenCodes avatar FardeenCodes commented on June 16, 2024

Znap source and znap prompt

from zsh-snap.

schrej avatar schrej commented on June 16, 2024

Primarily I'd like to be able to do znap prompt $DOTFILES/.themes/schrej.zsh-theme to load my zsh theme to speed up the startup.

from zsh-snap.

marlonrichert avatar marlonrichert commented on June 16, 2024

This works fine for me:

% mkdir ~znap/schrej
% touch ~znap/schrej/schrej.zsh-theme
% znap prompt schrej

from zsh-snap.

marlonrichert avatar marlonrichert commented on June 16, 2024

This works, too:

% mkdir ~znap/.themes
% touch ~znap/.themes/schrej.zsh-theme
% znap prompt .themes schrej

from zsh-snap.

marlonrichert avatar marlonrichert commented on June 16, 2024

@FardeenCodes @schrej Did you try the above?

from zsh-snap.

schrej avatar schrej commented on June 16, 2024

Sorry @marlonrichert, I forgot to try it. It's working well, thank you!
Being able to just provide a full path to that command would be more convenient imo, but it's fine this way as well.

from zsh-snap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.