code-style: cosmetics
This commit is contained in:
10
sxbm
10
sxbm
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user