feat(git): alias s for unstage files

This commit is contained in:
thek4n 2024-05-22 09:16:14 +03:00
parent ee2b3481cf
commit 8064f04385
2 changed files with 117 additions and 112 deletions

View File

@ -45,6 +45,7 @@
[alias]
a = "!git ls-files --exclude-standard -m --others -t | fzf -m --bind load:last --preview 'git diff --color=always {2}' | cut -d' ' -f2 | xargs git add"
s = "!git diff --name-only --cached | fzf -m --bind load:last --preview 'git diff --staged --color=always {1}' | xargs git restore --staged"
d = diff
di = diff
ds = diff --staged

View File

@ -1,13 +1,16 @@
return {
{
'nvim-telescope/telescope.nvim',
enabled = vim.fn.executable "fzf" == 1,
enabled = vim.fn.executable("fzf") == 1,
dependencies = {
{
'nvim-lua/plenary.nvim',
},
{
'nvim-telescope/telescope-fzf-native.nvim',
enabled = vim.fn.executable "make" == 1,
enabled = vim.fn.executable("make") == 1,
build = "make"
}
},
},
keys = {
{ '<Leader>fb', '<cmd>Telescope buffers<CR>' },
@ -114,4 +117,5 @@ return {
}
})
end
}
}