Code Monkey home page Code Monkey logo

go-pdirs's Introduction

Project directory resolver

A program for resolving projects to directories.

Usage

go-pdirs [options] <project>

Options:
    --help                   View help
    --scripts                Print bash scripts
    --list                   List all projects

Scripts

The application comes with a bash function for navigating to project directories. In order to call that function, you will need to include it in your .bashrc (or equivalent):

eval "$(go-pdirs --scripts)"

Configuring directories

The application requires you to have a configuration file in $HOME/.pdirs. The configuration file is currently just a newline-separated file of key-value pairs:

project_1=/home/user/path/to/project_1
project_2=/home/user/path/to/project_2

The configuration file also supports environment variables as such:

project_1=$HOME/path/to/project_1
project_2=$HOME/path/to/project_2

Installing

Currently only AUR packages exist:

Building

To build the application, make sure you have go and make installed.

make build
chmod +x bin/go-pdirs

# Optionally, move the binary to /usr/local/bin
sudo mv "$(pwd)/bin/go-pdirs" /usr/local/bin/go-pdirs
sudo mv "$(pwd)/scripts/pcd" /usr/local/bin/pcd

# Or create a symlink in case you want to make it easier to update
sudo ln -fs "$(pwd)/bin/go-pdirs" /usr/local/bin/go-pdirs
sudo ln -fs "$(pwd)/scripts/pcd" /usr/local/bin/pcd

go-pdirs's People

Contributors

xprnio avatar

Watchers

 avatar

go-pdirs's Issues

`pcd` doesn't change directory without `source`

Due to how shells work, simply calling pcd <project> doesn't actually navigate anywhere since the script is run in isolation.
One way to solve this would be to instead define pcd as a function which the user would have to source in their .bashrc (or equivalent) file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.