Commit Graph

130 Commits

Author SHA1 Message Date
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
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
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
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
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
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
abd26352d4 zsh:ls-show-hidden: Use coreutils ls under darwin 2021-03-10 13:37:32 +01:00
fa9e8da091 zsh:glog: Show also commit stats in preview 2021-02-17 02:39:59 +01:00
9f616bace6 zsh:glog: Disable echo's backslash interpretation
With it allowed it breaks the preview and copy of commits that contains
such sequences.
2021-01-15 13:40:29 +01:00
26ef592129 zsh:glog: Add --stat preview 2020-12-19 02:31:52 +01:00
10ef02c421 zsh:glog: Support arguments
Arguments given to `glog` are directly passed to the `git log` call that
populates the commit list. Useful for example for specifying the
commit/branch.
2020-12-19 02:29:51 +01:00
9276f9427e zsh:glog: Comment bindings and add cancel bind 2020-12-19 02:29:10 +01:00
21014b46ce zsh:glog: Position preview depending on dimensions 2020-12-19 00:14:55 +01:00
druckdev
ba0c29e90e zsh:glog: Add pgp signing infos 2020-11-03 00:02:05 +01:00
druckdev
4d1b540778 zsh:ls-show-hidden: Bug fixes around -d flag
Fix behavior to match ls's when the -d flag but no files or directories
were passed.

Fix bug that the function thinks -d is passed when a long option that
contains a 'd' (as --group-directories-first) is specified and thus
just emulates plain `ls` in that case.
2020-11-02 17:46:26 +01:00
druckdev
36ca182110 zsh:glog: Better handling of small terminals +more
Instead of storing fzf's output and doing something with it (putting
into clipboard/editing buffer/stdout, etc.) there is a new keybinding
that stores the currently selected commit in the clipboard. fzf's output
is not piped or saved anymore since else `less` cannot be executed
inside of fzf. This is necessary for the second new keybinding that
executes the preview command piped into less. This is needed for example
when `glog` is started in a terminal that is too small to display all
information. In that case the peview window is not shown by default
anymore (but can still be toggled).
Since fzf can now only be aborted it always returns 130. Since this is
annoying `glog` returns 0 at the end form now on.

Refactoring:
Make the `commit_hash` regex more robust and by that simultaneously the
`del_ansi` regex obsolete.
Use `$dateshort` in `$date` since it depends from it.
Do not store the color flag in an extra variable. This was done earlier
to keep the lines under 80 characters but is not needed anymore.
2020-10-13 00:45:57 +02:00
druckdev
53622ea223 zsh:autoload:*: Add filetype to vim modeline 2020-10-10 13:27:53 +02:00
druckdev
d8f432655e zsh:glog: Push to editor buffer rather clipboard
This removes the dependency of xclip and makes it more usable since when
I need the commit hash it will almost always be in the next command.
2020-10-10 13:12:19 +02:00
druckdev
1a3a062309 zsh:glog: Small fixes
Commit hashes only contain letters from a-f.
Use heredoc for the fzf preview command for better readability.
2020-10-10 13:10:39 +02:00
druckdev
0424941699 zsh: Rename autoloadable function ls
Rename to avoid confusion and make the config more transparent.
2020-10-06 03:54:01 +02:00
druckdev
4cb445c2b5 shell-scripts: Use [[ instead of [ where possible
Replace all occurrences of [ with [[ in bash and zsh scripts and
configs.
Performance wise it makes sense to use the builtin instead of calling an
external command also when from a functionality stand point `test` would
suffice.
2020-10-03 01:29:29 +02:00
druckdev
2540b917c3 zsh:autoload:ls: Fix behavior when -d is given 2020-09-28 03:23:11 +02:00
druckdev
86ad1a8536 zsh:autoload:ls: Rephrase comment 2020-09-28 03:19:12 +02:00
druckdev
6fbe63be67 zsh:autoload:ls: Set vim filetype 2020-09-28 03:17:20 +02:00
druckdev
11ec8b93fb zsh: Heavy improvements to ls_show_hidden
Autoload the function instead of declaring it directly.
Add functionality for multiple targets. It should now pretty much
perform like `command ls`.
Refactored code to use more zsh extensions like globbing instead of
parsing the output of `ls` making it a lot faster.
2020-09-25 01:09:59 +02:00
druckdev
f69efff5c0 zsh:glog: Pipe preview through diff-so-fancy 2020-09-24 03:30:53 +02:00
druckdev
0788926c8c zsh: Autoload big functions 2020-09-22 00:28:28 +02:00