code-style: cosmetics

This commit is contained in:
NRK
2022-11-05 02:53:35 +06:00
parent 1684db17a2
commit f4e160754d

10
sxbm
View File

@ -79,9 +79,8 @@ bm_add() {
done done
[ -z "$LINK" ] && die "No links found" [ -z "$LINK" ] && die "No links found"
echo "$LINK $TITLE $TAGS" >> "$data_file" && echo "$LINK $TITLE $TAGS" >> "$data_file" || die "Couldn't add link"
echo "Link $(wc -l < "$data_file") added successfully!" || echo "Link $(wc -l < "$data_file") added successfully!"
die "Couldn't add link"
} }
__awk_search() { __awk_search() {
@ -177,9 +176,8 @@ bm_remove() {
printf "Delete this link? (y/n)\n$LINK\n" printf "Delete this link? (y/n)\n$LINK\n"
read answer read answer
if [ "$answer" = "y" ] || [ "$answer" = "yes" ]; then if [ "$answer" = "y" ] || [ "$answer" = "yes" ]; then
sed -i --follow-symlinks "${1}d" "$data_file" && sed -i --follow-symlinks "${1}d" "$data_file" || die "Couldn't delete link"
echo "Deleted successfully" || echo "Deleted successfully"
die "Couldn't delete link"
fi fi
} }