Since both were functions already their place seems more appropriate in
functions.zsh. This also fixes the completion of both, since they did
not complete files before.
Other changes in `unbkp`:
- Use `mv` instead of `cp`
- Fix little typo (forgotten quote) and support specifying the
original name instead of only the backup.
- Do not "rename" the file if there is no change in name
(Leading to the prompt if the file should be overwritten)
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.
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`.
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`.
Support multiple arguments now with a behaviour similar to `mv`.
Fix that the created symlink did not point to the right file when mvln
was used to rename directories. In that case it pointed to a
subdirectory with the old name. Fixed by moving the directory check of
the target before the `mv` call.
The changes are only shown in the editor and do not land in the final
commit message.
For that setting the git-commit-last-msg function and the commit-msg
hook had to be updated.
The function is now a standalone function instead of anonymous and
uses every line until the first comment in COMMIT_EDITMSG discarding the
new information too.
The hook breaks now when checking line lengths when the changes start
since for some weird reason they are passed together with the rest of
the message instead of being deleted like the comments.
It was a mess and had to be rewritten. The new version is a bit simpler
by dropping unstable features that I never used anyway.
It still supports a verbose flag that prints every step of the process.
Move every file from plugins into zshrc.d as well as all bigger blobs in
the zshrc into their own files there.
Some stuff is still in there that I am not all too sure where it
belongs. TODO: Move.
Because all external plugins are now sourced over a symlink I had to
create a fork of fzf-tab for now that supports that.
See: https://github.com/Aloxaf/fzf-tab/pull/153