Skip to content

Commit

Permalink
fix: Update add-namespace handler to ask for alias
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidz committed Mar 3, 2024
1 parent 6ef57ab commit 4daa624
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/elin/handler/namespace.clj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
(first)
(symbol)
(or (e/not-found)))
alias-sym (e.f.c.namespace/most-used-namespace-alias elin ns-sym)
default-alias-sym (e.f.c.namespace/most-used-namespace-alias elin ns-sym)
alias-str (e.f.vim/input!! host
(format "Alias for '%s': " ns-sym)
(str default-alias-sym))
alias-sym (when (seq alias-str)
(symbol alias-str))
ns-form (e.f.v.sexp/get-namespace-form!! host)]
(if (has-namespace? ns-form ns-sym)
(e.p.rpc/echo-text host (format "'%s' already exists." ns-sym) "WarningMsg")
Expand Down

0 comments on commit 4daa624

Please sign in to comment.