Browse Source

bin: add git and tig wrappers to support -C <dir>

Signed-off-by: Alejandro Mery <amery@geeks.cl>
master
Alejandro Mery 11 years ago
parent
commit
2a65b8b4c3
3 changed files with 14 additions and 0 deletions
  1. +1
    -0
      files/bin/git
  2. +1
    -0
      files/bin/tig
  3. +12
    -0
      lib/chdir_usr_bin_wrapper.sh

+ 1
- 0
files/bin/git

@ -0,0 +1 @@
../../lib/chdir_usr_bin_wrapper.sh

+ 1
- 0
files/bin/tig

@ -0,0 +1 @@
../../lib/chdir_usr_bin_wrapper.sh

+ 12
- 0
lib/chdir_usr_bin_wrapper.sh

@ -0,0 +1,12 @@
#!/bin/sh
TOOL="/usr/bin/${0##*/}"
set -e
if [ $# -ge 2 ]; then
if [ "x-C" = "x$1" ]; then
cd "$2"
shift 2
fi
fi
exec $TOOL "$@"

Loading…
Cancel
Save