Sometimes I wish for a command to edit /etc/fstab. Something like the follow.

Add a new entry:

fstab add -s LABEL=scratch -w /scratch -o rw -o user_xattr -t btrfs

Add an entry based on an existing mount (get device, other settings, from the mount point):

fstab add -m /scratch

Remove an entry:

fstab remove /scratch

Modify an existing entry:

fstab edit /scratch -o +foo -o -bar -t auto

Check that /etc/fstab looks OK:

fstab check

Edit /etc/fstab in an editor and, afterwards, check that it looks OK (c.f. visudo).

fstab vi

Re-format /etc/fstab so that it looks pretty:

fstab prettify