summaryrefslogtreecommitdiff
path: root/uninstall
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-09-24 22:09:37 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-09-24 22:41:54 +0900
commite8cb31541984e93dcbaa5f2ac5f56ec390279d5e (patch)
tree115b545d1ab3bd0fb28a6c734e9bdc840e24c018 /uninstall
parentf0c4ee4047f3b70241bacab712642437e37fad2f (diff)
downloadfzf-e8cb31541984e93dcbaa5f2ac5f56ec390279d5e.tar.gz
Apply shfmt to bash script files (make fmt)
Diffstat (limited to 'uninstall')
-rwxr-xr-xuninstall12
1 files changed, 6 insertions, 6 deletions
diff --git a/uninstall b/uninstall
index 1d338cb4..76950ef1 100755
--- a/uninstall
+++ b/uninstall
@@ -64,19 +64,19 @@ remove_line() {
line_no=1
continue
fi
- line_no=$(( $(sed 's/:.*//' <<< "$line") + line_no - 1 ))
+ line_no=$(($(sed 's/:.*//' <<< "$line") + line_no - 1))
content=$(sed 's/^[0-9]*://' <<< "$line")
match=1
- echo " - Line #$line_no: $content"
+ echo " - Line #$line_no: $content"
[ "$content" = "$1" ] || ask " - Remove?"
if [ $? -eq 0 ]; then
temp=$(mktemp)
awk -v n=$line_no 'NR == n {next} {print}' "$src" > "$temp" &&
cat "$temp" > "$src" && rm -f "$temp" || break
- echo " - Removed"
+ echo " - Removed"
else
- echo " - Skipped"
- line_no=$(( line_no + 1 ))
+ echo " - Skipped"
+ line_no=$((line_no + 1))
fi
done
[ $match -eq 0 ] && echo " - Nothing found"
@@ -109,6 +109,6 @@ if [ -d "${fish_dir}/functions" ]; then
fi
config_dir=$(dirname "$prefix_expand")
-if [[ "$xdg" = 1 ]] && [[ "$config_dir" = */fzf ]] && [[ -d "$config_dir" ]]; then
+if [[ $xdg == 1 ]] && [[ $config_dir == */fzf ]] && [[ -d $config_dir ]]; then
rmdir "$config_dir"
fi