Skip to content

gregory144/path-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

path-manager

A CLI utility for managing your PATH environment variable

Build Status

Usage (bash):

Install:

  1. curl http://path.gtgross.com/install.sh | bash
  2. Open up a new shell (changes won't apply to your current shell on installation): bash

List all directories in your path:

path

List all files in your path:

path -l

Add a directory to your path:

`path -a /path/to/directory -e`

Remove a directory from your path:

`path -r /path/to/directory -e`

Search your path:

path -s gcc

COMPATIBILITY

Tested on Linux Mint 13 Maya & Fedora 18 (Spherical Cow) GNU bash, version 4.2.24, 4.2.39

BUILDING

Debian/Ubuntu/Mint:

sudo apt-get install build-essential autoconf automake

Fedora

yum install gcc autoconf automake

Then:

./configure
make

make install

# or

sudo make install

TODO

  1. Add functionality to add a single file to the path (using symbolic link to ~/.path/exename -> existing file) instead of a whole directory
  2. Add functionality to manage multiple files of the same name (i.e. promote 1 file to be first in line)
  3. Improve algorithm for fuzzy search
  4. Add functionality to detect current shell (using getppid and /proc/$pid/cmdline, or getpwuid returns user's default shell)
  5. Add warnings for duplicate executable file names (i.e. a file is on the path, but it can't be used because it's being 'hidden' by another file of the same name)
  6. Add append functionality (add to the end of PATH)
  7. Add support for other env variables (MANPATH, COWPATH)
  8. Research options for modifying current shell's path without having to use source/backticks (/dev/path? - device driver, . /dev/path)

About

A CLI utility for managing your PATH environment variable

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published