Skip to content

Commit

Permalink
Merge pull request #35 from TyOverby/patch-1
Browse files Browse the repository at this point in the history
Add cargo-process-run-bin for running specific binaries
  • Loading branch information
kwrooijen authored Jan 24, 2017
2 parents 670b34d + 8591bd8 commit d17c66a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cargo-process.el
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
;; * cargo-process-init - Create a new cargo project inside an existing directory.
;; * cargo-process-run - Build and execute src/main.rs.
;; * cargo-process-run-example - Build and execute with --example <name>.
;; * cargo-process-run-bin - Build and execute a specific binary.
;; * cargo-process-search - Search registry for crates.
;; * cargo-process-test - Run all unit tests.
;; * cargo-process-update - Update dependencies listed in Cargo.lock.
Expand Down Expand Up @@ -282,6 +283,15 @@ Cargo: Build and execute src/main.rs."
(interactive)
(cargo-process--start "Run" "cargo run"))

;;;###autoload
(defun cargo-process-run-bin (command)
"Run the Cargo run command --bin <name>.
With the prefix argument, modify the command's invocation.
Cargo: Build and execute a specific binary"
(interactive)
(cargo-process--start (concat "Run " command)
(concat "cargo run --bin " command)))

;;;###autoload
(defun cargo-process-run-example (command)
"Run the Cargo run command --example <name>.
Expand Down

0 comments on commit d17c66a

Please sign in to comment.