Skip to content

Commit

Permalink
Completion for :browse command.
Browse files Browse the repository at this point in the history
  • Loading branch information
manzyuk committed Jan 27, 2012
1 parent 80c9f9f commit 84b306b
Showing 1 changed file with 25 additions and 20 deletions.
45 changes: 25 additions & 20 deletions ghci-completion.el
Expand Up @@ -78,26 +78,6 @@
":show")
"Commands available from the GHCi prompt.")

(defun pcomplete/:add ()
(while (pcomplete-here* (pcomplete-entries))))

(defvar ghci-show-commands
'("bindings"
"breaks"
"contexts"
"modules"
"packages"
"languages"
"args"
"prog"
"prompt"
"editor"
"stop")
"GHCi commands for displaying information.")

(defun pcomplete/:show ()
(pcomplete-here* ghci-show-commands))

(defvar exposed-modules nil
"The list of exposed modules.")

Expand All @@ -119,9 +99,34 @@ packages in both the global and user databases."
(defun update-exposed-modules ()
(setq exposed-modules (exposed-modules)))

(defun pcomplete/:add ()
(while (pcomplete-here* (pcomplete-entries))))

(defun pcomplete/:browse ()
(pcomplete-here* exposed-modules))

(fset 'pcomplete/:browse! 'pcomplete/:browse)

(defun pcomplete/:module ()
(while (pcomplete-here* exposed-modules)))

(defvar ghci-show-commands
'("bindings"
"breaks"
"contexts"
"modules"
"packages"
"languages"
"args"
"prog"
"prompt"
"editor"
"stop")
"GHCi commands for displaying information.")

(defun pcomplete/:show ()
(pcomplete-here* ghci-show-commands))

(fset 'pcomplete/:m 'pcomplete/:module)

(defvar ghci-completion-mode nil
Expand Down

0 comments on commit 84b306b

Please sign in to comment.