dundalek / closh

Bash-like shell based on Clojure
Eclipse Public License 1.0
1.62k stars 66 forks source link

Cannot use ~ #8

Closed sirolf2009 closed 6 years ago

sirolf2009 commented 6 years ago

This works fine

$ nano .closhrc

This does not

$ nano ~/.closhrc
                      ⬆
WARNING: No such namespace: , could not locate .cljs, .cljc, or JavaScript source providing "" at line 1

                      ⬆
WARNING: Use of undeclared Var / at line 1

Unexpected token .
         createScript (vm.cljs:74:10)
         Object.runInThisContext (vm.cljs:116:10)
         (Object.lt)
         (Object.lumo.repl.caching_node_eval)
         (NO_SOURCE_FILE <embedded>:6020:273)
         z (NO_SOURCE_FILE <embedded>:6021:263)
         Object.cljs.js.eval_str_STAR_ (NO_SOURCE_FILE <embedded>:6022:328)
         Function.cljs.js.eval_str.cljs$core$IFn$_invoke$arity$5 (NO_SOURCE_FILE <embedded>:6025:508)
         lumo.repl.execute_text (NO_SOURCE_FILE <embedded>:6511:475)
         closh$eval$execute_text (evalmachine.<anonymous>:7:24)

"$ "

Same goes for cd

$ cd ~
Unmatched delimiter ).
         (new)
         Function.cljs.core.ex_info.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:1928:72)
         Function.cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2 (NO_SOURCE_FILE <embedded>:1927:449)
         Function.cljs.tools.reader.impl.errors.throw_ex.cljs$core$IFn$_invoke$arity$variadic (evalmachine.<anonymous>:53:25)
         Function.cljs.tools.reader.impl.errors.reader_error.cljs$core$IFn$_invoke$arity$variadic (evalmachine.<anonymous>:91:47)
         (Object.cljs$tools$reader$impl$errors$throw_unmatch_delimiter)
         cljs.tools.reader.read_unmatched_delimiter (NO_SOURCE_FILE <embedded>:2157:270)
         Object.cljs.tools.reader.read_STAR__internal (NO_SOURCE_FILE <embedded>:2269:407)
         Function.cljs.tools.reader.read_STAR_.cljs$core$IFn$_invoke$arity$6 (NO_SOURCE_FILE <embedded>:2272:111)
         Function.cljs.tools.reader.read_STAR_.cljs$core$IFn$_invoke$arity$5 (NO_SOURCE_FILE <embedded>:2271:116)

"$ "
dundalek commented 6 years ago

Yeah, we are starting to hit limitations of the builtin Clojure reader. I need to figure out a solution, probably writing custom parser.