Commit Graph

187 Commits (6b0ca17df00eaef0cacada04b5d3fbc6be03bf70)

Author SHA1 Message Date
Brett A. Rogers 9571c11ad0
Return to original directory after reload 2018-05-16 14:58:59 -04:00
Piotr Rogoża 89d1661d23 Replaced reload section with proper function.
Added completion for reload.
Fixed order in completion
Added unit tests for completion
The variable BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE has to be unset.
2018-04-18 21:51:20 +02:00
Piotr Rogoża b1dbf2f7e0 Added additional parameter for bash-it: reload
Added creating an alias if command does not exist
2018-04-18 21:51:20 +02:00
Mike Fiedler 7b17c17b09
Add a comparison URL to version
In order to make a swift comparison between the currently-installed
version vs the latest commits on `master`, emit a clickable URL that
will show the user the exact changes.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
2018-03-05 09:33:09 -05:00
Mike Fiedler b0bceb963e
Replace subshell for git hash, add remote info
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
2017-10-01 16:20:28 -04:00
Mike Fiedler 8015bba27f
Exit directory upon completion, update tests
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
2017-09-30 20:06:42 -04:00
Mike Fiedler 71bda32dc0
Add version to commands
Add a helper to show the current git SHA of the installed git repo.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
2017-09-29 05:39:36 -04:00
Jean Jordaan ca6a1ae2db Use 'mktemp -t', leave tempfile cleanup to the OS 2017-09-28 21:54:58 +07:00
Nils Winkler 145ec5dfaa Copied command_exists function to the helpers lib so that there is no hidden dependency on the base plugin
The original command_exists function will stay in the base plugin, but will no longer be used by other plugins or themes.
2017-09-17 21:05:59 +02:00
Nils Winkler fd637a3dc6 Loading components from global enabled directory 2017-09-17 21:05:59 +02:00
Nils Winkler 5210707da8 Test cases for loading from global directory 2017-09-17 21:05:59 +02:00
Nils Winkler f57bd1e131 Fixed issues with migrating components with the same name
dirs.plugin.bash was recognized while looking for dirs.completion.bash in the global enabled directory.
2017-09-17 21:05:59 +02:00
Nils Winkler aa9a63a10e Added message after migrating about possible fixes.
See #985 for background.
2017-09-17 21:05:59 +02:00
Nils Winkler 0791895236 Fixed some more shellcheck complaints 2017-09-17 21:05:58 +02:00
Nils Winkler 475b0778dd Fixed a couple of shellcheck complaints 2017-09-17 21:05:58 +02:00
Nils Winkler 88ef16ccc7 Fixed migration order on macOS 2017-09-17 21:05:58 +02:00
Nils Winkler 6e34d4f837 Simplified disable all 2017-09-17 21:05:58 +02:00
Nils Winkler 1810eddaf3 Using compgen instead of globw 2017-09-17 21:05:58 +02:00
Nils Winkler 729f21c106 Reading bash-it help lists aliases from global enabled directory 2017-09-17 21:05:58 +02:00
Nils Winkler c26476f56e Fixed bash-it help aliases for todo.txt-cli 2017-09-17 21:05:58 +02:00
Nils Winkler e0554cb512 Test cases and fix for bash-it help aliases foo 2017-09-17 21:05:58 +02:00
Nils Winkler 4cda9c0a43 Started work on bash-it help aliases 2017-09-17 21:05:58 +02:00
Nils Winkler 5ff873e058 Fixed "bash-it help aliases" cases, more to come... 2017-09-17 21:05:58 +02:00
Nils Winkler 9f3ef22538 Describe function supports new directory structure 2017-09-17 21:05:57 +02:00
Nils Winkler 591c8a67f3 Support both enabled formats during migration 2017-09-17 21:05:57 +02:00
Nils Winkler 375515cc6e Use compgen -G instead of ls for finding enabled components
Reference: https://stackoverflow.com/a/34195247/1228454
2017-09-17 21:05:57 +02:00
Nils Winkler 7242cc0927 Fix glob expression for finding enabled components 2017-09-17 21:05:57 +02:00
Nils Winkler 2ac08cae0f Fix one migration case 2017-09-17 21:05:57 +02:00
Nils Winkler 6fa235a825 Start work on migration to global directory 2017-09-17 21:05:57 +02:00
Nils Winkler f892269aff Fix reload function to use the old and the new directory 2017-09-17 21:05:57 +02:00
Nils Winkler 5f3627b9b7 Change the enable/disable functions to use the global directory 2017-09-17 21:05:57 +02:00
Nils Winkler b106d275a7 Move enable/disable functionality to global enabled directory 2017-09-17 21:05:57 +02:00
Nils Winkler 2581abdf54 Fix some issues that showed the todo.txt-cli aliases in the wrong way 2017-06-24 17:31:31 +02:00
Nils Winkler 94e68b96b5 Fix migration of todo.txt-cli component 2017-06-24 17:31:31 +02:00
Nils Winkler 732b287a57 Run migrate command after a succesful update 2017-06-24 17:31:31 +02:00
Nils Winkler f221f63d7d Add completion for help command, and help for migrate 2017-06-24 17:31:31 +02:00
Nils Winkler 0d9a0987d9 Fixed missing quotes around $BASH_IT variable
This should fix most issues where Bash-it is installed in a directory
containing spaces.
2017-06-24 17:31:30 +02:00
Nils Winkler 951fe918c0 Automatically running migration command when enabling/disabling components 2017-06-24 17:31:30 +02:00
Nils Winkler 0039534517 Renamed a couple of variables 2017-06-24 17:31:30 +02:00
Nils Winkler c2446c2692 Added new "bash-it migrate" command that migrates components from the old syntax to the new one that uses the load priority 2017-06-24 17:31:30 +02:00
Nils Winkler b1481038d8 Improved check for components that are already enabled 2017-06-24 17:31:30 +02:00
Nils Winkler 4e16dfde56 Fixed basename usage for enable all 2017-06-24 17:31:30 +02:00
Nils Winkler 65c6e6a1a6 Disable all command and test case 2017-06-24 17:31:30 +02:00
Nils Winkler cc8621a888 Disabling a single component will support both patterns
The old pattern with just the name (node.plugin.bash) and the new one
with the load priority (250---node.plugin.bash).
2017-06-24 17:31:30 +02:00
Nils Winkler dce0ac5b34 Adjusted show function to use the new format 2017-06-24 17:31:30 +02:00
Nils Winkler feb05b279b Changed enable all functionality to call recursive enable 2017-06-24 17:31:30 +02:00
Nils Winkler 74b15b6385 Reading load priority from file 2017-06-24 17:31:30 +02:00
Nils Winkler 31dd740571 Added default priority for enable 2017-06-24 17:31:30 +02:00
Maik Ellerbrock 017f3f43d0
fix(docker): fixes "bash-it help plugins" error 2017-05-27 02:34:35 +02:00
Kevin Glowacz bd52e16895
Remove `continue` from conditional
This is an artifact left over from when this function was extracted from
inside a loop b524bb6047

