Commit Graph

768 Commits (6b0ca17df00eaef0cacada04b5d3fbc6be03bf70)

Author SHA1 Message Date
Noah Gorny 7987e4bfcd
Merge pull request #1883 from seefood/ira/autosave-history-plml
Add history flushes on each command to the powerline themes
2021-10-17 19:51:56 +03:00
zou000 7911f770cf
use `\w` 2021-10-16 22:29:25 -07:00
zou000 bb3a51f742
Update powerline.base.bash 2021-10-16 20:24:07 -07:00
zou000 413d7a1326
Fix home dir substitution
See the discussions in 953e422bed (commitcomment-58148656) . Tested with bash 5.1 and  bash 3.2
2021-10-16 19:15:00 -07:00
John D Pell 953e422bed theme/powerline: fix an oops in the last patch
The tilde should not have been escaped, and in fact I did not have it escaped in my main branch, but the PR I submitted did have it escaped and...now it shows up in the prompt line for all the PowerLine themes... oops.
2021-10-12 11:08:37 -07:00
Ira Abramov d6239cf190 Merge branch 'master' of https://github.com/bash-it/bash-it into ira/autosave-history-plml
* 'master' of https://github.com/bash-it/bash-it: (114 commits)
  ci: Bump go to 1.17 from 1.14
  skip go tests when go is not available
  plugins: Add ble.sh plugin
  clean up pyenv plugin
  Lint: prepare `lib/utilities` for `shellcheck` (#1933)
  plugin/base: improvements (#1930)
  plugins/percol: `bind`
  completion/git: `shfmt` && `shellcheck`
  completion/git: expand search range
  plugin/percol: `shellcheck` & `shfmt`
  plugins/percol: use `_command_exists`
  completion/pip: simplify code flow
  plugin/less-pretty-cat: remove `|| cat`
  completion/wpscan: simplify code flow (whitespace)
  plugins/less-pretty-cat: simplify code flow
  plugins/less-pretty-cat: use `_command_exists`
  lib/helpers: cite `_bash-it-find-in-ancestor()`
  gradle: adopt `_bash_it_find_in_ancestor()`
  lib/helpers: new function `_bash-it-find-in-ancestor()`
  completion/laravel: simplify code flow
  ...
2021-10-11 08:32:15 +03:00
Ira Abramov c3d333ddc4 fix based on remarks on PR 2021-10-10 15:25:45 +03:00
John D Pell a2e32f37c5 theme/dulcie: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell eabdf41b83 lib/theme: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell a375e7131e Remove executable bit 2021-09-18 22:26:27 -07:00
John D Pell 5fc418e479 Use `${PWD}` instead of `$(pwd)`
Don't subshell when there's a shell parameter for it.
2021-09-18 13:15:13 -07:00
John D Pell 1c3cbf7ca6
Delete `.shellcheckrc` (#1947)
* CI: disable Ubuntu 16.04 as it's EOL

https://github.blog/changelog/2021-04-29-github-actions-ubuntu-16-04-lts-virtual-environment-will-be-removed-on-september-20-2021/

* main: lint false positive

* install: lint

* plugins/cmd-returned-notify: don't `export`

* plugins/xterm: lint

* plugins/git: lint

* plugins/goenv: lint

* plugins/alias-completion: lint false positives

* plugins/alias-completion: fix SC2155, SC2154

Declare `locals` at the top of the function

* completion: lint completions using `bash_completion` functions

Match the style of the existing code

* completion/knife: lint false positives

* completion/knife: lint

* completion/sdkman: lint

* completion/composer: lint

* Move `.shellcheckrc` under `themes/`

* lib/theme: fix SC2155, SC2154, SC2034

* lib/colors: don't warn on unused variables

We assign a large number of variables here and they may or may not be used anywhere else, so disable SC2034 for this file (only).

Alsö disable SC2005 as the functions in this file were written before `printf` was invented and have to do some fancy metascripting to get escape sequences interpreted reliably. I’m not smart enough to fix this to use `printf`, so leave it for now.

* themes/agnoster: lint

* themes: disable SC2154 for colors

Each one of these themes will need it’s own fix for SC2154, possibly upstream.

Due to the way themes are, it's entirely normal to have a *lot* of false positives for SC2034. So much so, that I have to admit that it is probably just not worth linting for SC2034 despite my dislike of blanket ignore rules.

* themes: disable SC2154, fix SC2155

Each one of these themes will need it’s own fix for SC2154, possibly upstream.

Due to the way themes are, it's entirely normal to have a *lot* of false positives for SC2034. So much so, that I have to admit that it is probably just not worth linting for SC2034 despite my dislike of blanket ignore rules.

* Delete `.shellcheckrc`

* remove executable bit
2021-09-18 12:50:59 +03:00
Noah Gorny b48f3fd7d3
Merge pull request #1909 from gaelicWizard/SVN
themes/base: don't invoke svn if possible
2021-09-18 12:39:48 +03:00
John D Pell 9d656747a9 themes: remove executable bit 2021-09-11 21:25:14 -07:00
John D Pell ffe15ebfe0 themes: use `_save-and-reload-history()`
First pass to use _Bash It_'s automatic history management.
2021-09-11 21:25:14 -07:00
John D Pell 476fcb4325 lib/theme: new `_bash_it_appearance_scm_init()`
Wrap init code in a function and call the function immediately. Several plugins do this, and it allows us to more easily implement a hooks-based system in the future.

Alsö, avoid external binary `which`. Use built-in `type -P` instead. Uppercase `-P` forces a path search to avoid hashed matches and functions/aliases and whatnot.
2021-09-11 10:22:17 -07:00
John D Pell 9c1dbbcf12 lib/scmhelpers: reorder SCM detection waterfall
This reduces the need to invoke subprocesses
2021-09-11 00:02:27 -07:00
John D Pell 8c0860588d themes/base: don't invoke svn if possible
If we are specifically in the situation #1612, then check for a working `svn` command. If we're not in that situation, then don't waste time on it.
2021-09-11 00:02:27 -07:00
John D Pell de9ea54b81
Don't call external `uname` when `$OSTYPE` will do (#1911)
* lib/helpers: use `$OSTYPE` instead of `$(uname)`

* plugins/osx: use `$OSTYPE` instead of `$(uname)`

* plugins/boot2docker: use `$OSTYPE` instead of `$(uname)`

* plugins/python: use `$OSTYPE` instead of `$(uname)`

* plugins/base: use `$OSTYPE` instead of `$(uname)`

Alsö, use `[[` instead of `[` as the former has less insane argument handling being shell syntax rather than a builtin command that must emulate being a real binary

* completion/brew: use `$OSTYPE` instead of `$(uname)`

* completion/git: use `$OSTYPE` instead of `$(uname)`

Alsö, use `[[` instead of `[`.

* completion/fabric: use `$OSTYPE` instead of `uname`

* theme/demula: use `$OSTYPE` instead of `$(uname)`

* theme/rana: use `$OSTYPE` instead of `$(uname)`
2021-08-14 10:20:12 +03:00
Noah Gorny e89403d59b
Merge pull request #1881 from NoahGorny/lint-pure-theme
Refactor scm_prompt usage in many themes
2021-08-03 23:22:09 +03:00
ofir shtrull 2444a57cc5
feat: add k8s namespace indicator (#1887)
* Add k8s namespace to prompt
2021-06-10 16:04:56 +03:00
Cristian Lupascu 1e6113f7b7 Add command duration to the powerline theme family
Fix the __powerline_duration_prompt: location & unused variable `prompt`

Remove the duration segment from powerline* theme defaults

Different color for duration prompt segment
2021-06-05 13:47:54 +03:00
Ira Abramov 9f4c71d40f Add history flushes on each command to the powerline themes. 2021-05-19 10:54:28 +03:00
Noah Gorny dff892e0a3 themes: Adapt themes to new scm_prompt api 2021-05-16 19:17:02 +03:00
Noah Gorny 2ae0350f5d themes: base: Add unified scm_prompt function 2021-05-16 19:17:02 +03:00
Noah Gorny b65a7cc67c themes: Lint pure theme 2021-05-16 13:59:18 +03:00
Oliver Ruben Albertini 26118d1835 [base.theme] add support for hg's bookmarks feature
Will conditionally show the branch based on the current bookmark instead
of branch.
2021-04-27 11:36:14 -07:00
John Fred Fadrigalan 409e18f7cb
Clean candy theme 2021-04-20 01:18:40 +08:00
Titivoot Pangrit 6866648ac6 Add theme Easy 2021-04-01 00:28:28 +03:00
Noah Gorny 4860fb8c60
Merge pull request #1849 from tiagobarros99/purity-add-virtualenv
purity theme, added virtualenv name display
2021-03-25 19:16:35 +02:00
tiago cda81f3d74 cleaned and linted purity theme 2021-03-24 21:39:57 +00:00
tiago 64c4c30706 minor change 2021-03-17 15:39:57 +00:00
tiago ea444459cf improved PS1, function rename 2021-03-17 15:26:39 +00:00
Ofir Shtrull 8ae2b1e73d fix typo 2021-03-11 18:32:10 +02:00
Ofir Shtrull ffc1701c0a Add to prompt google gcloud active account 2021-03-11 18:25:23 +02:00
tiago 682d6d728d added python's virtualenv name 2021-03-10 15:24:32 +00:00
tiago cb5047734b retval check 2021-01-27 22:55:44 +00:00
tiago 3a846a2d47 cleanup modern theme 2021-01-27 22:55:44 +00:00
Noah Gorny 9b04e11bfc
Merge branch 'master' into vendor 2021-01-27 16:43:34 +02:00
Noah Gorny 7b817f388d
Merge pull request #1790 from BarbUk/clean/theme_starting_by_b
Clean b* themes
2021-01-26 19:57:45 +02:00
tiago e80e29be6d Merge remote-tracking branch 'upstream/master' into fix-modern-theme 2021-01-24 14:09:48 +00:00
buhl 29855ed1e6 Adding preexec as a vendored library
Added a vendored lib loading routine in bash-it.sh
Added documentation on how to vendor libs in bash-it
Added and fixed plugins using preexec
Added tests for two plugins
Removed the old preexec lib
2021-01-23 18:31:18 +01:00
tiago e2be8bc2bc trailing and code style 2021-01-23 17:30:20 +00:00
tiago 54bf7f9a59 check if last command successful 2021-01-23 17:10:32 +00:00
tiago bb6354e205 removed trailing spaces 2021-01-23 14:42:58 +00:00
tiago c7f6e80ad0 fix modern theme, added virtualenv name 2021-01-22 17:07:16 +00:00
BarbUk f86d823dc3
Disable SC2207 to keep COMPREPLY simple 2021-01-22 18:41:16 +04:00
Noah Gorny d2ab59fef8 Disable keep-padding option in shfmt
Has some serious bugs and not really needed
Also fixed all files that need to be changed after this
2021-01-21 22:08:45 +02:00
BarbUk b92f53ece5
Update atomic theme with correct `compgen` syntax 2021-01-16 23:21:04 +01:00
BarbUk ef42c822e6
Update brainy theme with correct `compgen` syntax 2021-01-16 23:18:58 +01:00
BarbUk 814ff562e9
Fix rbenv version prompt 2021-01-16 09:25:12 +01:00
BarbUk 86fd073ee6
Clean brunton 2021-01-16 09:13:23 +01:00
BarbUk 662a5c4ac7
Clean brainy 2021-01-16 09:13:10 +01:00
BarbUk eadd2685df
Clean bobby 2021-01-16 09:12:59 +01:00
BarbUk 8691894175
Clean bira 2021-01-16 09:12:42 +01:00
BarbUk cfb9a22e70
Clean binaryanomaly 2021-01-16 09:12:20 +01:00
BarbUk fb0fa7f799
Clean bakke 2021-01-16 09:12:06 +01:00
BarbUk bd6dbd3edf
Merge branch 'master' into clean/theme_atomic_and_axin 2021-01-14 13:45:31 +01:00
Marcos Pereira 94d261b42d
Fix shellcheck warnings for themes/base.theme.bash 2021-01-12 00:55:15 -05:00
Marcos Pereira 5a761b7ae3
Run code fomatter for themes/base.theme.bash 2021-01-11 15:14:49 -05:00
BarbUk e574abbbba
Clean theme atomic 2021-01-11 11:42:04 +01:00
BarbUk 6495e3479e
Clean theme axin 2021-01-11 11:41:44 +01:00
David Farrell e932d8371f
Add hooks to check .sh and .bash headers - Fixes #1491 (#1765)
* Add hooks to check .sh and .bash headers
* Adds hooks/ to clean_files.txt
2021-01-09 18:02:26 +02:00
Noah Gorny f255d03057 shellcheck agnoster theme 2021-01-07 19:11:22 +02:00
Noah Gorny 60da498ed4 shfmt agnoster theme 2021-01-07 19:11:22 +02:00
BarbUk ae9da3b62b
Clean barbuk theme (#1766) 2021-01-07 19:05:00 +02:00
BarbUk 13e795c995
add command time duration plugin (#1683) 2020-12-27 18:48:17 +02:00
Russell b119540ce7
Add comment to install "t" and disable "todo.plugin" (#1742)
This commit is intended to help new uses of the
modern-t theme get it set up properly
and avoid the "todo.plugin" breaking it

Please see the following issues for details.
https://github.com/Bash-it/bash-it/issues/1693
https://github.com/Bash-it/bash-it/issues/1374

Co-authored-by: Russell Adams <russell.adams@avast.com>
2020-12-27 17:24:52 +02:00
Noah Gorny 28e4633e53
Merge pull request #1721 from NoahGorny/docs-remove-themes-readmes
docs: Remove themes readmes
2020-12-14 00:01:30 +02:00
Noah Gorny bced06994b Move theme documentation to be under docs/themes-list 2020-12-13 23:50:26 +02:00
Noah Gorny 1702e0217a docs: Remove themes readmes 2020-12-04 17:24:26 +02:00
Kan Li c13850faa2 Address some comments. 2020-11-28 19:07:10 -08:00
Kan Li 8ce9d8daa5 Add in_toolbox prompt to powerline themes
[Toolbox](https://github.com/containers/toolbox) is an containerized
development environment. This commit adds a promot to powerline when it
is running inside a toolbox.
2020-11-28 12:18:13 -08:00
Luis Felipe Sánchez 794f0e321e
Update atomic.theme.bash
fixed the space error after hiding the scm
2020-11-26 09:11:08 -05:00
David Farrell a858e75456
Add Dir Support to Clean_Files; Clean powerline theme 2020-11-03 16:14:02 -08:00
Noah Gorny 3f68817047 Clean 90210 theme 2020-10-31 12:33:12 +02:00
Noah Gorny 1f5d9b757f Fix newline and trailing space issues 2020-10-29 19:57:14 +02:00
Noah Gorny 507e4bec82 Convert files with spaces and tabs to only spaces 2020-10-29 19:57:14 +02:00
Ira Abramov 3a1283dad5 Fix EOF 2020-10-29 19:57:14 +02:00
Ira Abramov c42e3e8b21 Removed trailing whitespaces 2020-10-29 19:57:14 +02:00
BarbUk 5e65235d0e
Theme barbuk - add venv glyph and fix venv display in ssh mode (#1681)
* Add python venv glyph

* Fix venv display (tested for local and ssh prompt)

* Add documentation for python venv
2020-10-21 00:27:48 +03:00
Nils Winkler 8a8a9018bb
Merge pull request #1668 from zzhengnan/master
Make bobby and bobby-python themes more readable
2020-10-02 10:40:45 +02:00
Zhengnan Zhao f3cb4e5122 Make bobby and bobby-python themes more readable 2020-10-01 23:45:57 -04:00
phreakocious ee7075b5f1 add that pesky dollar sign 2020-10-01 08:07:18 -07:00
phreakocious 5e101fce34 fix __color_rgb function to properly compare r,g,b as variables and not lettersg 2020-09-30 22:09:42 -07:00
8F3E 43dfe23d10 Declare python_venv as a local variable 2020-09-23 11:32:18 +01:00
8F3E 185257e971 Detect python venv and show in prompt 2020-09-22 11:31:05 +01:00
Oliver Ruben Albertini ba02955340 hg SCM_CHANGE: prevent hexdump squeezing
hexdump by default will replace any repeated groups with an asterisk and
a newline, which breaks prompts. This can be disabled with the `-v`
flag. For example:

```
printf 'aac' | hexdump -e '1/1 "%02x"'
61*
63
printf 'abc' | hexdump -e '1/1 "%02x"'
616263
printf 'aac' | hexdump -ve '1/1 "%02x"'
616163
```
2020-09-12 09:58:37 -07:00
Guilherme Paula d8a0e8444d [robbyrussell theme] Cleaning up bold markup after theme 2020-09-01 13:52:50 -03:00
Noah Gorny 3eac73f613 plugins: Rename gitstatusd plugin to gitstatus 2020-06-22 14:57:05 +03:00
Noah Gorny 5d14030591 plugins: Add gitstatud plugin 2020-06-22 14:55:25 +03:00
Noah Gorny fb2e8549ad themes: Tidy base.theme and remove uneeded changes 2020-06-19 21:50:21 +03:00
Markus Krause 3c0738ba43 fix expansion inconsistency 2020-06-19 19:45:59 +03:00
Markus Krause feae99431a implement feedback 2020-06-19 19:45:59 +03:00
Markus Krause 83fdc89ec1 implement gitstatusd support 2020-06-19 19:45:58 +03:00
Nils Winkler 47512a1624
Checking for SVN return code 2020-06-14 19:31:25 +02:00
Nils Winkler 2ba3797da6
Added check for SVN not available 2020-06-09 14:07:17 +02:00
Nils Winkler caced3b65f
Using $() instead of backticks to make shellcheck happy 2020-06-09 14:07:17 +02:00
Nils Winkler 1555f729ce
Merge pull request #1599 from davidpfarrell/issue/1598-powerline-plain
Fixed quoting on POWERLINE_PROMPT_AFTER
2020-05-18 10:07:34 +02:00
Nils Winkler b9bb5ebd70
Merge pull request #1594 from kfkonrad/robbyrussell
add robbyrussell theme

Closes #329
2020-05-18 09:56:04 +02:00