Index: uspace/app/bdsh/cmds/builtins/cd/cd.c
===================================================================
--- uspace/app/bdsh/cmds/builtins/cd/cd.c	(revision 43e02a6fa3d0ad9f13fe920424ab329f790f03f1)
+++ uspace/app/bdsh/cmds/builtins/cd/cd.c	(revision 0c4f46a603589b7cb4d0b2cf3fef9dea77569007)
@@ -87,4 +87,5 @@
 
 	if (rc == 0) {
+		cli_set_prompt(usr);
 		return CMD_SUCCESS;
 	} else {
Index: uspace/app/bdsh/scli.c
===================================================================
--- uspace/app/bdsh/scli.c	(revision 43e02a6fa3d0ad9f13fe920424ab329f790f03f1)
+++ uspace/app/bdsh/scli.c	(revision 0c4f46a603589b7cb4d0b2cf3fef9dea77569007)
@@ -57,36 +57,4 @@
 static void cli_finit(cliuser_t *usr);
 
-/* (re)allocates memory to store the current working directory, gets
- * and updates the current working directory, formats the prompt
- * string */
-unsigned int cli_set_prompt(cliuser_t *usr)
-{
-	usr->prompt = (char *) realloc(usr->prompt, PATH_MAX);
-	if (NULL == usr->prompt) {
-		cli_error(CL_ENOMEM, "Can not allocate prompt");
-		return 1;
-	}
-	memset(usr->prompt, 0, sizeof(usr->prompt));
-
-	usr->cwd = (char *) realloc(usr->cwd, PATH_MAX);
-	if (NULL == usr->cwd) {
-		cli_error(CL_ENOMEM, "Can not allocate cwd");
-		return 1;
-	}
-	memset(usr->cwd, 0, sizeof(usr->cwd));
-
-	usr->cwd = getcwd(usr->cwd, PATH_MAX - 1);
-
-	if (NULL == usr->cwd)
-		snprintf(usr->cwd, PATH_MAX, "(unknown)");
-
-	if (1 < cli_psprintf(&usr->prompt, "%s # ", usr->cwd)) {
-		cli_error(cli_errno, "Failed to set prompt");
-		return 1;
-	}
-
-	return 0;
-}
-
 /* Constructor */
 static int cli_init(cliuser_t *usr)
@@ -125,5 +93,4 @@
 
 	while (!cli_quit) {
-		cli_set_prompt(&usr);
 		get_input(&usr);
 		if (NULL != usr.line) {
Index: uspace/app/bdsh/scli.h
===================================================================
--- uspace/app/bdsh/scli.h	(revision 43e02a6fa3d0ad9f13fe920424ab329f790f03f1)
+++ uspace/app/bdsh/scli.h	(revision 0c4f46a603589b7cb4d0b2cf3fef9dea77569007)
@@ -14,5 +14,3 @@
 } cliuser_t;
 
-extern unsigned int cli_set_prompt(cliuser_t *usr);
-
 #endif
Index: uspace/app/bdsh/util.c
===================================================================
--- uspace/app/bdsh/util.c	(revision 43e02a6fa3d0ad9f13fe920424ab329f790f03f1)
+++ uspace/app/bdsh/util.c	(revision 0c4f46a603589b7cb4d0b2cf3fef9dea77569007)
@@ -248,2 +248,37 @@
 }
 
+/* (re)allocates memory to store the current working directory, gets
+ * and updates the current working directory, formats the prompt
+ * string */
+unsigned int cli_set_prompt(cliuser_t *usr)
+{
+	usr->prompt = (char *) realloc(usr->prompt, PATH_MAX);
+	if (NULL == usr->prompt) {
+		cli_error(CL_ENOMEM, "Can not allocate prompt");
+		cli_errno = CL_ENOMEM;
+		return 1;
+	}
+	memset(usr->prompt, 0, sizeof(usr->prompt));
+
+	usr->cwd = (char *) realloc(usr->cwd, PATH_MAX);
+	if (NULL == usr->cwd) {
+		cli_error(CL_ENOMEM, "Can not allocate cwd");
+		cli_errno = CL_ENOMEM;
+		return 1;
+	}
+	memset(usr->cwd, 0, sizeof(usr->cwd));
+
+	usr->cwd = getcwd(usr->cwd, PATH_MAX - 1);
+
+	if (NULL == usr->cwd)
+		snprintf(usr->cwd, PATH_MAX, "(unknown)");
+
+	if (1 < cli_psprintf(&usr->prompt, "%s # ", usr->cwd)) {
+		cli_error(cli_errno, "Failed to set prompt");
+		return 1;
+	}
+
+	return 0;
+}
+
+
Index: uspace/app/bdsh/util.h
===================================================================
--- uspace/app/bdsh/util.h	(revision 43e02a6fa3d0ad9f13fe920424ab329f790f03f1)
+++ uspace/app/bdsh/util.h	(revision 0c4f46a603589b7cb4d0b2cf3fef9dea77569007)
@@ -1,4 +1,6 @@
 #ifndef UTIL_H
 #define UTIL_H
+
+#include "scli.h"
 
 /* Internal string handlers */
@@ -8,5 +10,8 @@
 extern char * cli_strtok_r(char *, const char *, char **);
 extern char * cli_strtok(char *, const char *);
+
+/* Utility functions */
 extern unsigned int cli_count_args(char **);
+extern unsigned int cli_set_prompt(cliuser_t *usr);
 
 #endif
