Commit Graph

1332 Commits (fd8ff61baa7997caddc5c02f1ceb65bf71c20d40)

Author SHA1 Message Date
Nils Winkler fd8ff61baa Merge pull request #697 from clayreimann/patch-1
Display the prompt when changing directories
2016-04-10 12:55:35 +02:00
Nils Winkler 41103bd206 Merge pull request #698 from PaulDapolito/master
Updating git.completion.bash to latest version.
2016-04-10 12:54:23 +02:00
Nils Winkler da229eaa08 Merge pull request #699 from bmalehorn/precompute
colors.theme.bash: pre-compute colors, startup 3x faster
2016-04-10 12:53:01 +02:00
Brian Malehorn 2a3fde2b14 colors.theme.bash: pre-compute colors
bash-it takes rather a while to startup, around 0.5 seconds on my
laptop. After a bit of timing it appears the majority of the time is
spent in themes/colors.theme.bash. The reason for that is the fancy
abstraction layers that use $(). For example, consider this code:

    red="$(color reset red)"

It will go through 9 forkexecs to evaluate:

    red="$(color reset red)"
        "$(__color_parse make_ansi reset red)"
        "$(__make_ansi reset red)"
        "\[\e[$(__reset red)m\]"
        "\[\e[0;$(__red)m\]"
        "\[\e[0;$(__color red)m\]"
        "\[\e[0;$(__color_normal_fg $(__color_red))m\]"
        "\[\e[0;$(__color_normal_fg 1)m\]"
        "\[\e[0;31m\]"

With all the variables in colors.theme.bash, this adds up to hundreds of
forks:

    $ strace -f bash ./colors.theme.bash 2>&1 | grep clone | wc -l
    649

The solution is to replace the function with its result:

    -red="$(color reset red)"
    +red='\[\e[0;31m\]'

This is safe, since colors.theme.bash never calls external functions or
takes any input. So, its result can be safely hard-coded.

This improves startup time dramatically. Try adding "time" to your .bashrc:

    # Load Bash It
    time source $BASH_IT/bash_it.sh

before:

    real    0m0.462s
    user    0m0.100s
    sys     0m0.399s

after:

    real    0m0.150s
    user    0m0.091s
    sys     0m0.064s
2016-04-09 20:52:47 -07:00
Clay Reimann 93d70a6150 Display the prompt when changing directories
This change allows for the capture of the expanded prompt (rather than the raw `PS1`) so that
it is easier to maintain context when changing directories.

