Commit Graph

493 Commits

Author SHA1 Message Date
be2205de32 zsh:alias:feh: Auto scale down and use grey bg 2024-01-05 16:22:30 +01:00
58243e0510 *: Update and add TODOs 2024-01-05 16:20:42 +01:00
5747b6e04c git:commit-last-msg: Make more robust
Use core.commentchar to identify commented lines and use the cut line
instead of just deleting from the first comment on, as this would break
for example in git generated messages (e.g. squashes).
2024-01-05 16:10:55 +01:00
3796e867d2 fzf: Add --no-require-git to FZF_DEFAULT_COMMAND
This way fd and rg utilize the gitignore when called from a non-git
parent directory too.
2024-01-05 15:31:04 +01:00
21668c657d zprofile: Add --hidden to rg version of FZF_CMD
Even though it is added already through .config/ripgrep/config, to make
it more consistent with the fd version.
2024-01-05 15:29:15 +01:00
0c049d235a fzf: Ignore venv and build dirs in default command 2024-01-05 15:16:16 +01:00
cc076cc205 zsh:opts: Revert disabling CDABLE_VARS
This reverts commit a205a7c5ce ("zsh:opts: Disable CDABLE_VARS").

The main reason why the option annoyed me was primarily because I had
stupid named dirs to begin with. Remove children of HOME, since I get
there fast anyways.
2023-12-04 20:47:39 +01:00
a0d79583f2 zsh:opts: Disable HIST_VERIFY
Most of the I am sure about it, and if not, I press Tab.
2023-12-04 20:43:01 +01:00
7909d24251 zprofile: Put zettelkasten notes into docs/notes/ 2023-12-01 03:41:50 +01:00
5359298bed zsh:mvln(): Implement relative flag -r 2023-11-30 18:44:15 +01:00
0213ad8f7d zsh:nameddirs: Add ws & ss for WiSe & SoSe 2023-11-24 13:34:09 +01:00
99701cf1a5 zsh:nameddirs: Change semester naming scheme 2023-11-24 13:27:54 +01:00
97f00e1dd0 zsh:keys: Bind Ctrl-Shift-G to insert-shcwd 2023-11-20 19:38:13 +01:00
93467176f6 zsh:keys: Set sensible fzf args for go-shcwd
Copy arguments from shell/key-bindings.zsh of the fzf repo.
2023-11-20 19:27:17 +01:00
aa49c9324d fzf: Don't track automatically but add keymap 2023-11-10 14:35:33 +01:00
50eecf7e01 git:perm-stash: Use stash's ancestor as commit_ref
The stash does not necessarily apply to HEAD.
2023-07-18 14:33:55 +02:00
d38ee159ed git: Add perm-stash to save a stash to a file 2023-07-18 14:30:09 +02:00
f193e0071d zsh:mvln(): Revert "Create relative symlinks"
This reverts commit 226f09b046.

I don't want to have relative links all the time.

TODO: If target is a relative path, make the link relative too
TODO: Support --relative flag
2023-07-10 14:03:50 +02:00
2d277c5f54 zsh:funcs: Add rmdir wrapper to delete CWD 2023-07-10 00:12:07 +02:00
494829fdc4 zsh:alias: Add --tags to almost --all glog
I don't want to see refs/stash, that is why --all does not work for me
2023-07-10 00:10:50 +02:00
e324273567 zsh:diffcmds(): Add pipes TODO and format 2023-07-07 11:53:16 +02:00
a7c529a93c zsh:diffcmds(): Unquote single pipes
This makes it possible to diff command chains. For example:

    diffcmds git format-patch -1 --stdout HEAD~ '|' \
        grep '^%%' '|' \
        cut -c2- \
        -- - +

to see if a commit only reordered lines without modifying them.

I am not happy with this solution and would prefer a different form of
escaping (e.g. with %).
2023-07-06 15:26:43 +02:00
739e03b5a7 git:glog: Remove by-now default fzf bindings
These were added "globally" to FZF_DEFAULT_OPTS in 4f5d23bd1 ("zprofile:
Add some bindings to FZF_DEFAULT_OPTS").
2023-06-24 11:05:32 +02:00
40dad5f672 zsh:diffcmds():TODO: Support own arguments
Support own arguments for example to switch the placeholder or the
diffcmd.
2023-06-23 23:13:17 +02:00
e3085efc46 zsh:diffcmds(): Handle some edge cases 2023-06-23 23:11:43 +02:00
3fea8b821a zsh:diffcmds(): Change ps subs depending on diff*
Process substitution via file descriptor/fifo should be preferred.
2023-06-23 23:09:42 +02:00
393f7ec6e1 zsh:diffcmds(): Add a layer of quotation
Add a layer of quotation as eval removes one. For example using
parameters in single quotes would still be expanded.
2023-06-23 22:36:58 +02:00
a4d1877341 zsh:diffcmds(): Build cmdline as an array
It seems nicer to build a new array instead of building a string and
then splitting it again.
2023-06-23 22:30:37 +02:00
6b0b8f738e zsh:diffcmds(): Rephrase comment to be more clear 2023-06-23 22:11:16 +02:00
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