Controlling input values for an option
Parameters are at the heart of any application. They allow users to indicate what command they want to execute and provide values to the input parameters. This is why, in this section and its subsections, we will cover the subtleties of dealing with these parameters.
Required versus non-required options
In its current state, adding a new bookmark requires both the name and the URL to be provided, which is, obviously, what we want.
This means that if we call the link add
command without passing one of these options or their values, we should get an error such as the following:

Figure 5.1 – The name and URL for a bookmark should be required
However, if we run the program without passing these two options, we currently get the following result:

Figure 5.2 – The name and URL for the added bookmark are currently optional
Notice how a new bookmark with no name and...