You can’t take sentences, or even portions of sentences in this case, from the Bash manual and expect them to make sense on their own. You need to read the “ARGUMENTS” section of the manpage, or the last paragraph of the “Invoking Bash” section:
If arguments remain after option processing, and neither the
-c nor the
-s option has been supplied, the first argument is assumed to be the name of a file containing shell commands (see Shell Scripts). When Bash is invoked in this fashion,
$0 is set to the name of the file, and the positional parameters are set to the remaining arguments. Bash reads and executes commands from this file, then exits. Bash’s exit status is the exit status of the last command executed in the script. If no commands are executed, the exit status is 0.
“If no arguments remain after option processing” is the opposite of this, and its effect should be understood alongside the effects of the
-s options. If you specify
-c, then that takes precedence:
Read and execute commands from the first non-option argument command_string, then exit. If there are arguments after the command_string, the first argument is assigned to
$0 and any remaining arguments are assigned to the positional parameters. The assignment to
$0 sets the name of the shell, which is used in warning and error messages.
So here’s how you should understand “if no arguments remain after option processing”:
- process all the options, including effects determining what the shell will do with its arguments and input (
-s in particular);
- once that’s done, if the shell’s behaviour hasn’t been fixed yet, and no arguments remain, then ...