danhper / fundle

A minimalist package manager for fish shell
MIT License
375 stars 22 forks source link

[Suggestion] Local plugin - avoid update #40

Open BarbzYHOOL opened 6 years ago

BarbzYHOOL commented 6 years ago

If I symlink to my own plugin which is not on a repo, I can add in my config.fish "my_name/my_plugin" even if no repo exists

Then when I "fundle update" it will cause an error.

Maybe we could add an option like this:

fundle plugin my_name/my_plugin --local

It will not try to update it. Could also do it with a dummy file in the plugin directory called 'local' and then it would exclude it.

What do you think?

PS: atm I am not really able to submit PRs, I'm still a beginner with Fish but I write down my ideas in issues :P

hunter-richardson commented 5 years ago

My PR corrected this issue:

function update_fundle
  for i in (fundle list --short | grep -v '^my_name/my_plugin$')
    fundle update $i
  end
end

or, for multiples:

function update_fundle
  for i in (fundle list --short)
    switch $i
      case name1/plugin1 name2/plugin2 [etc...]
        continue
      case '*'
        fundle update $i
    end
  end
end

The given plugins would never get touched by update_fundle. (That doesn't mean you can't manually run fundle update my_name/my_plugin.)