Commit 0d378cfa authored by Eric Timmons's avatar Eric Timmons
Browse files

Remove context subcommands

parent c485bef9
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@
          #:clpm-cli/commands/client
          #:clpm-cli/commands/clpi
          #:clpm-cli/commands/config
          #:clpm-cli/commands/context
          #:clpm-cli/commands/exec
          #:clpm-cli/commands/find
          #:clpm-cli/commands/hack

cli/commands/context.lisp

deleted100644 → 0
+0 −16
Original line number Diff line number Diff line
;;;; Context command definitions
;;;;
;;;; This software is part of CLPM. See README.org for more information. See
;;;; LICENSE for license information.

(uiop:define-package #:clpm-cli/commands/context
    (:use #:cl
          #:clpm-cli/commands/context/common
          #:clpm-cli/commands/context/find
          #:clpm-cli/commands/context/output-translations
          #:clpm-cli/commands/context/pathnames
          #:clpm-cli/commands/context/source-registry
          #:clpm-cli/commands/context/systems
          #:clpm-cli/commands/context/visible-systems))

(in-package #:clpm-cli/commands/context)

cli/commands/context/common.lisp

deleted100644 → 0
+0 −24
Original line number Diff line number Diff line
;;;; Common context CLI functions
;;;;
;;;; This software is part of CLPM. See README.org for more information. See
;;;; LICENSE for license information.

(uiop:define-package #:clpm-cli/commands/context/common
    (:use #:cl
          #:alexandria
          #:clpm-cli/common-args
          #:clpm-cli/interface-defs)
  (:import-from #:adopt)
  (:import-from #:cl-ppcre))

(in-package #:clpm-cli/commands/context/common)

(defparameter *default-ui*
  (adopt:make-interface
   :name "clpm context"
   :summary "Common Lisp Package Manager Context"
   :usage "context [options] subcommand"
   :help "Context commands"
   :contents (list *group-common*)))

(define-cli-command-folder (("context") *default-ui*))

cli/commands/context/find.lisp

deleted100644 → 0
+0 −35
Original line number Diff line number Diff line
;;;; clpm context find
;;;;
;;;; This software is part of CLPM. See README.org for more information. See
;;;; LICENSE for license information.

(uiop:define-package #:clpm-cli/commands/context/find
    (:use #:cl
          #:alexandria
          #:clpm/config
          #:clpm/context
          #:clpm-cli/commands/context/common
          #:clpm-cli/common-args
          #:clpm-cli/interface-defs
          #:clpm/source)
  (:import-from #:adopt))

(in-package #:clpm-cli/commands/context/find)

(defparameter *context-find-ui*
  (adopt:make-interface
   :name "clpm context find"
   :summary "Common Lisp Package Manager Context Find"
   :usage "context find [options] SYSTEM-NAME"
   :help "List the pathname to a system in the context"
   :contents (list *group-common*
                   *option-context*)))

(define-cli-command (("context" "find") *context-find-ui*) (args options)
  (declare (ignore options))
  (assert (length= 1 args))
  (let* ((context-name (config-value :context))
         (pathname (context-find-system-asd-pathname context-name (first args))))
    (when pathname
      (format t "~A~%" pathname)
      t)))
+0 −33
Original line number Diff line number Diff line
;;;; clpm context output-translations
;;;;
;;;; This software is part of CLPM. See README.org for more information. See
;;;; LICENSE for license information.

(uiop:define-package #:clpm-cli/commands/context/output-translations
    (:use #:cl
          #:alexandria
          #:clpm/context
          #:clpm-cli/commands/context/common
          #:clpm-cli/common-args
          #:clpm-cli/interface-defs)
  (:import-from #:adopt))

(in-package #:clpm-cli/commands/context/output-translations)

(defparameter *context-output-translations-ui*
  (adopt:make-interface
   :name "clpm context output-translations"
   :summary "Common Lisp Package Manager Context Output-Translations"
   :usage "context output-translations [options] CONTEXT-NAME"
   :help "Print an ASDF output-translations form using the projects installed in a context"
   :contents (list *group-common*)))

(define-cli-command (("context" "output-translations") *context-output-translations-ui*) (args options)
  (declare (ignore options))
  (assert (length= 1 args))
  (when-let ((output-translations (context-output-translations (first args))))
    (with-standard-io-syntax
      (let ((*print-case* :downcase))
        (prin1 output-translations))
      (terpri)))
  t)
Loading