You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added a vendored lib loading routine in bash-it.sh
Added documentation on how to vendor libs in bash-it
Added and fixed plugins using preexec
Added tests for two plugins
Removed the old preexec lib
Copy file name to clipboardExpand all lines: docs/development.rst
+60Lines changed: 60 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,7 @@ The main ``bash_it.sh`` script loads the frameworks individual components in the
38
38
39
39
40
40
* ``lib/composure.bash``
41
+
* ``vendor/init.d/*.bash``
41
42
* Files in ``lib`` with the exception of ``appearance.bash`` - this means that ``composure.bash`` is loaded again here (possible improvement?)
42
43
* Enabled ``aliases``
43
44
* Enabled ``plugins``
@@ -78,6 +79,65 @@ Having the order based on a numeric priority in a common directory allows for mo
78
79
79
80
These items are subject to change. When making changes to the internal functionality, this page needs to be updated as well.
80
81
82
+
Working with vendored libs
83
+
--------------------------
84
+
85
+
Vendored libs are external libraries, meaning source code not maintained by Bash-it
86
+
developers.
87
+
They are ``git subtrees`` curated in the ``vendor/`` folder. To ease the work with git
88
+
vendored libs as subtrees we use the `git-vendor <https://github.com/Tyrben/git-vendor>`_ tool.
89
+
The `original repo<https://github.com/brettlangdon/git-vendor>`_ for git vendor is
90
+
unmaintained so for now we are recommending Tyrben's fork.
91
+
92
+
For more information on ``git vendor`` there are a short `usage description <https://github.com/Tyrben/git-vendor#usage>`_
93
+
in the repositories ``README`` file and a website for the original repository has a `manual page <https://brettlangdon.github.io/git-vendor/>`_ which is also included in both
94
+
repositories.
95
+
96
+
To support a flexible loading of external libraries, a file unique to the vendored
97
+
library must be placed in ``vendor/init.d/`` with the ``.bash`` extension.
98
+
99
+
Rebasing a feature branch with an added/updated vendored library
If your feature branch with a newly added/updated vendored lib has fallen behind master
103
+
you might need to rebase it before creating a PR. However rebasing with dangling
104
+
subtree commits can cause problems.
105
+
The following rebase strategy will pause the rebase at the point where you added a
106
+
subtree and let you add it again before continuing the rebasing.
107
+
108
+
::
109
+
110
+
[feature/branch] $ git rebase --rebase-merges --strategy subtree master
111
+
fatal: refusing to merge unrelated histories
112
+
Could not apply 0d6a56b... Add-preexec-from-https-github.colasdn.workers.dev-rcaloras-bash-preexec-0-4-1- # Add "preexec" from "https://github.com/rcaloras/[email protected]"
0 commit comments