mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-17 06:50:03 +00:00
feat(dfm): shfmt now run with cargo installed fd
This commit is contained in:
@@ -108,8 +108,6 @@ brew "eg-examples"
|
|||||||
brew "entr"
|
brew "entr"
|
||||||
# Perl lib for reading and writing EXIF metadata
|
# Perl lib for reading and writing EXIF metadata
|
||||||
brew "exiftool"
|
brew "exiftool"
|
||||||
# Simple, fast and user-friendly alternative to find
|
|
||||||
brew "fd"
|
|
||||||
# Banner-like program prints strings as ASCII art
|
# Banner-like program prints strings as ASCII art
|
||||||
brew "figlet"
|
brew "figlet"
|
||||||
# Libraries to talk to Microsoft SQL Server and Sybase databases
|
# Libraries to talk to Microsoft SQL Server and Sybase databases
|
||||||
|
|||||||
@@ -261,18 +261,9 @@ function section_dotfiles
|
|||||||
;;
|
;;
|
||||||
shfmt)
|
shfmt)
|
||||||
# Format shell scripts according to following rules.
|
# Format shell scripts according to following rules.
|
||||||
find "$DOTFILES" \
|
fd --full-path "$DOTFILES" -tx \
|
||||||
-type f -executable \
|
-E '*.pl' -E '*.php' -E '*.py' -E '*.zsh' -E 'plugins' -E 'fzf' -E 'dotbot' \
|
||||||
-not -path '*/.git/*' \
|
-x shfmt \
|
||||||
-not -path '*dotbot*' \
|
|
||||||
-not -path '*config/fzf*' \
|
|
||||||
-not -path '*bin/fzf*' \
|
|
||||||
-not -path '*tmux/plugins*' \
|
|
||||||
-not -name '*.pl' \
|
|
||||||
-not -name '*.py' \
|
|
||||||
-not -name '*.php' \
|
|
||||||
-not -name '*.zsh' \
|
|
||||||
-exec shfmt \
|
|
||||||
--language-dialect bash \
|
--language-dialect bash \
|
||||||
--func-next-line --list --write \
|
--func-next-line --list --write \
|
||||||
--indent 2 --case-indent --space-redirects \
|
--indent 2 --case-indent --space-redirects \
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ packages=(
|
|||||||
"bkt"
|
"bkt"
|
||||||
# a structural diff that understands syntax
|
# a structural diff that understands syntax
|
||||||
"difftastic"
|
"difftastic"
|
||||||
|
# A simple, fast and user-friendly alternative to 'find'
|
||||||
|
"fd-find"
|
||||||
)
|
)
|
||||||
|
|
||||||
for pkg in "${packages[@]}"; do
|
for pkg in "${packages[@]}"; do
|
||||||
|
|||||||
Reference in New Issue
Block a user