Skip to content

Commit

Permalink
Add exec-path command
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Mar 19, 2022
1 parent e3098c8 commit 3b37957
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
19 changes: 19 additions & 0 deletions cmds/exec-path.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* $File: exec-path.js $
* $Date: 2022-03-20 02:45:07 $
* $Revision: $
* $Creator: Jen-Chieh Shen $
* $Notice: See LICENSE.txt for modification and distribution information
* Copyright © 2022 by Shen, Jen-Chieh $
*/

"use strict";

const util = require("../src/util");

exports.command = 'exec-path';
exports.desc = 'print the exec-path from workspace';

exports.handler = async ({}) => {
await util.e_call('exec-path');
};
25 changes: 25 additions & 0 deletions lisp/exec-path.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
;;; exec-path.el --- Print the exec-path from workspace -*- lexical-binding: t; -*-

;;; Commentary:
;;
;; Print the exec-path from workspace
;;
;; $ eask exec-path
;;

;;; Code:

(load-file (expand-file-name
"_prepare.el"
(file-name-directory (nth 1 (member "-scriptload" command-line-args)))))

(defun eask--print-exec-path (path)
"Print out the PATH."
(message "%s" path))

(eask-start
(eask-pkg-init)
(eask--add-bin-exec-path)
(mapc #'eask--print-exec-path exec-path))

;;; exec-path.el ends here

0 comments on commit 3b37957

Please sign in to comment.