Commit Graph

614 Commits

Author SHA1 Message Date
ced1f1b7db zsh:diffcmds(): Get index of last -- occurrence 2023-06-23 22:03:28 +02:00
9350213939 zsh:diffcmds(): Use vimdiff depending on $EDITOR 2023-06-23 21:58:45 +02:00
7d1dff6fa9 zsh:diffcmds(): Abort without CMD 2023-06-23 21:43:52 +02:00
252be099fa zsh:diffcmds(): Improve usage printout 2023-06-23 21:43:44 +02:00
063b0559c9 fzf: Use fd as default command if installed 2023-06-23 17:08:57 +02:00
0c4dfbf363 git:ignore: Add /.git
Ignore the .git directory globally instead of ignoring it manually in
tools like fd and ripgrep.

I feel very dumb for putting all this time into the redefinition of :Rg,
especially since I am currently **much** procrastinating writing my
bachelor thesis.
2023-06-23 17:03:29 +02:00
4f5d23bd15 zprofile: Add some bindings to FZF_DEFAULT_OPTS 2023-06-23 16:40:23 +02:00
2411a42e32 ripgrep: Add --hidden by default 2023-06-23 14:19:09 +02:00
2114987106 zprofile: Fix non-export of FZF_DEFAULT_NO_RG
I never really noticed but `$FZF_ALT_C_COMMAND` was never set as
`$fzf_default_no_rg` would be empty. Because the variable was not
exported, the X session would not have it in it's environment.
2023-06-23 13:36:23 +02:00
0d45f2f61a zsh:suffix(): Use bfs if installed 2023-06-21 13:34:45 +02:00
ce987f1f94 zsh:alias: Add count for sorted uniq -c 2023-06-21 13:32:54 +02:00
d5436fe0f9 zsh:alias: Add gcow for git-checkout-worktree 2023-06-21 13:31:10 +02:00
7e4ab97985 zprofile: Add --track to FZF_DEFAULT_OPTS
Leverage fzf's new `--track` flag.
2023-06-07 12:10:23 +02:00
613d3a572a zsh:nameddirs: Pass hash args behind --
Prevent errors for directories that start with a dash.
2023-06-07 12:00:06 +02:00
68fdf4ec13 zsh:diffcmds(): Append args at the back w/o %% 2023-05-24 12:19:50 +02:00
fcfbf3354d vim:diffcmds(): Error if no args were supplied 2023-05-24 12:19:49 +02:00
09ace58f59 zsh:funcs: Add diffcmds() 2023-05-24 12:19:49 +02:00
0a95d86e25 zsh:alias: Add gpf for git push --force 2023-05-22 00:12:40 +02:00
e81d3005c5 zsh:alias: Manually expand aliases anywhere
When passing a full command as arguments to another (e.g. `sudo`),
aliases are not expanded.

Add the `$` alias that makes it possible to expand a following alias
anywhere. This uses the feature that aliases ending in a space will
trigger alias expansion on the next argument.

See: https://unix.stackexchange.com/a/433849
2023-04-24 11:54:54 +02:00
5deb69bbd6 git:checkout-worktree: Improve name on recursion
When calling git-checkout-worktree from inside a temporary working tree
(doesn't necessary need to be a recursive call, could be another shell
too) the name would be very long.