However, `continue` isn't doing anything when not inside a loop and this
now raises a warning in bash 4.4:

"continue: only meaningful in a `for', `while', or `until' loop"
2016-09-22 10:55:22 -05:00
Thomas Bouve afe8b0d8ec Fix for bash-it help plugins error (pathmunge group value). 2016-08-06 23:41:27 +02:00
Nick Silva f82b57b046 Merge branch 'master' into autoreload 2016-08-01 11:25:47 -07:00
Nick Silva 16b455d0c6 add BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE option 2016-08-01 11:19:17 -07:00
Nick Silva 2d7881022a Remove hyphen from bash when reloading 2016-07-22 17:43:07 -07:00
Nick Silva fb85db14a9 763: Automatically reload shell after enabling and disabling things. 2016-07-22 16:15:31 -07:00
Nick Silva bbcb50ca2b Remove stray debugging echoes 2016-07-19 11:38:36 -07:00
Nick Silva 7c8be52ac5 Revert local variable declaration 2016-07-19 11:17:49 -07:00
Nick Silva 7c1370ac00 Add support for custom alias group with alias help command. 2016-07-19 11:12:36 -07:00
Konstantin Gredeskoul 9bb2d377a8 Enable/Disable with negated search feature 2016-05-07 06:26:30 -07:00
Konstantin Gredeskoul fb6a6c80c0 Highlighting color of enabled components 2016-05-07 04:23:03 -07:00
Konstantin Gredeskoul ffbeeacc54 Moving search into its own module before more work 2016-05-07 04:19:03 -07:00
Travis Swicegood 1e826eefb4 Allow overriding name of remote 2016-03-25 18:03:41 -05:00
Konstantin Gredeskoul fd3d305fad Faster search, and cleaner completion 2016-03-24 02:54:30 -07:00
Konstantin Gredeskoul c0a657270c Add bash-it search functionality
- "bash-it search term1 [term2]...."

 - we are using existing 'bash-it show plugins|aliases|completions'
   commands output, to search (with grep) for lines that match the
   search terms, and then output the matches.

 - wrote a simple unit test that for whatever reason fails on Travis,
   so wrapped it in 'if "Darwin"'...
