Skip to content

Commit e22094e

Browse files
committed
fix(dfm): asdf plugin-install, docs translations
1 parent 6186c5c commit e22094e

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.shellcheckrc

+4
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ disable=SC1091
2424
# SC2174: When used with -p, -m only applies to the deepest directory.
2525
# https://github.com/koalaman/shellcheck/wiki/SC2174
2626
disable=SC2174
27+
28+
# SC2016: Expressions don't expand in single quotes, use double quotes for that.
29+
# https://www.shellcheck.net/wiki/SC2016
30+
disable=SC2016

local/bin/dfm

+9-9
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ section_install()
131131

132132
asdf)
133133
msgr run "Installing asdf..."
134-
$0 asdf plugins-add \
134+
$0 asdf plugins-install \
135135
&& msgr yay "asdf plugins installed!"
136136
;;
137137

@@ -355,30 +355,30 @@ section_asdf()
355355
plugins-install)
356356
msgr run "Installing plugins from configuration"
357357

358-
# Asennetaan ensin direnv jos sitä ei ole
358+
# First install direnv if it's not installed
359359
if ! asdf plugin list | grep -q "^direnv$"; then
360360
msgr nested "Installing direnv plugin"
361361
asdf plugin add direnv https://github.com/asdf-community/asdf-direnv.git
362362

363-
# Asennetaan direnv latest
363+
# Install latest direnv
364364
local latest_direnv
365365
latest_direnv=$(asdf latest direnv)
366366
asdf install direnv "$latest_direnv"
367367
asdf global direnv "$latest_direnv"
368368
fi
369369

370-
# Tarkistetaan että kaikki konfiguroidut pluginit on asennettu
370+
# Check that all plugins are installed
371371
local installed_plugins
372372
installed_plugins=$(asdf plugin list)
373373

374374
while IFS= read -r line; do
375-
# Ohita tyhjät rivit ja kommentit
375+
# Skip empty lines and comments
376376
[[ -z $line || $line =~ ^# ]] && continue
377377

378378
local plugin
379379
plugin=$(echo "$line" | awk '{print $1}')
380380

381-
# Ohita direnv, käsiteltiin jo
381+
# Skip direnv, it's already installed
382382
[[ $plugin == "direnv" ]] && continue
383383

384384
if ! echo "$installed_plugins" | grep -q "^${plugin}$"; then
@@ -437,10 +437,11 @@ section_asdf()
437437
local installed_plugins
438438
installed_plugins=$(asdf plugin list | sort)
439439

440-
# Compare .tool-versions and installed plugins, remove unknown plugins from .tool-versions
440+
# Compare .tool-versions and installed plugins,
441+
# remove unknown plugins from .tool-versions
441442
msgr nested "Updating tool-versions file"
442443
while IFS= read -r line; do
443-
# Säilytä kommentit ja tyhjät rivit
444+
# Keep comments and empty lines
444445
if [[ -z $line || $line =~ ^[[:space:]]*# ]]; then
445446
echo "$line" >> "$temp_file"
446447
continue
@@ -494,7 +495,6 @@ section_helpers()
494495
"env:Show environment variables"
495496
"functions:Show functions"
496497
"nvim:Show nvim keybindings"
497-
# shellcheck disable=SC2016
498498
'path:Show $PATH dir by dir'
499499
"tmux:Show tmux keybindings"
500500
"wezterm:Show wezterm keybindings"

0 commit comments

Comments
 (0)