Compare commits
5 Commits
5d8d881d4d
...
59b2334253
| Author | SHA1 | Date | |
|---|---|---|---|
|
59b2334253
|
|||
|
17a23eb7e4
|
|||
|
9a76b5071e
|
|||
|
02d298a163
|
|||
|
87359588e0
|
@@ -4,10 +4,12 @@
|
|||||||
|
|
||||||
```
|
```
|
||||||
bat
|
bat
|
||||||
git-delta
|
|
||||||
fd
|
fd
|
||||||
rg
|
|
||||||
fzf
|
fzf
|
||||||
|
git-delta
|
||||||
|
paru
|
||||||
|
rg
|
||||||
|
zoxide
|
||||||
```
|
```
|
||||||
|
|
||||||
### Useful
|
### Useful
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
[alias]
|
|
||||||
fixup = "!f() { TARGET=$(git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 ); git commit --fixup=$TARGET ${@:2} && GIT_SEQUENCE_EDITOR=true git rebase -i --autostash --autosquash $TARGET^; }; f"
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
[include]
|
[include]
|
||||||
path = ~/.dotfiles/git/configs/lfs.gitconfig
|
path = ~/.dotfiles/git/configs/lfs.gitconfig
|
||||||
path = ~/.dotfiles/git/configs/delta.gitconfig
|
path = ~/.dotfiles/git/configs/delta.gitconfig
|
||||||
path = ~/.dotfiles/git/configs/alias.gitconfig
|
|
||||||
|
|
||||||
[push]
|
[push]
|
||||||
default = simple
|
default = simple
|
||||||
|
|||||||
19
git/dot-local/bin/git-fixup
Executable file
19
git/dot-local/bin/git-fixup
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
TARGET=$1
|
||||||
|
|
||||||
|
|
||||||
|
if [ -z "$TARGET" ]; then
|
||||||
|
if hash fzf 2>/dev/null; then
|
||||||
|
TARGET=$(git log -n 50 --pretty=format:'%h %s' --no-merges | fzf --border-label='Select commit' | cut -c -7 )
|
||||||
|
else
|
||||||
|
echo "Not installed: fzf"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$TARGET" ]; then
|
||||||
|
echo "No target specified"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
git commit --fixup=$TARGET ${@:2} && GIT_SEQUENCE_EDITOR=true git rebase -i --autostash --autosquash $TARGET^
|
||||||
@@ -25,7 +25,6 @@ plugins=(
|
|||||||
tmux
|
tmux
|
||||||
colored-man-pages
|
colored-man-pages
|
||||||
command-not-found
|
command-not-found
|
||||||
dirhistory
|
|
||||||
zsh-autopair
|
zsh-autopair
|
||||||
fast-syntax-highlighting
|
fast-syntax-highlighting
|
||||||
)
|
)
|
||||||
@@ -96,3 +95,32 @@ if hash pnpm 2>/dev/null; then
|
|||||||
*) export PATH="$PNPM_HOME:$PATH" ;;
|
*) export PATH="$PNPM_HOME:$PATH" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export FZF_DEFAULT_OPTS='--tmux'
|
||||||
|
export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS'
|
||||||
|
--color=fg:-1,fg+:#83a598,bg:-1,bg+:#262626
|
||||||
|
--color=hl:bold:#8ec07c,hl+:#8ec07c,marker:#cc241d
|
||||||
|
--color=prompt:#fb4934,spinner:#af5fff,pointer:#83a598,header:#87afaf
|
||||||
|
--color=border:#7c6f64,label:#7c6f64
|
||||||
|
--border="sharp" --border-label-pos="0" --preview-window="border-sharp"
|
||||||
|
--prompt="> " --marker="◆" --pointer=">" --separator="─"
|
||||||
|
--scrollbar="│" --info="right"'
|
||||||
|
|
||||||
|
if hash fd 2>/dev/null; then
|
||||||
|
export FZF_DEFAULT_COMMAND="fd --type f --strip-cwd-prefix"
|
||||||
|
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||||
|
fi
|
||||||
|
if hash fzf 2>/dev/null; then
|
||||||
|
source <(fzf --zsh)
|
||||||
|
|
||||||
|
if hash paru 2>/dev/null; then
|
||||||
|
function pi {
|
||||||
|
paru -Slq | fzf -q "$1" --border-label="Packages" --multi --preview 'paru -Si {1} --color=always' | xargs -ro paru -S
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
export _ZO_FZF_OPTS="--tmux"
|
||||||
|
if hash zoxide 2>/dev/null; then
|
||||||
|
eval "$(zoxide init zsh --cmd cd)"
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user