8 cdexec - Run a given command in the given directory
12 cdexec [--home | <B<DIRECTORY>>] [--] <B<COMMAND>> [<B<ARGS>>]
14 Run a given command in the given directory.
15 Set the target directory to the command's self directory if not given.
19 execline-cd by execlineb(1)
36 echo "Usage: $0 [--home | <DIRECTORY>] [--] <COMMAND> [<ARGS>]"
37 echo "Run a command in a specific directory."
38 echo "If DIRECTORY is not given and COMMAND is a path, chdir into COMMAND's directory."
65 if [ $# = 0 -a -n "$cd_into" ]
67 # no command given. probably the only parameter is meant to be the command, not the target directory.
74 # target directory is the command's self directory
78 cd_into
=`dirname -- "$cmd"`
80 echo "cdexec: no target directory given." >&2