Commit Graph

419 Commits

Author SHA1 Message Date
8c37dc2316 vim:vimrc.d:*: Use " instead of # in header lines 2021-07-13 16:52:42 +02:00
0dfff846c2 zsh:fzf-tab: Remove color preview symbol 2021-07-10 01:47:45 +02:00
e0ade3c140 zsh:fzf-tab: Set bindings for switching groups 2021-07-10 01:46:01 +02:00
9bb4ded6c7 zsh:autoload:gbranch: Do not hardcode AUTOLOAD_DIR 2021-07-10 01:13:40 +02:00
1dec922c0f zsh:autoload: Add gbranch to display git branches 2021-07-10 01:00:09 +02:00
4fedae1a4c zsh:autoload:*: Add shebang & remove vim-modeline
By adding a shebang to the scripts they can be executed directly without
an interactive shell. The shebang also makes vims modeline that only set
the filetype obsolete.
2021-07-10 00:59:25 +02:00
f2c84fe82c vim:zsh-autosuggestions: Set suggestions strategy 2021-07-09 23:53:50 +02:00
ec94e7ebdd git: Set push.default to current
Push current branch to branch of same name.
This is useful for new branches as I almost always push those with:
```
	git push -u origin "$(git branch --show-current)"
```
2021-07-07 12:02:27 +02:00
0480b98812 meta:install: Create GNUPGHOME if nonexistent
This is more of a one-time step to be done when installing, than every
time on login.
2021-07-07 11:56:57 +02:00
4606f9ad80 zsh:git-commit-last-msg(): Support additional args
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`.
2021-07-07 11:50:52 +02:00
53ae5a067e zsh:funcs:crypt-mount: cd into mount-point 2021-07-07 11:47:54 +02:00
d4a5edab1a vim: Disable gutentags when editing git-rebase
I do not want the tags file to generate when doing simple git operations
that will not modify the project in itself.
2021-07-01 13:23:23 +02:00
6e3f5a96b3 vim: Disable gutentags when editing git-commits
Disable gutentags as it seems to regenerate the entire tags file when
editing git-commits, leading to a delay when exiting and a message from
git:
"Waiting for your editor to close the file..."
2021-06-30 12:35:57 +02:00
098fb385fd zsh:zprofile: Shorten two statements 2021-06-15 14:43:45 +02:00
57f89d34dc zsh:z{profile,logout}: Kill only 'own' ssh-agent
Kill the ssh-agent only if it was created in this session.

Like that the login shell can inherit SSH_AGENT_PID without it killing
the agent at the end. For this to work properly it is important that
LAUNCHED_SSH_AGENT is not exported, otherwise nested login shells will
mess with each other.
2021-06-15 13:19:29 +02:00
b368b20dee zsh:zprofile: Only start one ssh-agent per session
Also check if ssh-agent is available before launching.
2021-06-15 13:05:36 +02:00
b0db2b22a1 zsh:zprofile: Create GNUPGHOME if nonexistent
`gpg` complains otherwise and falls back to `$HOME/.gnupg`.
2021-06-15 13:04:37 +02:00
f6740f9ea0 gnupg:gpg-agent: Use pinentry-curses 2021-06-04 11:57:01 +02:00
ec0e23d07b gnupg: Add gpg-agent configuration stub 2021-06-04 11:55:46 +02:00
5ab5a49793 zsh:stderred.theme: Use escape-sequences w/o tput 2021-06-01 22:36:59 +02:00
3db2c2a87e zsh:g{log,stash}: Drop tput for stty for size
As stty is part of POSIX and thus better available.
2021-06-01 22:10:39 +02:00
6856c2d27e zsh:options: Do not unset CASE_GLOB on android
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.
2021-06-01 21:39:49 +02:00
58cdbb6652 locale: Skip conf if locale is not available 2021-06-01 18:12:05 +02:00
db6303aa51 zsh:funcs:g-ch-worktree: Restart on issues
Restart the subshell until every issue is resolved and the worktree is
removed.
2021-05-31 23:17:47 +02:00
ca219a3a1d vim:keybindings: Add <leader>cd - cd to git root 2021-05-22 19:13:36 +02:00
af30da1b3b vim:plugins: Add vim-fugitive 2021-05-22 19:05:08 +02:00
28385a0a1e vim: Set termdebug_wide 2021-05-21 10:18:02 +02:00
06d37a273c git:pull: Use fast-forward only
If I cannot fast-forward I want to stop and think about how I want to
continue (merge or rebase).
2021-05-16 00:51:29 +02:00
44ef15d8ab zsh:autoload:glog,gstash: Drop trailing \n on copy 2021-05-16 00:48:24 +02:00
8af0b5c79a zsh:autoload:glog,gstash: Get rid of redundancy 2021-05-16 00:09:53 +02:00
d0aee7e638 zsh:alias:git-base-branch: Fix small pattern error
In place of the in ed215a35f7 introduced
second bracket can also stand `~` or `^`.
Otherwise something like `[feature^] or [feature~2]` is not thrown out.
2021-05-16 00:04:46 +02:00
c1955dd5f5 zsh:alias:git-base-branch: Match merge commits too
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.
2021-05-15 23:17:36 +02:00
ed215a35f7 zsh:alias:git-base-branch: Make regexs more robust
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.
2021-05-15 22:52:33 +02:00
f58c5fdb27 zsh:alias: Combine both regexs in git-base-branch 2021-05-15 22:17:45 +02:00
32416deedd zsh:alias: Add git-ancestor and git-base-branch 2021-05-15 22:12:50 +02:00
45a2ab8a20 vim:keybindings: Add gp to reselect last paste 2021-05-15 04:07:22 +02:00
4f70d7f32f zsh:glog: Show pgp key instead of fingerprint
Also display a status: (From `git-show` manpage)
```
"G" for a good (valid) signature,
"B" for a bad signature,
"U" for a good signature with unknown validity,
"X" for a good signature that has expired,
"Y" for a good signature made by an expired key,
"R" for a good signature made by a revoked key,
"E" if the signature cannot be checked (e.g. missing key) and
"N" for no signature
```
2021-05-15 04:06:22 +02:00
724a6a455d vim:keybindings: Add // to search for selection 2021-05-15 04:06:20 +02:00
00da37623a zsh:funcs:git-checkout-worktree: Remove -p flag
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`.
2021-05-15 04:06:14 +02:00
6e89def392 zsh:autload: Add gstash to display git stashes
Add gstash as a copy of glog with very slight modifications.
(Exchange `git log` with `git stash list` and remove the `--graph` flag)
2021-05-15 04:06:09 +02:00
492c29c096 git:functions: Remove old unused nemo wrapper 2021-05-10 17:30:46 +02:00
4053920f53 git:completion: Fix command not found error
_git has to be loaded before other functions can use its completion
functions.

Hint to this found at: https://unix.stackexchange.com/a/269818
2021-05-10 17:28:22 +02:00
b82a9d2221 git:completion: Add git-checkout-worktree 2021-05-10 17:27:54 +02:00
1d8f21b565 zsh:functions: Add git-checkout-worktree 2021-05-10 16:12:23 +02:00
3029e30589 git:ignore: Add compile_flags.txt 2021-05-04 10:50:45 +02:00
7090f55653 zsh:alias: Add -j flag per default to make 2021-05-04 10:43:19 +02:00
c93d36677b zsh:glog: Handle missing commands and OS X
As the commit hash is now potentially printed (when no clipboard tool is
available), the copy-command needed to be executed not silent.
2021-04-30 11:48:09 +02:00
3aa722842d vim: Use tree style listing in netrw 2021-04-28 01:37:42 +02:00
22501182ce vim: Use timer instead of autocommand for autoread 2021-04-26 17:56:15 +02:00
a9b5c19f2f git: Use 'main' as default branch name 2021-04-20 11:51:31 +02:00