shell-path - Get the $PATH from the shell

  •        5

Useful for Electron/NW.js apps as GUI apps on macOS doesn't inherit the $PATH defined in your dotfiles (.bashrc/.bash_profile/.zshrc/etc).Return a promise for the $PATH.

https://github.com/sindresorhus/shell-path

Tags
Implementation
License
Platform

   




Related Projects

electron-mocha - Run Mocha tests in Electron


and then electron will be added to your path. Or, you can download a version from https://github.com/atom/electron/releases and then set an environment variable ELECTRON_PATH pointing to the binary. Note if you're using Mac OS X, the path would be to the actual executable and not the app directory e.g. /Applications/Electron.app/Contents/MacOS/Electron.You should probably just install electron-prebuilt as it simplifies things.

mosh - Mobile Shell


packages for many operating systems, as well as instructions for building from source. Note that `mosh-client` receives an AES session key as an environment variable. If you are porting Mosh to a new operating system, please make sure that a running process's environment variables are not readable by other users. We have confirmed that this is the case on GNU/Linux, OS X, and FreeBSD.Usage----- The `mosh-client` binary must exist on the user's machine, and the `mosh-server` binary on

victory-cli - A tool for generating charts on the command line.


Then try reinstalling this module. For further information, see this thread.You will need cairo and librsvg-2 libraries which is bundled in GTK. Go to http://www.gtk.org/download/win64.php (or http://www.gtk.org/download/win32.php for 32-bit node) and download the all-in-one bundle (these instructions used the following zip http://win32builder.gnome.org/gtk+-bundle_3.6.4-20131201_win64.zip). Unzip the contents in C:\GTK (if you want to change this you must define -GTK_Root=c:\another\path shell variable to npm or node-gyp to reflect your changes), and add "C:\GTK\bin;" to the PATH environment variable in Windows, it's necessary for node-rsvg runtime to load those libs.

exec-path-from-shell - Make Emacs use the $PATH set up by the user's shell


A GNU Emacs library to ensure environment variables inside Emacs look the same as in the user's shell. This happens a lot on OS X, where an Emacs instance started from the GUI inherits a default set of environment variables.

git-open - Type `git open` to open the GitHub page or website for a repository in your browser.


Type git open to open the repo website (GitHub, GitLab, Bitbucket) in your browser. The preferred way of installation is to simply add the git-open script somewhere into your path (e.g. add the directory to your PATH environment or copy git-open into an existing included path like /usr/local/bin).


git-recent - See your latest local git branches, formatted real fancy


If you're a Windows user, you need to use Git Bash or similar shell in order to effectively use this utility. You can add the git-recent location to your path (e.g. add the directory to your PATH environment or copy git-recent into an existing included path like /usr/local/bin or ~/bin/).

Bash Environment Variable Manager


pathmgr is a script that helps manage environment variables in bash. Persistently edit variables with commands like 'path edit APP_HOME'. Change vars used in your path and then reload with 'path load PATH'. And there is more...

autoenv - Directory-based environments.


Magic per-project shell environments. Very pretentious. If a directory contains a .env file, it will automatically be executed when you cd into it. When enabled (set AUTOENV_ENABLE_LEAVE to a non-null string), if a directory contains a .env.leave file, it will automatically be executed when you leave it.

TypeScript-Sublime-Plugin - IO wrapper around TypeScript language services, allowing for easy consumption by editor plugins


The plugin uses an IO wrapper around the TypeScript language services to provide an enhanced Sublime Text experience when working with TypeScript code.The plug-in uses Node.js to run the TypeScript server. The plug-in looks for node in the PATH environment variable (which is inherited from Sublime). If the 'node_path' setting is present, this will override the PATH environment variable and the plug-in will use the value of the 'node_path' setting as the node executable to run. See more information in the tips.

cross-env - 🔀 Cross platform setting of environment scripts


Most Windows command prompts will choke when you set environment variables with NODE_ENV=production like that. (The exception is Bash on Windows, which uses native Bash.) Similarly, there's a difference in how windows and POSIX commands utilize environment variables. With POSIX, you use: $ENV_VAR and on windows you use %ENV_VAR%.cross-env makes it so you can have a single command without worrying about setting or using the environment variable properly for the platform. Just set it like you would if it's running on a POSIX system, and cross-env will take care of setting it properly.

fb-adb - A better shell for Android devices


An out-of-tree build is required. You'll need a copy of the Android NDK: tell configure about it by setting the ANDROID_NDK environment variable to your NDK path or by using the --with-android-ndk argument to the configure script.and then use gmake instead of make.

LS_COLORS - A collection of LS_COLORS definitions; needs your contribution!


This is a collection of extension:color mappings, suitable to use as your LS COLORS environment variable. Most of them use the extended color map, described in the ECMA-48 document; in other words, you'll need a terminal with capabilities of displaying 256 colors. As of this writing, around 300 different filetypes/extensions is supported. That's indeed a lot of extensions, but there's a lot more! Your help is greatly appreciated.

SublimeFixMacPath - A Sublime Text 2/3 plugin to set the PATH correctly on OS X


On OS X, Sublime Text has its PATH set by launchctl, not by your shell1. Commands like make run by Sublime Text are then unable to find non-system binaries, including those installed by homebrew and MacPorts. Fix Mac Path is a simple plugin for Sublime Text 2 and 3 which sets Sublime Text's PATH to that reported by your shell. Now, if you add homebrew's /usr/local/bin directory to your PATH in .bash_profile (or whatever other way you set your shell's PATH,) Sublime Text will inherit that PATH.

ztanesh - Improve your UNIX command line experience and productivity with ztanesh project: the tools will make your shell more powerful and easier to use


Improve your UNIX command line experience and productivity with the the configuration provided by ztanesh project: the tools will make your shell more powerful and easier to use.The screenshot above shows additional ls coloring. Prompt: top left is active virtualenv etc. development environment, top right is server, time, bottom right is path.

Environment Modules


The environment modules package provides for an easy dynamic modification of a user's environment via modulefiles. which typically instruct the module command to alter or set shell environment variables such as PATH, MANPATH, etc. as well as define aliases over a variety of shells.

smartcd - Alter your bash (or zsh) environment as you cd


smartcd is a library for bash and zsh which brings transformative power to your fingertips. The basic premise is that as you move around your computer using the shell, actions can be automatically taken to provide you with the environment you really want, not the one you're accustomed to putting up with.

dotfiles - 💻 macOS / Ubuntu dotfiles


These are the base dotfiles that I start with when I set up a new environment. For more specific local needs I use the .local files described in the Local Settings section. The ~/.bash.local file it will be automatically sourced after all the other bash related files, thus, allowing its content to add to or overwrite the existing aliases, settings, PATH, etc.

dotfiles - My macOS environment: zsh, Oh My Zsh, Git, etc.


Now you can run scripts like osx.sh or server.sh to install other stuff. You can use any file extensions in tilde/ to invoke proper syntax highlighting in code editor.

better-npm-run - Better NPM scripts runner


The betterScripts script definition can either be a string or sub-object with command and env attributes. Values defined in the env block will override previously set environment variables. Note that depending on the OS and terminal you're using, dots, spaces or other special characters in the command path may be treated as separators and the command will be parsed wrong.

n - Node version management


Node.js version management: no subshells, no profile setup, no convoluted API, just simple.to install n to bin/n of the directory specified in the environment variable $PREFIX, which defaults to /usr/local (note that you will likely need to use sudo). To install n in a custom location (such as $CUSTOM_LOCATION/bin/n), run PREFIX=$CUSTOM_LOCATION make install.