Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

The installer is currently broken on my setup when selecting all. This patch should fix it. #151

Merged
merged 1 commit into from

2 participants

@chy-causer

When selecting all, I get the following in my plugins/enabled directory

$ cd ~/.bash_it/plugins/enabled && ls -l
* -> ~/.bash_it/plugins/[^_]available/*

In other words, the regexp is not being expanded, and I don't think bash
has ever had this capability (I am running 4.2.24) . Looking at the commit
2443162, this line was added so as to disable
some plugins starting with a "_". In this circumstance, this line is
wrong anyway as it skips the directory "_available", rather than
available/_whatever.

This commit aims to fix this to the installer's intended purpose.
It also does a sanity check that no file exists already in enabled and
skips otherwise. ln -s does the right thing however more human error
message might be more desirable.

Chris Causer Remove buggy line in install.sh causing "all" option to break
When selecting all, I get the following in my plugins/enabled directory

$ cd ~/.bash_it/plugins/enabled && ls -l
<snip fileinfo>          * -> ~/.bash_it/plugins/[^_]available/*

In other words, the regexp is not being expanded, and I don't think bash
has ever had this capability (I am running 4.2.24) . Looking at the commit
2443162, this line was added so as to disable
some plugins starting with a "_". In this circumstance, this line is
wrong anyway as it skips the directory "_available", rather than
available/_whatever.

This commit aims to fix this to the installer's intended purpose.
It also does a sanity check that no file exists already in enabled and
skips otherwise. ln -s does the right thing however more human error
message might be more desirable.
980bd9e
@erichs erichs was assigned
@erichs
Owner

Thanks! Much appreciated.

@erichs erichs merged commit 4de0b92 into Bash-it:master
@erichs erichs was unassigned by chy-causer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 31, 2012
  1. Remove buggy line in install.sh causing "all" option to break

    Chris Causer authored
    When selecting all, I get the following in my plugins/enabled directory
    
    $ cd ~/.bash_it/plugins/enabled && ls -l
    <snip fileinfo>          * -> ~/.bash_it/plugins/[^_]available/*
    
    In other words, the regexp is not being expanded, and I don't think bash
    has ever had this capability (I am running 4.2.24) . Looking at the commit
    2443162, this line was added so as to disable
    some plugins starting with a "_". In this circumstance, this line is
    wrong anyway as it skips the directory "_available", rather than
    available/_whatever.
    
    This commit aims to fix this to the installer's intended purpose.
    It also does a sanity check that no file exists already in enabled and
    skips otherwise. ln -s does the right thing however more human error
    message might be more desirable.
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 1 deletion.
  1. +10 −1 install.sh
View
11 install.sh
@@ -31,7 +31,16 @@ done
function load_all() {
file_type=$1
[ ! -d "$BASH_IT/$file_type/enabled" ] && mkdir "$BASH_IT/${file_type}/enabled"
- ln -s $BASH_IT/${file_type}/[^_]available/* "${BASH_IT}/${file_type}/enabled"
+ for src in $BASH_IT/${file_type}/available/*; do
+ filename="$(basename ${src})"
+ [ ${filename:0:1} = "_" ] && continue
+ dest="${BASH_IT}/${file_type}/enabled/${filename}"
+ if [ ! -e "${dest}" ]; then
+ ln -s "${src}" "${dest}"
+ else
+ echo "File ${dest} exists, skipping"
+ fi
+ done
}
function load_some() {
Something went wrong with that request. Please try again.