Permalink
Browse files

add ~/bin to /home/grant/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin…

…:/usr/bin:/sbin:/bin:/usr/games if necessary
  • Loading branch information...
1 parent 5b1926f commit 69114b3457c47f8ffe0595819a76ea21a223fc9e @grantm committed May 22, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 bin/bcvi
View
@@ -248,6 +248,7 @@ END_POD
);
+ $class->add_home_bin();
$class->register_aliases(
'test -n "$(which bcvi)" && eval "$(bcvi --unpack-term)"',
'test -n "${BCVI_CONF}" && alias vi="bcvi"',
@@ -333,6 +334,15 @@ sub command_handler {
}
+sub add_home_bin {
+ my $class = shift;
+ my $home_bin = $class->home_directory . '/bin';
+ $class->register_aliases(
+ qq{echo \$PATH | grep -q $home_bin || PATH="$home_bin/\$PATH"},
+ );
+}
+
+
sub register_aliases {
my $class = shift;
push @aliases, @_;

0 comments on commit 69114b3

Please sign in to comment.