Ah, obviously you’re right and bash is less tolerant to spaces than I’ve had in my mind:
You can declare aliases that will last as long as your shell session by simply typing these into the command line. The syntax looks like this:
alias alias_name="command_to_run"
Note that there is no spacing between between the neighbor elements and the equal sign. This is not optional. Spaces here will break the command.
AfaIk, posts and comments cannot be exported.
For the rest you may use the “export settings” function in the “personal settings” section on the webpage of your Lemmy instance (yet I don’t know what is actually exported).
Alternatively, you may use one of the tools mentioned in this post (the post is in German, the linked webpages are in English): https://slrpnk.net/post/10923543