Trying to fix ~ for linux, nearly there, doesn't reset between commands