Index: kernel/generic/src/console/kconsole.c
===================================================================
--- kernel/generic/src/console/kconsole.c	(revision 669e9b5e211eed89f10f66a6b6ccbdf26177076d)
+++ kernel/generic/src/console/kconsole.c	(revision d9ffc54b9ab4006fc5c4bddf9d6738ef57935a65)
@@ -362,6 +362,4 @@
 				putchar(current[position]);
 			
-			if (position == 0)
-				continue;
 			
 			/*
@@ -370,14 +368,37 @@
 			 */
 			size_t beg;
-			for (beg = position - 1; (beg > 0) && (!isspace(current[beg]));
-			    beg--);
-			
-			if (isspace(current[beg]))
-				beg++;
-			
-			wstr_to_str(tmp, position - beg + 1, current + beg);
-			
+			unsigned narg = 0;
+			if (position == 0) {
+				tmp[0] = '\0';
+				beg = 0;
+			} else {
+				for (beg = position - 1;
+				    (beg > 0) && (!isspace(current[beg]));
+				    beg--) {
+					;
+				}
+				
+				if (isspace(current[beg]))
+					beg++;
+				
+				wstr_to_str(tmp, position - beg + 1, current + beg);
+			}
+			
+			/* Count which argument number are we tabbing (narg=0 is cmd) */
+			bool sp = false;
+			for (; beg > 0; beg--) {
+				if (isspace(current[beg])) {
+					if (!sp) {
+						narg++;
+						sp = true;
+					}
+				} else
+					sp = false;
+			}
+			if (narg && isspace(current[0]))
+				narg--;
+
 			int found;
-			if (beg == 0) {
+			if (narg == 0) {
 				/* Command completion */
 				found = cmdtab_compl(tmp, STR_BOUNDS(MAX_CMDLINE), indev,
@@ -386,5 +407,5 @@
 				/* Arguments completion */
 				cmd_info_t *cmd = parse_cmd(current);
-				if (!cmd || !cmd->hints_enum)
+				if (!cmd || !cmd->hints_enum || cmd->argc < narg)
 					continue;
 				found = cmdtab_compl(tmp, STR_BOUNDS(MAX_CMDLINE), indev,
