danhper/fundle

[Suggestion] Local plugin - avoid update

BarbzYHOOL opened this issue · 1 comments

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

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.)