Commit Graph

468 Commits (e8e9aa387bdec5f1f4ca8a84ab1e62d7d1ad1afe)

Author SHA1 Message Date
Shashank Bharadwaj 353cb210d4 Add priliminary support for perforce SCM
This patch adds very simple support for the Perforce SCM:
    https://www.perforce.com/

Although perforce is proprietary software, it's somewhat prevalent in enterprise
companies. This patch looks to provide some basic bash_it functionality that
I've come to love for git. I base everything off of two perforce commands:
    $ p4 set
This command does not require a connection the perforce server, it simply tells
us if a directory is managed by the Perforce SCM or not. In addition the
command:
    $ p4 opened

is used to provide the list of pending changes in the client and the number of
opened files in the client. The `p4 opened` command requires a connection to the
perforce server, hence it's run under a `timeout` command. The "p4 opened"
processing into it's own bash file that now has to be sourced at the top-level
bash-it.sh. Since the processing in simple the newly added: _p4-opened-counts
function returns a number of things that are not currently used, but since I had
awk open and doing the processing, I've chosen to include them in the output
anyway.

Testing:
  - Tested with the powerline-multiline theme in a few perforce based
    workspaces/clients
  - Ran:
      ❯ shellcheck themes/p4helpers.theme.bash
    and fixed all the errors
  - Ran the test suite:
      ❯ test/run
      [...]
      182 tests, 0 failures, 1 skipped
2018-02-14 17:53:09 -08:00
Nils Winkler d0df07435e Added configurable padding value to Powerline-Multiline theme
Required on macOS High Sierra with the default Terminal app, otherwise,
the right segment would extend to the next line.
2018-01-08 08:56:49 +01:00
阿信sxq 517f6c94f9 revert the backslash in the base file, and remove it in theme 'axin', fix the git branch name show error 2018-01-02 18:10:38 +08:00
阿信sxq 40fd3813d3 remove the escape char to fix git repo branch prompt show error 2017-12-31 16:20:55 +08:00
Nikos Skalkotos f512f71100
clean theme: Fix scm coloring
Remove zsh stuff and fix coloring
2017-12-28 17:53:14 +02:00
Nikos Skalkotos 2ada230c4c
clean theme: Remove extra \ 2017-12-28 16:29:10 +02:00
Philipp Eschenbach 4387beda46 fix simple theme 2017-12-28 10:02:13 +01:00
Eduardo Bellido Bellido d779fd6fe4 New customization options
Added two new variables:

POWERLINE_LEFT_END
POWERLINE_RIGHT_END

used to change the end character of the the left and right parts.
2017-12-19 22:31:59 +01:00
Nils Winkler fe1ae061cc
Merge pull request #1018 from wendorf/git-helpers
Allow non-alphanumeric git branch names
2017-12-19 09:19:38 +01:00
Dan Wendorf c5f2c408e7 SCM_CURRENT_USER supports accented characters
`tr 'A-Z' 'a-z'` will only convert non-accented characters. Switching to
`[:upper:]` and `[:lower:]` adds support for accents.
See https://github.com/koalaman/shellcheck/wiki/SC2018

Additionally, printf's character splitting does not support accented
characters, so output isn't as expected. Using bash's variable expansion
syntax instead will correctly get the full accented character.
2017-12-18 09:05:33 -08:00
Dan Wendorf 150e82b221 Refactor git functionality into githelpers.theme.bash
- Add unit tests around git functionality
2017-12-18 09:05:33 -08:00
Eduardo Bellido Bellido dfc7b8ed80 Fix some regressions in Powerline theme 2017-12-18 01:37:05 +01:00
Tim Noise 54d6a10601 i am bad at git 2017-12-16 16:53:45 +11:00
Tim Noise 0eb02456e2 updated theme to latest
- fixed minor errors in powerline.base when pulling from origin master
2017-12-16 16:45:55 +11:00
Tim Noise 02d0997e0a Merge branch 'master' of https://github.com/Bash-it/bash-it 2017-12-16 16:37:27 +11:00
Nils Winkler d318c6536f
Merge pull request #1103 from dsem/fix-brainy-virtualenv-box
Reset VIRTUALENV vars in brainy theme
2017-12-15 08:21:21 +01:00
Nils Winkler 12f5b6e5a1
Merge pull request #1106 from danflies/new-powerline-theme
Added a New Theme
2017-12-12 07:15:26 +01:00
Dan Flies e3abf2d231 Revert "Changed the broken icons"
This reverts commit 4986468e89.
2017-12-11 13:07:45 -06:00
Nils Winkler 0267554c22 Fixed issue introduced in #1109
With the added $ in there, it would show an error in Git repos:

