Before you can use the projects command, you must first login using the oc login command.
The oc get projects command will list the available projects, like this. The * character is used to indicate the current project being used.
oc get projects You have access to the following projects and can switch between them with 'oc project <projectname>': project1 * project2 project3 et cetera Using project "project2" on server "https://oc.example.com:8443".
The -q or --short flag can be used to display the current project.
oc get projects --short project2
--short=false can be used to return something like this.
oc get projects --short=false Using project "project2" on server "https://oc.example.com:8443".