Coder Social home page Coder Social logo

pathos's Introduction

pathos - CLI for editing a PATH env variable

Ruby Version

chip/pathos.rb

Go Version

This is the Go version.

Background

If you're like me, you might have a number of export PATH statements littering your shell resource file (e.g., .zshrc, .bashrc, etc). Over time, many directory entries get added and revised. Those that remain eventually become unnecessary, are mistakenly duplicated, or represent directories that no longer exist on the system. This is my attempt at cleaning up PATH environment variable. Hopefully, others will find this to be useful.

Demo

pathos DEMO

Built with the following:

Installation

go install github.com/chip/pathos@latest

IMPORTANT

Be sure to save your changes with S (uppercase letter S) before quitting pathos, as changes will not be saved automatically.

Each time you save your changes to the directory list, pathos will build a revised export $PATH statement that is written to $HOME/pathos.sh.

To use the new PATH, ~/pathos.sh MUST BE SOURCED to take effect within your shell.

source $HOME/pathos.sh

Navigation

Like any typical Bubble Tea app, you have the following keys that are available for navigation:

Key Description
k Move up the list of directories
j Move down the list of directories
l Move to the next page
h Move to the previous page
g/home Move to the top of the list
G/end Move to the end of the list
q Quit pathos (does NOT save changes)
? Toggle between regular and full help

Commands

Key Description
N Add a new directory to the list at the current cursor position
D Delete a directory at the current cursor position
S Save all changes made to the list of directories

Color Highlighting

Color Description
  Yellow   Shows current cursor position
  Red   Indicates directories that do not exist
  Aqua   Indicates duplicate directories

pathos's People

Contributors

chip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

hugmatj petergi

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.