-bash: ##: command not found
2017-12-11 11:35:52 +01:00
Robin Richtsfeld c86038d61d Fix some Bash issues 2017-12-09 15:06:22 +01:00
Dan Flies 1ff3cfbe4d Removed new theme in favor of adding to Powerline theme 2017-12-08 10:00:42 -06:00
Dan Flies 4986468e89 Changed the broken icons 2017-12-08 09:57:34 -06:00
Dan Flies 94ebdf7c5b Added a new function to display current directory only 2017-12-08 09:56:40 -06:00
Dan Flies 9b29297746 finalization of flies theme 2017-12-08 09:47:56 -06:00
Dan Flies 35c29349bd Added new wd function to powerline-flies theme. Changed the __powerline_prompt_command function to reflect the base function. 2017-12-08 09:22:35 -06:00
Dan Flies fae18112cb Added new theme to limit the directory only the current directory 2017-12-07 10:01:47 -06:00
Dylan Semler 01188bbd28 Reset VIRTUALENV vars in brainy theme 2017-12-06 08:50:09 -05:00
Nils Winkler 68409f3566
Revert "Update base.theme.bash with RUBY interpreter version check" 2017-11-28 08:25:25 +01:00
Luis Felipe Sánchez 31a0c6a9fd
Update base.theme.bash
Added feature to detect the ruby version interpreter
```bash
       rb_interp_prompt
```
and added to the existing function to be used in any theme.
2017-11-22 10:14:38 -05:00
KeLiu e325859afb
use $SHORT_HOSTNAME if set
change `${HOSTNAME}` to `${SHORT_HOSTNAME:=$HOSTNAME}`
2017-11-17 17:07:43 +08:00
Nils Winkler 4743fc5b4b
Merge pull request #1090 from maikelmeyers/master
bash-it themes must not set the TERM variable
2017-11-13 04:03:37 +01:00
Nils Winkler 856afc5d6a
Merge pull request #1089 from telmofcosta/allow-theming-git-stash-char
Allow theming git stash chars
2017-11-13 04:02:17 +01:00
Telmo Costa 1fd3fa2440 Allow theming git stash chars 2017-11-12 17:42:11 +00:00
Maik 3e2ecba318 bash-it themes must not set the TERM variable. The used terminal emulator is responsible to set this variable correctly. 2017-11-11 18:02:04 +01:00
Nils Winkler 80810a08f0
Merge pull request #1088 from lfelipe1501/patch-3
Update README.md
2017-11-11 13:15:57 +01:00
Luis Felipe Sánchez ad2112ca50
Update README.md 2017-11-10 14:38:33 -05:00
Nils Winkler e9f6ab5a0f
Merge pull request #1085 from Stimim/master
support bash-preexec
2017-11-10 08:19:59 +01:00
Luis Felipe Sánchez 0008bec5d7
Update README.md
Update Readme for fix image demo
2017-11-09 16:50:12 -05:00
Wei-Han Chen 5ff7df1607 support bash-preexec 2017-11-07 02:59:25 +08:00
brossaip 00732ad210
Add discharging character in brainy theme
I have followed the same technique as it is done in atomic theme
2017-11-06 18:01:30 +01:00
Luis Felipe Sánchez 7fbfc3f356
Update README.md 2017-10-30 16:26:43 -05:00
Travis Swicegood ce6a90c220 Add ability to specify the path color 2017-10-18 16:03:06 -05: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
con-f-use 7e68558176 Add gitignore for liquidprompt 2017-07-16 18:28:47 +02:00
con-f-use 238375c4d8 Liquidprompt Theme
see: https://github.com/nojhan/liquidprompt

Might be a bit hacky, but people can improve on it.
2017-07-16 10:51:49 +02:00
Nils Winkler 4590042177 Merge pull request #997 from lfelipe1501/patch-1
Changes in the battery plugin and in the Atomic Theme
2017-07-13 08:42:46 +02:00
Tobi Schäfer 2c08308f0c fix: missing virtualenv prompt 2017-07-07 15:02:54 +02:00
Luis Felipe Sánchez d2fb415856 Update atomic.theme.bash
Improvements in the theme
2017-07-03 12:09:27 -05:00
Nils Winkler 11469fe235 Fix battery_percentage check in Atomic theme
Check for the return value "no", which is returned when no battery check funcationality is available in the OS. This is now consistent with how the Brainy theme does this.
2017-06-24 17:31:31 +02:00
Nils Winkler e13c75c433 Add safeguard for no battery percentage available 2017-06-24 17:31:31 +02:00