EnglishFrenchSpanish

OnWorks favicon

direnv-stdlib - Online in the Cloud

Run direnv-stdlib in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command direnv-stdlib that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


direnv_stdlib - the ".envrc" stdlib

SYNOPSIS


direnv stdlib

DESCRIPTION


Outputs a bash script called the stdlib. The following commands are included in that
script and loaded in the context of an ".envrc". In addition, it also loads the file in
"~/.direnvrc" if it exists.

STDLIB


· has command: Returns 0 if the command is available. Returns 1 otherwise. It can
be a binary in the PATH or a shell function.

Example:

if has curl; then
echo "Yes we do"
fi

· expand_path rel_path [relative_to]: Outputs the absolute path of rel_path
relative to relative_to or the current directory.

Example:

cd /usr/local/games
expand_path ../foo
# output: /usr/local/foo

· dotenv [dotenv_path]: Loads a ".env" file into the current environment

· user_rel_path abs_path: Transforms an absolute path abs_path into a user-relative
path if possible.

Example:

echo $HOME
# output: /home/user
user_rel_path /home/user/my/project
# output: ~/my/project
user_rel_path /usr/local/lib
# output: /usr/local/lib

· find_up filename: Outputs the path of filename when searched from the current
directory up to /. Returns 1 if the file has not been found.

Example:

cd /usr/local/my
mkdir -p project/foo
touch bar
cd project/foo
find_up bar
# output: /usr/local/my/bar

· source_env fileordir_path: Loads another ".envrc" either by specifying its path
or filename.

· source_up [filename]: Loads another ".envrc" if found with the find_up command.

· direnv_load [command-generating-dump-output] Applies the environment generated by
running argv as a command. This is useful for adopting the environment of a child
process - cause that process to run "direnv dump" and then wrap the results with
direnv_load.

Example:

direnv_load opam-env exec -- direnv dump

· PATH_add path: Prepends the expanded path to the PATH environment variable. It
prevents a common mistake where PATH is replaced by only the new path.

Example:

pwd
# output: /home/user/my/project
PATH_add bin
echo $PATH
# output: /home/user/my/project/bin:/usr/bin:/bin

· path_add varname path: Works like PATH_add except that it's for an arbitrary
varname.

· load_prefix prefix_path: Expands some common path variables for the given
prefix_path prefix. This is useful if you installed something in the prefix_path
using ./configure --prefix=$prefix_path && make install and want to use it in the
project.

Variables set:

CPATH
LD_LIBRARY_PATH
LIBRARY_PATH
MANPATH
PATH
PKG_CONFIG_PATH

Example:

./configure --prefix=$HOME/rubies/ruby-1.9.3
make && make install
# Then in the .envrc
load_prefix ~/rubies/ruby-1.9.3

· layout type: A semantic dispatch used to describe common project layouts.

· layout go: Sets the GOPATH environment variable to the current directory.

· layout node: Adds "$PWD/node_modules/.bin" to the PATH environment variable.

· layout perl: Setup environment variables required by perl's local::lib See
http://search.cpan.org/dist/local-lib/lib/local/lib.pm⟩ for more details

· layout python [python_exe]: Creates and loads a virtualenv environment under
$PWD/.direnv/python-$python_version. This forces the installation of any egg into
the project's sub-folder.

It's possible to specify the python executable if you want to use different
versions of python (eg: layout python python3).

Note that previously virtualenv was located under $PWD/.direnv/virtualenv and will
be re-used by direnv if it exists.

· layout python3: A shortcut for layout python python3

· layout ruby: Sets the GEMHOME environment variable to
`$PWD/.direnv/ruby/RUBYVERSION. This forces the installation of any gems into the
project's sub-folder. If you're using bundler it will create wrapper programs
that can be invoked directly instead of using thebundle exec` prefix.

· use program_name [version]: A semantic command dispatch intended for loading
external dependencies into the environment.

Example:

use_ruby() {
echo "Ruby $1"
}
use ruby 1.9.3
# output: Ruby 1.9.3

· use rbenv: Loads rbenv which add the ruby wrappers available on the PATH.

· use nix [...]: Load environment variables from nix-shell.

If you have a default.nix or shell.nix these will be used by default, but you can
also specify packages directly (e.g use nix -p ocaml).

See ⟨http://nixos.org/nix/manual/#sec-nix-shell⟩

· rvm ...: Should work just like in the shell if you have rvm installed.

COPYRIGHT


Copyright (C) 2014 zimbatm ⟨http://zimbatm.com⟩ and contributors under the MIT licence.

Use direnv-stdlib online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Psi
    Psi
    Psi is cross-platform powerful XMPP
    client designed for experienced users.
    There are builds available for MS
    Windows, GNU/Linux and macOS.. Audience:
    End Users...
    Download Psi
  • 2
    Blobby Volley 2
    Blobby Volley 2
    Official continuation of the famous
    Blobby Volley 1.x arcade game..
    Audience: End Users/Desktop. User
    interface: OpenGL, SDL. Programming
    Language: C++, Lua. C...
    Download Blobby Volley 2
  • 3
    SuiteCRM
    SuiteCRM
    SuiteCRM is the award-winning Customer
    Relationship Management (CRM)
    application brought to you by authors
    and maintainers, SalesAgility. It is the
    world�s mos...
    Download SuiteCRM
  • 4
    Poweradmin
    Poweradmin
    Poweradmin is a web-based DNS
    administration tool for PowerDNS server.
    The interface has full support for most
    of the features of PowerDNS. It has full
    support...
    Download Poweradmin
  • 5
    Gin Web Framework
    Gin Web Framework
    Gin is an incredibly fast web framework
    written in Golang that can perform up to
    40 times faster, thanks to its
    martini-like API and custom version of
    httprout...
    Download Gin Web Framework
  • 6
    CEREUS LINUX
    CEREUS LINUX
    CEREUS LINUX basado en MX LINUX con
    varios entornos de escritorios. This is
    an application that can also be fetched
    from
    https://sourceforge.net/projects/cereu...
    Download CEREUS LINUX
  • More »

Linux commands

  • 1
    aa-clickquery
    aa-clickquery
    aa-clickquery - program for querying
    click-apparmor DESCRIPTION: This program
    is used to query click-apparmor for
    information. USAGE: aa-clickquery
    --click-fra...
    Run aa-clickquery
  • 2
    aa-exec-click
    aa-exec-click
    aa-exec-click - program for executing
    click packages under confinement
    DESCRIPTION: This program is used to
    execute click package under AppArmor
    confinement. I...
    Run aa-exec-click
  • 3
    cpio
    cpio
    cpio - copy files to and from archives ...
    Run cpio
  • 4
    cpipe
    cpipe
    cpipe - copy stdin to stdout while
    counting bytes and reporting progress ...
    Run cpipe
  • 5
    FvwmSave
    FvwmSave
    FvwmSave - the Fvwm desktop-layout
    saving module ...
    Run FvwmSave
  • 6
    FvwmSave1
    FvwmSave1
    FvwmSave - the FVWM desktop-layout
    saving module ...
    Run FvwmSave1
  • More »

Ad