Fix this by using the folder name of the main working tree.
2023-04-11 23:24:52 +02:00
072204c10c vim:keys: Discard stderr in FZF_CTRL_T_COMMAND
The prompt gets messed up on error messages from `find` (e.g. permission
errors). Discard them.
2023-04-11 22:49:15 +02:00
a68599d9ae zsh:zprofile: Add $MBSYNCRC
Additionally to the mbsync alias that was already created, add
`$MBSYNCRC` so that mutt-wizards tools use the correct config as well.
2023-03-31 02:30:01 +02:00
4640dec63d zsh:suffix(): Use zshisms to find --'s index 2023-02-27 14:13:54 +01:00
112b195d7b zsh:keys:TODO: Rather insert line on ^R 2023-02-27 14:11:43 +01:00
e8a9f5d828 zsh:alias:TODO: Improve vim/fg wrapper 2023-02-27 14:10:17 +01:00
44e83ee8d6 git:glog:TODO: Better file arguments handling 2023-02-27 14:01:49 +01:00
8e183a37bf zsh:keys: Bind ^U to cd ..
I do not use readline/emacs(?) mapping to clear the line with ^U anyways
as I have my beloved vim bindings.
2023-02-23 14:44:59 +01:00
a85d6c53c4 zsh:keys:go-shcwd: Only exclude exact $PWD
Fix the grep call to only exclude lines that are exactly the PWD instead
of containing it.
2023-02-23 14:44:59 +01:00
cf48efb4cb zsh:keys:go-shcwd: Do not suggest $PWD 2023-02-23 14:44:59 +01:00
86c3c1992a zsh:keys: Bind ^G to fuzzy shcwd 2023-02-23 14:44:59 +01:00
51a2ab77d7 zsh:keys: Extract redraw-prompt from cd-rotate
This makes it possible to use it in other bindings.
2023-02-23 14:32:54 +01:00
10824feb74 git:checkout-worktree: Make errc variable local 2023-02-13 17:18:25 +01:00
28f60004de git:checkout-worktree: Fix unset ret variable 2023-02-13 17:17:49 +01:00
0625fdbd94 git:last-changed: Fix handling of weird filenames
Make sure that `git-log` does not misunderstand the file name.
2023-02-13 17:13:41 +01:00
0a749cd6f5 git:last-changed: Equalize ANSI sanitization regex
Don't know why I used two different patterns.
2023-02-13 17:08:16 +01:00
226f09b046 zsh:mvln(): Create relative symlinks
When using ln's `-a` flag, absolute paths are not necessary.
2023-02-09 17:08:49 +01:00
7739d0a9c3 zsh:mvln(): Refactor to fewer lines and zshisms 2023-02-09 17:08:48 +01:00
69f8bd8631 zsh:mvln(): Make variables local 2023-02-09 17:08:42 +01:00
78a7b0d809 git:glog:TODO: Depend preview function on --stat 2023-02-09 13:22:19 +01:00
8baaaf0e94 git:glog:TODO: Display ... in patch-stat 2023-02-09 13:21:00 +01:00
9449b7fecd git:glog: Respect file arguments when previewing
When file arguments were passes behind `--`, show only these files in
the patch preview. This mimics the behaviour of `git log -up --
<files>`.

The full patch can still be displayed with ctrl-p.
2023-02-09 13:17:32 +01:00
83b79aab10 vim:opts: Set GLOB_COMPLETE 2023-01-27 00:25:01 +01:00
e1b46bddc3 zsh,git: Add completion for git-https-and-ssh
Complete remotes.

Also remove redundant compdef lines. The _git-<command> functions are
used automatically.
2023-01-25 03:19:11 +01:00
47e13d36a6 git:https-and-ssh: Support passing custom remote 2023-01-25 03:06:57 +01:00
5d750e5962 zsh:pdfunite(): Fix execution through missing $0
I don't know what happened there. Apparently I just checked that the
early-abort condition works.
2023-01-23 01:25:39 +01:00
a205a7c5ce zsh:opts: Disable CDABLE_VARS
It annoys me more than it helps me.
2023-01-21 12:40:17 +01:00
e9a82452fd zsh:psofof(): Remove duplicates 2023-01-21 02:00:59 +01:00
884d12d237 zsh:funcs: Add psofof to list pids from lsof 2023-01-21 01:59:23 +01:00
3b3ec03d01 zsh:alias: Add gca for git commit --amend 2023-01-21 01:58:32 +01:00
c8b634b81f git:https-and-ssh: Use shorter variant to get url 2023-01-21 01:57:37 +01:00