Skip to content
/ elenv Public
forked from jcs-elpa/elenv

Environment variable management

License

Notifications You must be signed in to change notification settings

jxl-info/elenv

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

51 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

License: GPL v3 JCS-ELPA Built with

elenv

Environment variable management

CI

The package name `elenv' stands for Emacs Lisp environment.

Table of Contents

๐Ÿ”จ Usage

๐Ÿ–ฅ๏ธ Operating System

[v] elenv-windows

(when elenv-windows ...  ; is windows

[v] elenv-darwin

(when elenv-darwin ...  ; is darwin

[v] elenv-macos

(when elenv-macos ...  ; is macos

[v] elenv-linux

(when elenv-linux ...  ; is linux

[v] elenv-bsd

(when elenv-bsd ...  ; is bsd

[v] elenv-unix

(when elenv-unix ...  ; is unix

[v] elenv-system-type

(cl-case elenv-system-type  ; return current OS in symbol
  (`windows ...

[m] elenv-with-os

(elenv-with-os 'windows ...  ; accept list

[m] elenv-with-windows

(elenv-with-windows ...  ; do stuff in windows

[m] elenv-with-macos

(elenv-with-macos ...  ; do stuff in macos

[m] elenv-with-linux

(elenv-with-linux ...  ; do stuff in linux

[m] elenv-with-bsd

(elenv-with-bsd ...  ; do stuff in bsd

[m] elenv-with-unix

(elenv-with-unix ...  ; do stuff in unix

โ›“๏ธ Environment

[m] elenv-if-env

(elenv-if-env "PATH"
                ...  ; do stuff when VARIABLE exists; expose it as `value'.
  ...                ; else we execute the ELSE block

[m] elenv-when-env

(elenv-when-env "PATH" ...  ; do stuff when VARIABLE exists; expose it as `value'.

[m] elenv-unless-env

(elenv-unless-env "PATH" ...  ; do stuff unless VARIABLE exists; expose it as `value'.

โš™๏ธ Executable

[m] elenv-if-exec

(elenv-if-exec "node" nil 
                ...  ; do stuff if PROGRAM exists; expose it as `value'.
  ...                ; else we execute the ELSE block

[m] elenv-when-exec

(elenv-when-exec "node" nil ...  ; do stuff when PROGRAM exists; expose it as `value'.

[m] elenv-unless-exec

(elenv-unless-exec "node" nil ...  ; do stuff unless PROGRAM exists; expose it as `value'.

๐Ÿ–ผ๏ธ Graphic

[v] elenv-graphic-p

(when elenv-graphic-p ...  ; do stuff in graphic mode

๐Ÿ” Debugging

[f] elenv-debugging-p

(when (elenv-debugging-p) ...  ; do stuff in debug mode

๐Ÿ› ๏ธ Contribute

PRs Welcome Elisp styleguide Donate on paypal Become a patron

If you would like to contribute to this project, you may either clone and make pull requests to this repository. Or you can clone the project and establish your own branch of this tool. Any methods are welcome!

๐Ÿ”ฌ Development

To run the test locally, you will need the following tools:

Install all dependencies and development dependencies:

$ eask install-deps --dev

To test the package's installation:

$ eask package
$ eask install

To test compilation:

$ eask compile

๐Ÿชง The following steps are optional, but we recommend you follow these lint results!

The built-in checkdoc linter:

$ eask lint checkdoc

The standard package linter:

$ eask lint package

๐Ÿ“ P.S. For more information, find the Eask manual at https://emacs-eask.github.io/.

โšœ๏ธ License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

See LICENSE for details.

About

Environment variable management

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 91.9%
  • Makefile 8.1%