Skip to content

Latest commit

 

History

History
89 lines (59 loc) · 1.47 KB

README.md

File metadata and controls

89 lines (59 loc) · 1.47 KB

execdir

A tool that lets you run a command in a specific directory. It supports shell commands and path aliases. execdir will try to get an alias if the path doesn't exist.

There is also a symlink called x, so you can type less using it.

Examples

Run a command in a specific directory:

$ execdir ~/Fedora/SCM/nq git status
On branch rawhide
Your branch is up to date with 'origin/rawhide'.

nothing to commit, working tree clean

Run a shell command in a specific directory:

$ execdir -s ~/Desktop echo \$PWD
/home/xfgusta/Desktop

Create an alias for a path:

$ execdir -a nq ~/Fedora/SCM/nq

Use an alias:

$ execdir nq pwd
/home/xfgusta/Fedora/SCM/nq

List all aliases:

$ execdir -l
nq    /home/xfgusta/Fedora/SCM/nq

Delete an alias:

$ execdir -r nq

Installation

Arch Linux

execdir package from AUR

git clone https://aur.archlinux.org/execdir.git
cd execdir
makepkg -si

Fedora Linux

execdir package from Copr

dnf copr enable xfgusta/execdir
dnf install execdir

From source

The install directory defaults to /usr/local:

make install

You can install execdir in a different directory using the PREFIX variable:

make PREFIX=/usr install

License

Copyright (c) 2022 Gustavo Costa. Distributed under the MIT license.