diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Builtin.java b/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Builtin.java
index b0b10a7..74f4291 100644
--- a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Builtin.java
+++ b/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Builtin.java
@@ -459,6 +459,20 @@
     }
 
     public void jobs(CommandSession session, String[] argv) {
+        final String[] usage = {"jobs - list jobs",
+                "Usage: jobs [OPTIONS]",
+                "  -? --help                show help",
+        };
+        Options opt = Options.compile(usage).parse(argv);
+        if (opt.isSet("help")) {
+            opt.usage(System.err);
+            return;
+        }
+        if (!opt.args().isEmpty()) {
+            System.err.println("usage: jobs");
+            session.error(2);
+            return;
+        }
         List<Job> jobs = session.jobs();
         Job current = session.currentJob();
         for (Job job : jobs) {
@@ -470,6 +484,20 @@
     }
 
     public void fg(CommandSession session, String[] argv) {
+        final String[] usage = {"fg - put job in foreground",
+                "Usage: fg [OPTIONS] [jobid]",
+                "  -? --help                show help",
+        };
+        Options opt = Options.compile(usage).parse(argv);
+        if (opt.isSet("help")) {
+            opt.usage(System.err);
+            return;
+        }
+        if (opt.args().size() > 1) {
+            System.err.println("usage: fg [jobid]");
+            session.error(2);
+            return;
+        }
         List<Job> jobs = session.jobs();
         Collections.reverse(jobs);
         Job current = session.currentJob();
@@ -480,6 +508,7 @@
                 job.foreground();
             } else {
                 System.err.println("fg: no current job");
+                session.error(1);
             }
         } else {
             Job job = jobs.stream().filter(j -> j != current && argv[0].equals(Integer.toString(j.id())))
@@ -488,11 +517,26 @@
                 job.foreground();
             } else {
                 System.err.println("fg: job not found: " + argv[0]);
+                session.error(1);
             }
         }
     }
 
     public void bg(CommandSession session, String[] argv) {
+        final String[] usage = {"bg - put job in background",
+                "Usage: bg [OPTIONS] [jobid]",
+                "  -? --help                show help",
+        };
+        Options opt = Options.compile(usage).parse(argv);
+        if (opt.isSet("help")) {
+            opt.usage(System.err);
+            return;
+        }
+        if (opt.args().size() > 1) {
+            System.err.println("usage: bg [jobid]");
+            session.error(2);
+            return;
+        }
         List<Job> jobs = session.jobs();
         Collections.reverse(jobs);
         Job current = session.currentJob();
@@ -502,7 +546,8 @@
             if (job != null) {
                 job.background();
             } else {
-                System.err.println("fg: no current job");
+                System.err.println("bg: no current job");
+                session.error(1);
             }
         } else {
             Job job = jobs.stream().filter(j -> j != current && argv[0].equals(Integer.toString(j.id())))
@@ -510,7 +555,8 @@
             if (job != null) {
                 job.background();
             } else {
-                System.err.println("fg: job not found: " + argv[0]);
+                System.err.println("bg: job not found: " + argv[0]);
+                session.error(1);
             }
         }
     }
diff --git a/gogo/jline/src/main/resources/gosh_profile b/gogo/jline/src/main/resources/gosh_profile
index 068f5d1..22ccf22 100644
--- a/gogo/jline/src/main/resources/gosh_profile
+++ b/gogo/jline/src/main/resources/gosh_profile
@@ -240,6 +240,15 @@
   complete -c gogo:tmux -e
   complete -c gogo:tmux -d "Terminal multiplexer"
 
+  complete -c gogo:bg -e
+  complete -c gogo:bg -d "Put job in background"
+
+  complete -c gogo:fg -e
+  complete -c gogo:fg -d "Put job in foreground"
+
+  complete -c gogo:jobs -e
+  complete -c gogo:jobs -d "List jobs"
+
   # print welcome message
   cat ($0 resolve motd)
 } {
