Comments (7)
Paging @erichs (since he's the one who implemented this).
@AjayGavankar What is your $TERM
variable set to? I just disabled and re-enabled dirs
on my system with no problem.
from bash-it.
Interesting. For reference, here's the code in question:
if [ "$1" = "all" ]; then
typeset f plugin;
for f in $BASH_IT/plugins/available/*.bash;
do
plugin=$(basename $f);
if [ ! -h $BASH_IT/plugins/enabled/$plugin ]; then
ln -s $BASH_IT/plugins/available/$plugin $BASH_IT/plugins/enabled/$plugin;
fi;
done;
else
typeset plugin=$(ls $BASH_IT/plugins/available/$1.*bash 2>/dev/null | head -1);
if [ -z "$plugin" ]; then
printf '%s\n' 'sorry, that does not appear to be an available plugin.';
return;
fi;
plugin=$(basename $plugin);
if [ -e $BASH_IT/plugins/enabled/$plugin ]; then
printf '%s\n' "$1 is already enabled.";
return;
fi;
ln -s $BASH_IT/plugins/available/$plugin $BASH_IT/plugins/enabled/$plugin;
fi;
@AjayGavankar, when you do this:
target=git
plugin=$(ls $BASH_IT/plugins/available/$target.*bash 2>/dev/null | head -1)
echo "XXX${plugin}XXX"
what do you see?
from bash-it.
thanks for the quick reply
@tswicegood my $TERM is set to xterm
@erichs running your code gives me this-
"XXX/home/my_username/.bash_it/plugins/available/git.plugin.bashXXX"
have tried more stuff, enabling all plugins works perfectly, except for the clash between fasd and z.
and inserting these statements
echo $plugin echo $BASH_IT/plugins/available/$plugin echo $BASH_IT/plugins/enabled/$plugin
just before the ln command gives this when i try to enable dirs
dirs.plugin.bash
/home/my_username/.bash_it/plugins/available/dirs.plugin.bash
/home/my_username/.bash_it/plugins/enabled/dirs.plugin.bash
which looks right, so i'm guessing the ln command is screwing up somehow, but typing out the ln command in the terminal creates the symlink perfectly and enables the plugin.
weirdest thing i have ever seen
from bash-it.
Assuming you've tried closing your terminal and re-opening it?
"?[0m" is likely an ANSI escape sequence gone astray. What theme and prompt code are you using?
Also, what happens if you:
$ rm -rf $BASH_IT/plugins/enabled
$ mkdir $BASH_IT/plugins/enabled
$ enable-plugin base
$ ls -l $BASH_IT/plugins/enabled
from bash-it.
yeah tried closing the terminal and re-opening it.
I'm using the zork theme.
The output of those commands is:
total 0
lrwxrwxrwx 1 aj aj 56 May 20 12:15 "base.plugin.bash?[0m" -> "/home/aj/.bash_it/plugins/available/base.plugin.bash?[0m"
with the things in quotes getting highlighted red in my solarized terminal, which i think means the symlink is broken
from bash-it.
Ok, thanks!
Try changing your theme. Does that help?
Try replacing this line:
typeset plugin=$(ls $BASH_IT/plugins/available/$1.*bash 2>/dev/null | head -1)
with this:
typeset plugin=$(ls $BASH_IT/plugins/available/$1.plugin.bash 2>/dev/null | head -1)
does that work?
If not, try replacing it with this:
typeset plugin=$(command ls $BASH_IT/plugins/available/$1.*bash 2>/dev/null | head -1)
If any of those suggestions fix your issue, I'd like to know which.
from bash-it.
Hey, thanks for figuring it out, the last one did the trick .i.e.
typeset plugin=$(command ls $BASH_IT/plugins/available/$1.*bash 2>/dev/null | head -1)
Works for all the plugins above that didn't work before
from bash-it.
Related Issues (20)
- [Bug]: aliases completion has conflict with tmux completion HOT 5
- [Bug]: command_duration is broken on different locales than en_US.UTF-8
- [Bug]: System alias ll='ls -l --color=auto' with aliases completion enabled breaks bash file/directory tab completion behavior HOT 4
- [Feature]: show plugins option (--verbose?) to show plugin source URI/http uri - as there is no plugin documentation.
- [Feature]: Add GNU-Screen and tmux indication at PS1 HOT 2
- Bash ur
- Besh
- [Bug]: bash-it preview is not working HOT 2
- [Bug]: After dev channel update getting source error HOT 4
- Want to learn bash?
- Why does installation add a interpreter directive (shebang) to bash_profile? HOT 1
- bash: warning: setlocale: LC_ALL: cannot change locale (en_uS.UTF-8): No such file or directory HOT 1
- [Bug]: install bash_it on PVE debian-12-genericcloud-amd64-20230612-1409.qcow2 HOT 1
- [Request]: do you need maintainers? HOT 2
- [Feature]: nvm: only show node version if folder has package.json
- [Bug]: .bash_it/lib/history.bash reuses HISTCONTROL for it's own incorrect purposes by default HOT 3
- [Bug]: Uninstall script shouldn't delete existing bashrc and mindlessly pull from old backup
- [Feature]: allow customization of `CONFIG_FILE` during install.sh
- Does `bash-it` load `bash-preexec` by default? HOT 6
- [Feature]: Add completion for -c option to tmux new-session command
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bash-it.