Skip to content

Commit

Permalink
Fix shell completion bugs #162
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesloetzsch committed Nov 3, 2019
1 parent 8a2fc67 commit 3ac1072
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion resources/completion/completion.bash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env -S bash -i

# Author: Brian Beffa <brbsix@gmail.com>
# Original source: https://brbsix.github.io/2015/11/29/accessing-tab-completion-programmatically-in-bash/
Expand Down
2 changes: 1 addition & 1 deletion src/common/closh/zero/service/completion.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
(str "complete --do-complete=" (escape-fish-string (first args)))])
(if-let [resource (io/resource cmd)]
(pipe (slurp resource)
(shx shell (cons "-s" args)))
(shx shell (concat ["-i" "-s"] args)))
(shx (str (getenv "CLOSH_SOURCES_PATH") "/resources/" cmd) args))))
stream (out-stream proc)]
(chain->
Expand Down
3 changes: 1 addition & 2 deletions src/jvm/closh/zero/frontend/rebel.clj
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@
(let [word (.word line)]
(when (and
(:completion @api/*line-reader*)
(not (string/blank? word))
(pos? (count word)))
(not (string/blank? (.line line))))
(let [options (let [ns' (clj-line-reader/current-ns)
context (clj-line-reader/complete-context line)]
(cond-> {}
Expand Down

0 comments on commit 3ac1072

Please sign in to comment.