aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/README.md
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-07-18 01:24:16 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-07-18 01:24:16 +0300
commit36730a76d7ef134ef34daaab7e9ef7590706702f (patch)
treee851fb38edc6298e9201328589947f1cce679655 /README.md
parentrefactoring (diff)
downloadwindows-env-36730a76d7ef134ef34daaab7e9ef7590706702f.tar.gz
windows-env-36730a76d7ef134ef34daaab7e9ef7590706702f.zip
README update
Diffstat (limited to '')
-rw-r--r--README.md89
1 files changed, 89 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9d1ae7c..0ddbe6a 100644
--- a/README.md
+++ b/README.md
@@ -8,6 +8,95 @@ mainly to:
* make it easier to add paths to the `PATH` variable, automatically setup
`_NT_SYMBOL_PATH`, etc.
+Building
+--------
+
+Using [stack]:
+
+ stack build
+
+[stack]: http://docs.haskellstack.org/en/stable/README/
+
+Installation
+------------
+
+ stack install
+
+Usage
+-----
+
+The complete list of utilities is given below.
+
+* [list_path](list_path) &mdash; List directories in your `PATH`.
+* [add_path](add_path) &mdash; Add directories to your `PATH`.
+* [remove_path](remove_path) &mdash; Remove directories from your `PATH`.
+* [set_env](set_env) &mdash; Set environment variable.
+* [unset_env](unset_env) &mdash; Unset environment variable.
+
+Pass the `--help` flag to a utility to examine its detailed usage information.
+Some usage examples are given below.
+
+### list_path
+
+List directories in your `PATH` variable:
+
+```
+> list_path
+- C:\Program Files\Haskell\bin
++ C:\Program Files\Haskell Platform\8.0.1\lib\extralibs\bin
++ C:\Program Files\Haskell Platform\8.0.1\bin
++ C:\Users\Egor\AppData\Roaming\local\bin
+- C:\Users\Egor\AppData\Roaming\cabal\bin
+...
+```
+
+Lines starting with `+` denote existing directories.
+Conversly, lines starting with `-` denote missing directories.
+
+### add_path
+
+Add "C:\test" to current user's `PATH`:
+
+```
+> add_path C:\test
+Saving variable 'PATH' to 'HKCU\Environment'...
+ Old value: C:\Users\Egor\AppData\Roaming\local\bin;C:\Users\Egor\AppData\Roaming\cabal\bin
+ New value: C:\Users\Egor\AppData\Roaming\local\bin;C:\Users\Egor\AppData\Roaming\cabal\bin;C:\test
+Continue? (y/n) y
+
+>
+```
+
+### remove_path
+
+Remove "C:\test" from both current user's and global `PATH`s, skipping the
+confirmation prompt:
+
+```
+> remove_path --global -y C:\test
+```
+
+### set_env
+
+To assign `bar` to the variable `foo` for all users:
+
+```
+> set_env -g foo bar
+Saving variable 'foo' to 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment'...
+ Value: bar
+Continue? (y/n) y
+
+>
+```
+
+### unset_env
+
+To unset the variable `foo` for current user, skipping the confirmation prompt:
+
+```
+> unset_env --yes foo
+```
+
License
-------