Fix is based on the comments from [this stackoverflow](http://stackoverflow.com/a/24006864)
2016-04-08 12:27:25 -05:00
Paul Dapolito 28c6d17632 Updating git.completion.bash to latest version from git source code mirror. 2016-04-08 09:38:06 -07:00
Nils Winkler fd6c5e23c0 Merge pull request #696 from nwinkler/autojump
Added Autojump plugin
2016-04-05 08:06:23 +02:00
Nils Winkler 1e81df5004 Added Autojump plugin
See https://github.com/wting/autojump for more details.

Currently only supports the version installed through Homebrew on OS X.
Please feel free to provide a PR for supporting additional installation
options.
2016-04-05 08:04:47 +02:00
Nils Winkler cab3cf998b Merge branch 'kigster-tests-must-work' into upstream_master 2016-04-02 19:17:45 +02:00
Nils Winkler e0035e5f61 Merge branch 'tests-must-work' of https://github.com/kigster/bash-it into kigster-tests-must-work 2016-04-02 19:15:31 +02:00
Travis Swicegood fc70767315 Ensuring BASH_IT is set before running tests 2016-04-02 02:35:48 -07:00
Eduardo Bellido Bellido 3447cba6a3 Merge pull request #694 from edubxb/fix-fasd-linux
Make #691 work on Linux
2016-03-27 03:25:16 +02:00
Eduardo Bellido Bellido 183c514881 Make #691 work on Linux 2016-03-27 00:03:40 +01:00
Travis Swicegood 4cef46271d Add sample BASH_IT_REMOTE to bash_profile template 2016-03-25 18:06:03 -05:00
Travis Swicegood 1e826eefb4 Allow overriding name of remote 2016-03-25 18:03:41 -05:00
Travis Swicegood f3f4f0a8f9 Merge pull request #693 from tomashavlas/ssh-multihost
Added support for multiple aliases/hostnames in single line for ssh completion and plugin
2016-03-25 17:54:42 -05:00
Travis Swicegood 3eb35f6054 Fix issue with PATH causing test failures
I was seeing an issue where modifying PATH caused the Ruby plugin
tests to fail. I fixed that and while digging around fixed an issue
that would cause the tests to behave weirdly if run from any other
location.

This solves one of the issues noted in #687, but I haven't tried
running the new tests from that PR with these changes.
2016-03-25 17:46:46 -05:00
Tomáš Havlas b835b3d9ce Added support for multiple aliases/hosts in single line for ssh completion and plugin 2016-03-25 23:29:33 +01:00
Travis Swicegood ae179df0c2 Merge pull request #691 from tswicegood/upgrade-fasd
Update fasd to use installed version instead of embedded
2016-03-25 17:28:28 -05:00
Travis Swicegood 5b6b7392de Include a note in code about the upstream bugfix and remove trailing spaces 2016-03-25 17:18:14 -05:00
Travis Swicegood 06b458c896 Replace embedded fasd with initialization
There are multiple ways to install fasd, but the initialization
still needs to happen. Currently, fasd is broken in bash in that
it doesn't maintain the exit code properly. This custom init removes
the call to `fasd --init bash-hook` and replaces it with the version
that would be generated once fasd PR #72 is merged.

See: https://github.com/clvv/fasd/pull/72
2016-03-25 17:08:35 -05:00
Travis Swicegood 3923cf0276 Ignore the enabled directories when running ack 2016-03-25 15:29:10 -05:00
Travis Swicegood 39cbb70cc5 Merge pull request #642 from cs-networks/master
Fix issue with last exit status getting swallowed.
2016-03-25 15:13:16 -05:00
Travis Swicegood c600d82f46 Update to latest version of fasd.
This brings the fasd up to November 5, 2015.

Commit imported: d41c4b0470
2016-03-25 10:55:04 -05:00
Travis Swicegood c5de52aef3 Changing to output 100% for full battery on OS X.
This commit ensures that `battery_percentage` has the same output
on both Linux and OS X. Thanks @jfmcarreira for finding this!
2016-03-25 10:13:16 -05:00
Travis Swicegood 18beb7f5d3 Merge pull request #690 from jfmcarreira/plugin_battery
Fix battery plugin
2016-03-25 10:12:39 -05:00
Joao Carreira 320e864f59 Fix battery plugin
Clean cases and remove spaces and % symbol in one awk command
2016-03-24 16:34:32 +00:00
Konstantin Gredeskoul 8c5ec75898 Full featured search test, dig into travis failures 2016-03-24 03:05:03 -07:00
Nils Winkler c52bba24a5 Merge pull request #686 from kigster/faster-search
Faster search, and cleaner completion
2016-03-24 11:02:45 +01:00
Konstantin Gredeskoul fd3d305fad Faster search, and cleaner completion 2016-03-24 02:54:30 -07:00
Nils Winkler fa392e0e18 Merge pull request #685 from kigster/search-readme
Updated README with a section on Search
2016-03-24 08:41:30 +01:00
Konstantin Gredeskoul 50d28364b2 Updated README with a section on Search 2016-03-24 00:22:06 -07:00
Nils Winkler 9fc363037b Merge pull request #684 from kigster/bash-it-search-squashed
Add bash-it search functionality with "bash-it search term1 [term2]...."
2016-03-24 08:11:22 +01:00
Konstantin Gredeskoul a9bf098c7a bash-it search functionality: allow test to skip on travis 2016-03-23 23:26:13 -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
Nils Winkler 5ec816342f Merge pull request #680 from kigster/scm_user
Adding support for git user & git pair in git prompt (off by default)
2016-03-18 08:12:17 +01:00
Konstantin Gredeskoul 36d994dec5 Explained `git pair` and a more reliable fallback
- Added more information to the README about the practice of using `git
  pair`, and provided instructions on installing the support.

- Write a more reliable fallback that uses `user.name` to extract user
  initials, when `user.initials` aren't set.
2016-03-16 20:15:20 -07:00
Nils Winkler 565440f537 Merge pull request #679 from kigster/powerline-multiline-rbenv
Adding support for rbenv in addition to rvm to the powerline-multiline theme
2016-03-15 08:28:52 +01:00
Konstantin Gredeskoul b70018e531 Adding support for git user & git pair 2016-03-14 03:42:38 -07:00
Konstantin Gredeskoul 6de871294e Adding support for rbenv in addition to rvm
- following existing patterns, clearing out RBENV prefix and suffix
- using existing function to read the prompt
2016-03-14 03:25:32 -07:00
Nils Winkler ac06de3c92 Merge pull request #678 from trinitronx/overridable-history
Make all vars defined in lib/history.bash overridable
2016-03-14 08:15:19 +01:00
James Cuzella 3c9fecf967 Make all vars defined in lib/history.bash overridable. Set these before sourcing Bash-It with .bashrc or .bash_profile to override defaults 2016-03-11 11:28:11 -07:00
Nils Winkler fd37877fbf Merge pull request #675 from nwinkler/docker-compose
Added aliases for docker-compose
2016-03-04 10:08:19 +01:00
Nils Winkler 2eedb137fd Added aliases for docker-compose 2016-03-04 10:06:10 +01:00
Eduardo Bellido Bellido 66f3959ba9 Merge pull request #671 from edubxb/gradle-completion
Use the same parsing_command for OSX and Linux
2016-02-19 00:37:48 +01:00
Eduardo Bellido Bellido 2911f88cf2 Use the same parsing_command for OSX and Linux 2016-02-19 00:35:45 +01:00
Eduardo Bellido Bellido ff28aeb8c6 Merge pull request #665 from edubxb/git-aliases
Update some git aliases
2016-02-19 00:29:54 +01:00
Nils Winkler 49d6b8a205 Merge pull request #669 from nucliweb/feature/node-aliases
Added npm aliases
2016-02-17 08:25:41 +01:00
Joan Leon 35c2be1e96 Added npm aliases 2016-02-16 23:57:29 +01:00
Nils Winkler 09591e861d Merge pull request #666 from cornfeedhobo/cleanup-projects-plugin
Projects Plugin cleanup
2016-02-15 08:05:46 +01:00