Comments (17)
That sounds cleaner to me. Reminds me of the old way of *.load
files.
from oh-my-fish.
Absolutely, I was going to suggest this! It totally makes sense!
from oh-my-fish.
👍
from oh-my-fish.
if we're going this route, should't we move 'em to /functions/*.fish
in the package directory?
from oh-my-fish.
@CoderStephen
Indeed it is, but changing the extension from .load
to .fish
. 👍
@bobthecow
My initial thought was backwards compatibility, but it's doable.
Later I thought about most plugins that only have one function, and we would now have an extra directory for a single function.
Well, I think it's going to be well structured if we go this route. So, let's do it. The init.fish
and uninstall.fish
should not go into the functions
dir, right?
from oh-my-fish.
Later I thought about most plugins that only have one function, and we would now have an extra directory for a single function.
I also think that we would like to implement a package description file (or function), where plugins can declare dependencies. This extra function
directory isn't a problem, it's the solution for separating concerns on plugin structure and loading just what the user will use.
from oh-my-fish.
Syntesizing what @bpinto is proposing + package.fish
idea, a sample plugin directory structure would look like:
- plugin-foobar
* init.fish
* uninstall.fish
* package.fish
- functions
* foo.fish
* bar.fish
By only adding functions
directory to autoloading paths we avoid loading unnecessary functions that are only used on load/init/uninstall.
from oh-my-fish.
That's it @derekstavis 👍
err... update, not really. :D
- plugin-foobar
* init.fish
* uninstall.fish
- functions
* foobar.fish
* foo.fish
* bar.fish
from oh-my-fish.
Hm, looks like it's identical, apart from just one file in functions
from oh-my-fish.
No package.fish
file.
from oh-my-fish.
Reviving this discussion, what about this?
- plugin-foobar
* init.fish
* uninstall.fish
* bundle
- completions
* foobar.fish
- functions
* foobar.fish
* foo.fish
* bar.fish
bundle
can be used for declaring dependencies, like package.json
.
from oh-my-fish.
if we leave $PACKAGENAME.fish
support in, plugins will work whether they've updated or not.
from oh-my-fish.
I think adding support for $PACKAGENAME.fish
is a temporary solution, but we should migrate them to improve loading time.
from oh-my-fish.
from oh-my-fish.
Nice. 👍
from oh-my-fish.
Time to migrate yours @CoderStephen ? 👍
from oh-my-fish.
Indeed. In the next few days.
from oh-my-fish.
Related Issues (20)
- Installation failure from curl on Pop-os HOT 4
- 'omf install powerline' responding with "Please install powerline" and not being usable HOT 1
- Is this project active? HOT 2
- Installer checksum in README.md isn't up to date.
- Print error: failed to parse choice argument: 2- HOT 2
- Cannot omf update or install packages
- All plugins
- Z
- OMF's offline installation doesn't really work offline
- Theme not updating even after using command for theme change.
- This no longer supports Fish 2.2.0
- Can't change the theme HOT 1
- I just install OMF and installed the cyan theme and this happened HOT 2
- I see a `[I]` in my fish! HOT 2
- oh-my-fish crashes Garuda-Update process HOT 2
- Remove [I] in the prompt HOT 1
- Installer does not check `$OMF_PATH` permissions
- Prompt Encoding as Question Mark HOT 2
- OMF not found no matter how hard i try to install it HOT 3
- fish get broken after vim run top or else HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oh-my-fish.