2016-03-23 23:13:51 -07:00
Eduardo Bellido Bellido 48f26406f0 Apply new naming convention 2016-02-09 22:49:08 +01:00
Eduardo Bellido Bellido 1dba074024 Fix variable syntax error 2016-02-05 18:47:57 +01:00
Eduardo Bellido Bellido 3438c1d7c4 New update command 2016-02-05 00:13:41 +01:00
crazygit a42e5f4d73 add bulk enable or disable function 2015-10-23 00:07:35 +08:00
Ivan Povalyukhin 1cb9093c9c [pathmunge] fix test and modify metadata syntax in the function pathmunge to be easier supported in the test 2015-06-07 20:23:19 -07:00
Ivan Povalyukhin cf3728c5aa [pathmunge] added function to prevent duplicates in PATH variable 2015-05-30 00:26:22 -07:00
Nils Winkler d29d6df2f2 Added support for `bash-it help completions` command.
It's showing the same output as `bash-it show completions`,
to keep things simple.
2015-03-23 08:18:48 +01:00
Benjamin Brombach 4b60298939 Fixed #157: Made 'type' command using default LANG (not system LANG) to check if function or alias. 2014-12-03 13:51:32 +01:00
John A. Barbuto fb134f4e3b Use relative symlinks for enabling plugins
This extends 10bda0c for post-install enablements as well.
2014-04-06 13:33:39 -07:00
Dave Paroulek 75dbdaf274 Create plugins/enabled directory if it doesn't already exist
- This fixes a bug I saw after installing bash-it on Mac OS X 10.6.8.
  During bash-it installation I chose not to install any plugins. After
  install, when `bash-it enable plugin foo` was complaining that the
  enabled directory did not exist.
2013-03-25 08:36:27 -04:00
Nils Winkler be20972cf0 Merged @erichs changes for the bash-it function. 2012-05-23 09:45:36 +02:00
Nils Winkler e82991beb8 Updated help 2012-05-23 09:31:56 +02:00
Erich Smith 961c914e0f alias-help() 2012-05-22 10:08:38 +02:00
Nils Winkler 95ce548451 Cleaned up parameters and added meta data for plumbing functions. 2012-05-22 09:33:59 +02:00
Nils Winkler f71be20247 Changed meta info resolution to look for data based on the type, e.g. about-plugin, about-alias, about-completion. 2012-05-21 15:52:03 +02:00
Nils Winkler 1f558e2550 Extended enable/disable and describe functionality to work for aliases and completions as well. 2012-05-21 13:24:49 +02:00
Erich Smith bffae2a1e1 fix for issue #136
issue #136 was found to be caused by an aliased 'ls' command that
generated rogue values for 'plugin' in the enable/disable-plugin()
functions. this commit fixes that by forcing the shell to disregard
aliased 'ls' commands.
2012-05-20 13:18:04 -04:00
Erich Smith 758c4f3328 test existence, not symlink
it isn't safe to assume that symlinks created in the enabled/* dirs will
be symlinks later...

some users use tools like Dropbox to sync their files across systems,
and these may transform symlinks into regular files.  explicitly
checking for symlinks with tests like [ -h $file ] will break on these
systems.  these tests have been replaced with [ -e $file ] instead.
2012-05-16 13:00:22 -04:00
Erich Smith a825c5f16f plugins-help is much faster
this replaces the naive implementation that called glossary() on each
group, and is an order of magnitude faster.

fix grouping in javascript.plugin.bash
2012-05-15 14:29:06 -04:00
Erich Smith 70e1cd36be fix typos 2012-05-14 14:12:09 -04:00
Erich Smith 08e439c4f0 update plugin management 2012-05-13 22:13:54 -04:00
Erich Smith 254d4459e2 basic plugin management
move plugin management functions into 'lib' group in helpers.bash
2012-05-13 22:13:54 -04:00
Travis Swicegood b524bb6047 Extract loading of enable-able files and add reload_* functions 2012-03-26 11:19:38 -05:00