Break the loop if `$REPO_DIR` does not exist anymore because it was
deleted other ways instead of looping forever as `git worktree remove`
fails on non-existing directories.
Go back to a simpler approach, that the `fzf-history-widget` is only
called on <C-Up> and ^K in normal mode and <Up> & <Down> scroll through
the history normally.
The reason behind this change is that there were still some edge cases
in which the widget was wrongfully called when normal scrolling was
intended.
This change also makes it now possible that I can use commands in the
'surrounding' of a past command by first navigating to it with the
fzf-widget and then just using <Up> & <Down>.
Pass additional arguments to git-commit so that flags can be passed
e.g `-n` to bypass the commit hooks.
Also use the according completion for `git-commit-last-msg`.
Do not unset CHASE_GLOB under android as then globbing with absolute
paths breaks as the PWD is often in a path with subdirectories that are
owned by root and not world-readable (e.g. /data/data/).
I *believe* this is the reason for it.
In place of the in ed215a35f7 introduced
second bracket can also stand `~` or `^`.
Otherwise something like `[feature^] or [feature~2]` is not thrown out.
Merge commits should also be matched (indicated by a '-') for the case
that the base branches last commit is a merge commit and another branch
exists that checked out the newest commit that was merged.
Example log (from `glog`):
```
* abcdef Foo (HEAD -> feature)
* bcdefa Merge branch 'other-feature' into base (base)
|\
| * cdefab Bar (other-feature)
|/
* ...
...
```
with `git show-branch -a` output like:
```
! [base] Merge branch 'other-feature' into base
* [feature] Foo
! [other-feature] Bar
---
* [feature] Foo
-- [base] Merge branch 'other-feature' into base
+*+ [other-feature] Bar
```
Here we want `base` to be returned instead of `other-feature` and thus
'-' needs to be matched as well.
Fixes (in order of the patterns that were touched):
- Only match `*` that come between BOL and the branch name in brackets,
as another branch could be checked out at a commit containing a `*`
- Only throw out commits that were committed on our current branch and
not those that contain the branch name in the message (e.g. `test`).
- Only match until first bracket as the commit message could also
contain a pattern like `[.*]` that would be matched instead.
As under OSX the -p flag does not exist, it seems safer to just use
`mktemp -d` and create the worktree under that directory.
This just has the disadvantage of one more dir to display in the `PWD`.
If a command is normally executed CMD_ON_ENTER is reseted to `ls`.
Otherwise problems can occur when for example switching the directory to
a non-repo when CMD_ON_ENTER contains `gs`.
The file should be opened if fzf returned something not the other way
around. This probably happened in the last refactoring session before
committing.
Just setting neovim as the `MANPAGER` practically results in a pipe.
The problem with this is that `man` puts hard line breaks into the text
depending on the current window width. When the width changes afterwards
the input naturally doesn't change.
When using neovim's `Man` function this is resolved.
Update all submodules to the newest commit.
Change submodule names in `.gitmodules` from local path to repo names.
Sort and group `.gitmodules` by program that uses it.
Remove the clone of 'fzf-tab' as my pull request got merged.