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.
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
execdir package from AUR
git clone https://aur.archlinux.org/execdir.git
cd execdir
makepkg -si
execdir package from Copr
dnf copr enable xfgusta/execdir
dnf install execdir
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
Copyright (c) 2022 Gustavo Costa. Distributed under the MIT license.