Skip to content

πŸ™…β€β™€οΈ Quickly edit an executable file in your $PATH

License

Notifications You must be signed in to change notification settings

evanthegrayt/exed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

executable-editor

Quickly edit an executable script in your $PATH

I found myself creating a lot of shell/ruby/python executable scripts and wanted to quickly edit them. I got tired of typing vim $( which [FILE] ), so I made a script that will do this for me. I gave it a few different options, such as -a, which can find all instances in your PATH and gives you the option to choose which one to edit, via the select loop. You can also choose your editor at runtime; otherwise, it will try to use the VISUAL, and then EDITOR environmental variables.

Installation

Clone the repo.

git clone https://github.com/evanthegrayt/executable-editor.git

Link the executable somewhere in your path. In most cases, /usr/local/bin is a good place to do so.

# From inside the root directory of the repository...
ln -s $PWD/bin/exed /usr/local/bin/exed

Optionally, Add the manual direcotry to your MANPATH:

# Add this to a startup file, such as ~/.bashrc or ~/.zshrc. Just replace
# `PATH_TO_REPO` with the actual path to the repository.
export MANPATH=$MANPATH:PATH_TO_REPO/man

Usage

Once instaled, simply type exed [EXECUTABLE_FILE_NAME] to quickly edit an executable script in your PATH.

For available options, run exed -h, or if you correctly installed the man page, run man exed.

This script can source a file called ~/.exedrc, where you can set some default options, such as

verbose=true       # run in verbose mode
all_in_path=true   # show all instances in $PATH; let user choose which to edit

Reporting Bugs

If bugs are found, or you want to request a feature, please submit an issue

Self-Promotion

I do these projects for fun, and I enjoy knowing that they're helpful to people. Consider starring the repository if you like it! If you love it, follow me on github!

About

πŸ™…β€β™€οΈ Quickly edit an executable file in your $PATH

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages