Writing (in-ns \'dbx) to a file and loading it isn\'t changing the default namespace of the repl (using cygwin/console). The namespace is still user=><
In addition to Carlos' answer suggesting :repl-options {:init-ns foo.bar}, I have also had success with adding :dev {:main user} to my profile.clj.
To give more context:
;; /foo/profile.clj
...
:main foo.core
:dev {:main user
:source-paths ["dev"]}`
...
;; /foo/dev/user.clj
(ns user
(:require
[clojure.pprint :refer (pprint)]
[clojure.repl :refer :all]
[clojure.string :as str]
[clojure.test :refer [run-tests run-all-tests]]
[clojure.tools.namespace.repl :refer [refresh refresh-all]]))