Copy export_selection.inx and export_selection.py to inkscape extensions directory.
On linux in most cases just run mkdir -p ~/.config/inkscape/extensions;cp export_selection* ~/.config/inkscape/extensions
Open Extensions / Export / Export selection as svg, set path and click to save, or map this extension to keyboard shortcut.
inkscape --actions="select-by-id:object_id; verb:sk.linuxos.export_selection.noprefs" --batch-process input.svg