#!/usr/bin/env sh # Usage: extern [command] # Purges directory containing this script from $PATH for this invocation only. # eg. Script is located in ~/.local/bin, this directory is purged from $PATH. # # Typical usage is to emulate the behavior of shell functions in environments # that don't support them, such as window managers. # This is just a dumb implementation of command(1), and exists solely to # avoid hardcoding paths to executables. PATH="${PATH#${0%/*}}" "$@"