✨ feat(fish): function to copy the global rules to current directory
This commit is contained in:
parent
fa6ec57b7d
commit
2d5c2ecc36
1 changed files with 9 additions and 0 deletions
9
.config/fish/functions/rules.fish
Normal file
9
.config/fish/functions/rules.fish
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
function rules
|
||||||
|
set currentDirectory (pwd)
|
||||||
|
set selectedRule (fd -I --hidden --type f . ~/.config/nvim/rules/ | fzf --preview "bat {}")
|
||||||
|
|
||||||
|
if test -n "$selectedRule"
|
||||||
|
cp $selectedRule $currentDirectory
|
||||||
|
echo "'$selectedRule' copied"
|
||||||
|
end
|
||||||
|
end
|
Loading…
Add table
Reference in a new issue