Commit Graph

1041 Commits (80b865e73613c6d9d8f7405e9efaefdfc2d484b6)

Author SHA1 Message Date
Christo Kotze 550db296de Updates to `prompt_date` and `prompt_time`
Using `set_default` to set the defaults - makes the code shorter and more
readable and bypasses errors.
Christo Kotze 6d116ab24b Added `prompt_date` and fixed segment comments
Added separators for all segments (####)
Added descriptions for missing ones
Charles Peterson 0c943ac6d5 colors checking optimized and added tput for check the colors
moved to colors functions, because it makes sense.
lemaral 42a0125f4c
Fix newline issue
Charles Peterson ef0f8f0ba4 make sure the default colors are encoded properly in case they are named...
Richard Tippl 5d645e07bf Add remote state to context prompt
Adds REMOTE state to color prompt with in case of a shell over ssh.
This state has lower priority than ROOT state to not lose the privilege
warning.
Charles Peterson 4d18fdc6e9 fix for colors since the terminals so not always render named colors when using parameter expansion.
Ben Hilburn 786dc5b3f2
Merge pull request from geniusupgrader/next
OpenFOAM support! (fixes )
Ben Hilburn ea05b4ebe6 Merge branch 'master' into next
Ben Hilburn c50eb9cdda
Merge pull request from Corwynt/master
Fixed Issue with whitespaces in path.
Robin Rosenstock f5f73f25e5 fixes
Torben Hartmann 02fbaf2c4b IFS Fix attemp
David Jetelina ea062a1708
Fix of k8s shorter segment
My latest PR  seemed to have been incompatible with  - I did my PR on top of master instead of next. This one is done on top of next and should fix the current not so great state of next (prints nothing). Sorry!
Ben Hilburn 3d79ca1adc
Merge pull request from Artistan/color_names
Use color names, plus fixes
Ben Hilburn efacc622a7
Merge pull request from dinhnv/pyenv-patched
pyenv promt segment uses $PYENV_VERSION environment variable"
Ben Hilburn b2d3c396c3 Merge branch 'master' into next
Torben Hartmann 6e931f6047 Fixed Issue with whitespaces in path.
Charles Peterson 264897a426 color names and fixes
- fix for packageName truncated by POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER
     - processing the pwd/HOME replacement ONCE.
     - fix tests for named colors
     - use color names by default to allow dark/light themes to adjust colors based on names
dinhnv bc8a83208f pyenv promt segment uses $PYENV_VERSION environment variable"
lemaral 7f9669d28a
Replace PUBLIC_IP_ICON with VPN_ICON if VPN is up
Replace PUBLIC_IP_ICON with VPN_ICON if $POWERLEVEL9K_PUBLIC_IP_VPN_INTERFACE is set and up
David Jetelina b8afde5598
added forgotten $
David Jetelina 37f24dcc5f
Kubernetes segment shorter if possible
Fixes 
Ben Hilburn 9d59daf18d Merge branch 'master' into next
Ben Hilburn 3b2d47febd
Merge pull request from ParthKolekar/patch-1
Allow showing the number of jobs even if there is <= 1 job present.
Ben Hilburn 46fb03ed19
Updating variable name for always showing jobs count
Antons Kranga 82bc300c62 Add support for both AWS_PROFILE and AWS_DEFAULT_PROFILE
Parth Laxmikant Kolekar 7db892408f
Update powerlevel9k.zsh-theme
Allow showing the number of jobs even if there is <= 1 job present.
Ben Hilburn eb2e1b0e96 Merge branch 'master' into next
Ben Hilburn 948e7f5bff
Merge pull request from brianmoran/ISS-650-pythonpath-in-prompt
ISS-650 Fix PYTHONPATH appearing in prompt
Marc Hauptmann 47c7077cde declared variables as 'local'
Prevents warning messages from zsh
Derek Bassett 1c2774f592 Fix to unit tests. Also removed unneeded extra call to kubectl.
Brian Moran 43e766209b ISS-650 Fix PYTHONPATH appearing in prompt
- Modify prompt_dir function to set current_path based on pwd and
replace $HOME with ~
Jordan Taylor e6d882ac47 Added functionality to parse the current namespace regardless of config settings
Ben Hilburn f46617acd3 Merge branch 'master' into next
sbutler2901 20b69370a6 Bug fix for prompt_public_ip. The OSX date command does not have the -r option for getting the last modification time of a file. The stat command is being used instead
Ben Hilburn ad74199822 Adding `SIG` to signal name, removing `-` sign.
Ben Hilburn 2a7f3966c2 Merge branch 'master' into next
Chris Chou 5657fe6ac7 : Indicate `Rust` or `(rust)` for rust_version segment only if icon is unavailable
Timothy Earley 985dac910c Don't show when dropbox is not running
Timothy Earley 81cbd65142 Added dropbox segment
Hal Gentz ec47f1b583
These probably have similar bugs
Signed-off-by: Hal Gentz <zegentzy@protonmail.com>
Hal Gentz f996d2d6ed
Fixes issue
Signed-off-by: Hal Gentz <zegentzy@protonmail.com>
Ben Hilburn e9e60324cd Merge branch 'master' into next
Ben Hilburn 386a39671f Merge pull request from trashbat/patch-2
Changed "less than" to "fewer than".
Ben Hilburn 9ab067bd62 Merge pull request from sjoeboo/rbenv_always
Add ability to always show rbenv prompt
Ben Hilburn 748f9868fc Final cleanup for new POWERLEVEL9K_RBENV_ALWAYS flag
Matt Nicholson 79a73ef4aa add ability to force rbenv being shown
trashbat 692335975c Changed "less than" to "fewer than".
Yann David 48b4bd1aa4
Fix prompt_kubecontext:local:1: not valid in this context: Version:
Richard Tippl 2c388b6c80 Fix average selection in load segment.
Removed duplicate code selecting which load average to use.
Fixed load average selection being in OSX/BSD part of if, making it not work
on non OSX/BSD systems.
Optimized actually getting the load average.
Tadek Teleżyński 582edf200c Add average choice to load extension
This commit adds a functionality to choose if one wants to see 1, 5 or
15 minutes average.

Resolves issue 
Ben Hilburn 9f4faf7f21 Merge pull request from eumiro/truncate_to_unique
Add TRUNCATE_TO_UNIQUE shortening dir strategy
Ben Hilburn e464b4e2a5 Adding reference for `truncate_to_unique` code.
Ben Hilburn 02332d5962 Merge branch 'master' into next
Miroslav Šedivý 73a9ee7c87 add TRUNCATE_TO_UNIQUE shortening dir strategy
This creates the shortest unique path elements that can be unambiguously expanded to the original path.
Kaleb Elwert 99b7ec26b2 Add back the prompt_sp option for zsh >= 5.4.1
In 5.4.1, this option was reset between prompts, so to retain the
previous default behavior, this should be added back.
Richard Tippl c4a1d91118 Added a default value for DIR_SHOW_WRITABLE.
Variable POWERLEVEL9K_DIR_SHOW_WRITABLE is now default set to false.
Richard Tippl b567ab22c2 Implemented functionality from dir_writable to dir
When variable POWERLEVEL9K_DIR_SHOW_WRITABLE is set to true, dir prompt
will have new state NOT_WRITABLE.

This state will be set when user doesn't have permission to write in
current working directory as in prompt dir_writable.

When mode that allows icons is set, LOCK_ICON is used.
Ben Hilburn 93a1c4d2e8 Merge pull request from docwhat/pr/show-signals
status: show signal name
Ben Hilburn df9b99c2da Merge pull request from sei40kr/master
Fixed Vi mode indicator issue
Seong Yong-ju 0b298e7df4 Fixed an issue of indicator of Vi mode
Fixed an issue that the indicator of Vi mode won't appear correctly at
first.
Christian Höltje f93ad073b7 status: show signal name
This makes signal exit status easy to understand.  Instead of just
showing exit code "137", you now see "KILL(-9)".

Based on  by @sei40kr (thanks!)
Christian Höltje be6c032025 rvm: handle -head, etc. more gracefully.
Closes 
Ben Hilburn 0bcef50e29 Merge pull request from AdrienHorgnies/feature/status-cross-ok-option-set
Update `status` segment to provide additional configuration option, streamline settings flags.
Ben Hilburn c7cd2d54cf Merge pull request from golgoth31/next
vpn prompt: change "ip" to "ifconfig" to be used on OSX
AdrienHorgnies a4f1ce990b change status segment option set
Ben Hilburn c69d45cdcc Merge pull request from docwhat/pr/home-folder-abbr-test
Added tests and replaced a sed call
Christian Höltje 8626d07d60 Merge remote-tracking branch 'origin/master' into pr/merge-master
Ben Hilburn c88cea7f3f Merge pull request from docwhat/pr/cleanup-directory-detection
Cleaned up installation directory detection
Christian Höltje aca0f31eb0 Replaced a sed call with pure ZSH
Christian Höltje 3bf0f18e26 Cleaned up installation directory detection
- Used ZSH built-in magic to get the installation directory.
- Works with symlinks.
- No longer calls out to external program 'dirname'.
- Fixed issue with spaces in the path.
- No longer leak the variables 'filename' and 'script_location'.
Derek Bassett 3dddcf519d Resolves issue where prompt hangs on kubectl version.
Pavel Peganov 65c770606b Fixed RVM segment for usernames with dashes
Having a username with a dash, such as mine, `d-side`, currently results in RVM segment displaying the wrong thing, e. g. `side/.rvm/rubies/ruby`. This fixes the issue.
David Sabatie 9a3d2e4ca1 vpn prompt: change "ip" to "ifconfig" to be used on OSX
Ben Hilburn e09d4ae926 Merge branch 'next' into next
David Sabatie 5eec2e28d0 add vpn ip to prompt
Jason Hutchinson 6f0c809a7d empty namespace value is 'default'
Jason Hutchinson 932e4edeaf fix variable name typo
Jason Hutchinson c11c3a55de use p9k print_icon for kubecontext segment
Jordan Taylor d8d6c752fd added the current context prompt for your kubectl config
Jason Hutchinson 99c9ba9367 add Gopher icon to go_version segment
Ben Hilburn 92264124a9 Merge branch 'master' into next
Ben Hilburn d9014c67a3 Merge branch 'host_user' of https://github.com/onaforeignshore/powerlevel9k into onaforeignshore-host_user
Christo Kotze cf806f097b updated render check logic
Ben Hilburn b63bf00113 Merge pull request from zikes/patch-1
Only show go_version segment if inside GOPATH
Ben Hilburn 44764285c3 Merge branch 'host_user' of https://github.com/onaforeignshore/powerlevel9k into onaforeignshore-host_user
Ben Hilburn 643e8372db Merge branch 'next' of github.com:bhilburn/powerlevel9k into next
Ben Hilburn 5beb77bdf4 Merge branch 'master' into next
Ben Hilburn 65f5f7a90f Merge pull request from shibumi/next
swapped colors for virtualization detection
Ben Hilburn 6f7e88474d Merge pull request from docwhat/pr/nvm-current
nvm: improve default detection
Ben Hilburn a7409272ac Fixing typo in to teardown `RPROMPT`
Ben Hilburn c04c51bc8b Merge branch 'pr/teardown' of https://github.com/docwhat/powerlevel9k into docwhat-pr/teardown
Ben Hilburn e844fc4c72 Incorporating @dritter's feedback from .
Ben Hilburn 6486e62f14 Merge branch 'pr/newline' of https://github.com/docwhat/powerlevel9k into docwhat-pr/newline
Christian Rebischke e0a6246ecc
swapped colors for virtualization detection, black on yellow was pain for the eyes
Martin Moxon 1cc8c49137 Make Anaconda environment status match Virtualenv format
Christian Höltje 382c821539 teardown: reset PROMPT and RPROMPT
Christian Höltje feb942d453 add function to disable powerlevel9k
Sometimes you have to disable your prompt. :-(
Christian Höltje 38d5f4d056 nvm: improve default detection
This is also (marginally) faster than before.
Christian Höltje e9e3e9dc53 newline: support PROMPT_ON_NEWLINE
The newline segment will now show ├─ when using
`POWERLEVEL9K_PROMPT_ON_NEWLINE`

Note: This can be overridden via `POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX`
Christian Höltje 161c995625 newline: can't work with right side
Christian Höltje 1619c74ad8 newline: add new segment
Christian Höltje 25a6c3a4a8 pipestatus: default to true (on)
Christian Höltje 543bd2f844 status: add option for support pipes
Added new option (POWERLEVEL9K_STATUS_SHOW_PIPESTATUS) that shows
the status for all piped commands, not just the right-most.

Closes 
Ben Hilburn a0abc44ec7 Merge pull request from guixxx/devel
Icons for Windows/Cygwin + Refixes 32-bit support
guixxx e6c37b6bc5 Icons for Windows/Cygwin + Refixes 32-bit support
Ben Hilburn d9969f6546 Merge branch 'master' into next
Kaleb Elwert 39eea0479d Make sure prompt_cr is set
Fixes 
Ben Hilburn 98a00d31a8 Merge branch 'battery' of https://github.com/onaforeignshore/powerlevel9k into onaforeignshore-battery
Christo Kotze 94ff40d2d1 Removed POWERLEVEL9K_ALWAYS_SHOW_CONTEXT
Christian Rebischke dc2b5a833f
[detect-virt] quickfix for unnecessary information in prompt
Ben Hilburn 1dbaf43b98 Merge branch 'master' into next
Christo Kotze 59e64c9051 host and user segments
Kaleb Elwert efac911431 Stop setting options in prompt setup which are thrown away
Kaleb Elwert f46c1bc11b Add prompt_opts to prompt setup function
Kaleb Elwert 6f4c09ab99 Use method built in to zsh to read symlinks
Ben Hilburn 99e59bc83a Revert "Merge branch 'fix-pw3nage-exploit' of https://github.com/belak/powerlevel9k into belak-fix-pw3nage-exploit"
This reverts commit ae259ff594, reversing
changes made to 01a5c6a3a1.
Kaleb Elwert 769d82ce63 Fix double expansion of prompt variables
Ben Hilburn ae259ff594 Merge branch 'fix-pw3nage-exploit' of https://github.com/belak/powerlevel9k into belak-fix-pw3nage-exploit
Kaleb Elwert 2817b45f05 Fix double expansion of prompt variables
Ben Hilburn ddc425a840 Merge pull request from shibumi/svn-debugging
[SVN] removed %b identifier to fix color encoding
Ben Hilburn c70bb0d4ee Merge branch 'master' into next
Ben Hilburn 54a444535a Converting timer start time to hex
guixxx ea2d02d08f Adds useful comment
guixxx c403ad6cd7 Adds Android icon/battery plugin support
Plus fixes , which was causing integer overflow on 32-bit CPUs
Christian Rebischke 2a8259e128
[SVN] removed %b identifier to fix color encoding
Henry Chang 18fc317cf7
Set tick to color name green instead of color code
So the tick will not be too bright in light background color scheme such
as Solarized Light.
Jason Hutchinson 21d8fc6378 Redirect stderr for GOPATH check to /dev/null
Accounts for instances where `go` binary is not installed.
Jason Hutchinson f140104e4a only show go_version segment if inside GOPATH
As of Go v1.8 GOPATH need not be set, as it will default to $HOME/go. By using `go env GOPATH` to retrieve the value first, this technique will work regardless of whether GOPATH is currently set by the user.
Julien Falque 708705599d
Make home abbreviation configurable for dir prompt
Ben Liblit 9444e4c0c6 Gracefully handle `echotc Co` failure
In Emacs, `M-x shell` creates a shell buffer with very rudimentary
terminal capabilities.  `$TERM` is set to `dumb`, and `echotc Co`
fails after printing `echotc: no such capability: Co` to standard
error.  If our goal was to determine whether the terminal supports 256
colors, we really have no information to go on.  I recommend that we
trust the user and hope for the best.  That means we should (1)
discard any `echotc Co` error output, and (2) forego the warning
message about having fewer than 256 colors if `echotc Co` failed.
Raphaël Cohen 8be5fb62e4 Display available ram on BSD systems
Raphaël Cohen 3fe12dfe62 Improves ram prompt
For OS X display the sum of Pages free and Pages inactive
For Non BSD use MemAvailable instead of MemFree
Ben Hilburn 622c04eee3 Merge branch 'next' into truncate_composer_json
Dominik Ritter 17671d3ee3 Fix parsing package name from complex package.json files
when using `truncate_with_package_name` strategy.
Dominik Ritter ec044c028a Add functionality to truncate via `composer.json`
Dominik Ritter a0aa5ccbfc Fix parsing package name from complex package.json files
when using `truncate_with_package_name` strategy.
Felicia Hummel 554f8ed8ee Added support for customizable context segment
Ben Hilburn 95344af327 Setting new `newline` flag to false as default.
Johnny@Ash ceba4bb7bf Adding option POWERLEVEL9K_PROMPT_ADD_NEWLINE to create a blank line before each prompt
Johnny@Ash 177474a489 Adding a \n before prompt
Dominik Ritter 875dec5dae Merge branch 'next' into execution_time
Dominik Ritter 674ae068b6 Use GMT as timezone for `command_execution_time` segment
Dominik Ritter a202537dd7 Refactor `command_execution_time` segment
- Change internal precision to nanoseconds
- Let the user decide about desired precision
- Add tests
Ben Hilburn c65e3217b5 context: fixing conditionals in for always showing $USER
Ben Hilburn 6512796afe Trying to enable always showing user, not working
Ben Hilburn 3de352b296 Adding `ssh` segment back with some minor changes.
Ben Hilburn f68e055f3b Merging the `ssh` detection into `context` segment, resolving conflicts.
Ben Hilburn 5957aef79a Merge branch 'next' into shibumi-next
Ben Hilburn 36d74f34c2 Merge branch 'next' into dir_first_character
Dominik Ritter 0461b56f2a Fix wrong variable name
Dominik Ritter e105118f39 Format command execution time human readable
Dominik Ritter 04e75a683d Reworked `command_execution_time` segment
- Add a visual identifier
- Fix a bug that the time was not reset
- Make calculation independent of segment (thx @rjorgenson)
Dominik Ritter 7e5bef14d7 Add `command_execution_time` segment
Dominik Ritter f6c65e3cf7 Get rid of unreadable BSU-pattern
Now the current folder in `truncate_with_folder_marker` strategy is
truncated by cutting off the found folder from the beginning of $PWD.
Dominik Ritter a4cb875615 Add documentation about mysterious 'BSUbfksu' pattern
Dominik Ritter 610fd4fbfd Merge branch 'next' into benoits_dir_segment
Ben Hilburn 1de14df11f Merge pull request from dritter/benoits_dir_writable_segment
Benoits dir writable segment
Ben Hilburn 2397d02acc Merge pull request from dritter/simplify_public_ip
Simplify `public_ip` segment
Ben Hilburn da75345275 Merge pull request from dritter/fix_truncate_with_package_name
Fix error with truncating package name if repo is symlinked
Christian Rebischke 7e25fa1e93
Added additional ssh identifier for the right statusbar.
Christian Rebischke 15cbe8dbc9
[SSH]: resolved merge conflict and merged with current next
Dominik Ritter a8af89eeb7 Fix default dir truncation strategy
Dominik Ritter 268c3247c9 Do path expansion at first
Dominik Ritter eb865664e4 Add comments to the dir segment
Dominik Ritter 052eba9c74 Rename `dir_permissions` segment to `dir_writable`
Additionally:
- Add changelog entry
- Add documentation
Benoit Averty 6927b0ca94 Add directory permission prompt segment
Benoit Averty 9f4772f993 More possibilities with truncate folder marker
Benoit Averty 5cc2d51b58 Fix bug when truncate root was set to direct subfolder of home or root
Benoit Averty ebf808c533 Add dir_truncate_root option
Dominik Ritter b379f03f14 Add ability to omit the first character in dir path
Dominik Ritter 06cb9bb43f Change order of public ip methods as it was before
Dominik Ritter 6c352c8d5c Simplify `public_ip` segment
Dominik Ritter a576a15759 Fix error with truncating package name if repo is symlinked
Dominik Ritter bcb0fed873 Avoid error if CLOBBER is not set
If the tempfile already exists and CLOBBER is not set, a file exists error occurrs. This commit avoids this problem.
Ben Hilburn a58e8bdc8c Merge pull request from dritter/fix_swift_segment
Fix swift segment
Ben Hilburn 7bd2585371 incorportaing feedback from review on `hdd_usage` segment
Dominik Ritter b8e18d7108 Fix swift segment
The regex for the swift segment matches too much. Here I simplified it
to match the first number as this is probably the "main" version number.
Ben Hilburn 59b20b8f27 changing `hdd_usage` to actually show usage
Mikhaylov Anton 7f3677d22a Fix
Mikhaylov Anton ea74c45d4f Fix
Mikhaylov Anton 92cb8d14d1 Fix
Mikhaylov Anton 934186df6d Fix
Mikhaylov Anton cf8a94de01 Fix
Mikhaylov Anton 32708784b2 Fix
Mikhaylov Anton 41588e0d24 Change colors
Mikhaylov Anton 46ef589b63 Add anion155's HDD segment
Owen McGill e2b2e8e173 Change powerlevel9k_init to prompt_powerlevel_setup
Changed init/setup function name to be compatible with zsh promptinit, zsh prompt function only lists themes with prompt_*_setup init/setup functions
Ben Hilburn e9af4aab4f Merge pull request from jshort/next
Fix MacOS specific battery segment logic.
James Short 22540e04b8 Fix MacOS specific battery segment logic.
The case statement was causing it to never display that it was charging
and some of the awk statements had an off-by-one bug to grab the correct
values.
rjorgenson 108335f18f fixed typo
fixed issue with POWERLEVEL9K_PUBLIC_IP_NONE being empty .. i hope
rjorgenson 2cc6e661b4 reverted testing value to default value
rjorgenson f11ca0664c fixed issue with POWERLEVEL9K_PUBLIC_IP_NONE being empty for real
rjorgenson f33f843e92 fixed issue with POWERLEVEL9K_PUBLIC_IP_NONE being empty
rjorgenson ceb5c4ec32 Merge branch 'public_ip_segment' of github.com:rjorgenson/powerlevel9k into public_ip_segment
rjorgenson 20a5556642 added the ability to specify and only attempt a particular method
rjorgenson 1b838241fb added configurable string when there is no IP
rjorgenson 6c46410a2f updated some comments
changed some offline behavior
rjorgenson f9bb7a2e94 Merge branch 'public_ip_segment' of github.com:rjorgenson/powerlevel9k into public_ip_segment
rjorgenson fa51798ce7 fixed some comments and handled an edge case
rjorgenson 5cf78c5a13 fixed boolean values
rjorgenson a6c8c5c2dd fixed colors to defaults
rjorgenson 5fdfd63e46 added public IP segment for review/discussion
rjorgenson cf88f861fa fixed boolean values
rjorgenson 80ee16c16d added custom host depth to context segment
rjorgenson 2ddf2a2f20 fixed colors to defaults
rjorgenson 29233c1963 added public IP segment for review/discussion
Ben Hilburn c86b4009ce Merge pull request from rjorgenson/next
migrated battery segment to use pmset on OSX over ioreg
Ben Hilburn 5ea003bf5e Merge branch 'master' into next
Ben Hilburn 52d95f9038 Merge pull request from shibumi/detect-virt-next
Added segment for virtualization detection.
Christian Rebischke c42a77ae60
Merge branch 'detect-virt' into detect-virt-next
rjorgenson 4568c3490d added a comment
rjorgenson 16283fc8ee migrated battery segment to use pmset on OSX over ioreg
Christian Rebischke 30076080a7
added ssh support and POWERLEVEL9K_HIDE_HOST feature
refactorized the sourcecode

added true/false switch
Christian Rebischke 881ce33263
added virtualization detection with systemd
Dean Fenster b37090073c Supressed error message for invalid acpi date (happens when disconnecting the power cable)
Ben Hilburn 7a49c9704d Merge pull request from thomaspaulmann/swift
Add prompt for current installed swift version
Dominik Ritter 202ab15007 Fix display of custom dir path separator on linux
Dean Fenster a637321d58 Fixed syntax issue
Dean Fenster 4bee6dc93d Fixed an issue where full battery registers as disconnected
Thomas Paul Mann 21a5cbd988 Add prompt for current installed swift version
Dominik Ritter a1b4d44755 Make path separator configurable for dir prompt
Now the path separator can be configured by setting
`POWERLEVEL9K_DIR_PATH_SEPARATOR`
Dominik Ritter 7a776dc68c Modify dir segment to use proper states
Rouzbeh Sarrafieh 72cfc35d3e helping with some spelling corrections in powerlevel9k.zsh-theme instructional sections
rjorgenson 6ed6ba876e Merge remote-tracking branch 'upstream/next' into next
rjorgenson 6d2681d36a fixed regex to determine time remaining on linux for battery segment
Ben Hilburn b54abe48dc Merge pull request from eviltak/show-ok-in-non-verbose-status
Show OK in non verbose status prompt
Arav Singhal cde591ce2e Add toggle for showing OK in non verbose status
Adds the toggle POWERLEVEL9K_STATUS_OK_IN_NON_VERBOSE for more
customizability. If POWERLEVEL9K_STATUS_VERBOSE is false and
POWERLEVEL9K_STATUS_OK_IN_NON_VERBOSE is true, the status prompt will
show the OK visual identifier like in verbose mode. The prompt will show
the OK identifier even if POWERLEVEL9K_STATUS_OK_IN_NON_VERBOSE is false
in verbose mode.
Jack Q 894699351d fix load and ram indicator support for BSD
Arav Singhal 9b7fffe1a8 Make status prompt show OK in non-verbose mode
* The status prompt now shows the OK icon even in non-verbose mode.
 A toggle may be added to this effect in the future.
Ben Hilburn c4fdc8f708 Improved speed of `prompt_vcs` by 50%-66%.
Ben Hilburn 520eed1248 Removing `zle-*` overrides, appear fixed in new ZSH.
Ben Hilburn 02cc43ff09 Merge pull request from krischer/conda-prompt-changes
Conda prompt speedup and configuration
Ben Hilburn 683ca10e36 vcs: adding detection of unstaged / staged for svn repos
Christian Rebischke 31589a5097 added svn hooks.. hope this works
Ben Hilburn 55f061c04d Enabling subversion support for the `vcs` segment.
Lion Krischer 9bc55ab175
Using default way of setting icons and updating doc
Lion Krischer 35beead430
Using set_default function
Lion Krischer 50b978ddc8
Using default color setters
Lion Krischer 97e5684e52
Adapting to newer conda version
Lion Krischer c382c538f0
Make the conda prompt fully configurable
Lion Krischer 8a62fceb7b
Much faster conda env detection - no more file I/O needed.
Andrew Scott ec53035b13 Handle spaces in path when shortening
Ben Hilburn 96731951be Merge branch 'noverbose-battery' of https://github.com/dnmiller/powerlevel9k into nonverbose-battery
Ben Hilburn 4666bd49e6 Now printing a warning if $LANG is set incorrectly.
ruifeng.shan d7c449be34 revise mac battery error when mac default date use linux's
Mateus "Doodad" Medeiros 20b4d2b43e Make prompt_custom not print the segment if empty
Currently you can't make a conditional custom segment. This changes the
prompt_custom function responsible for printing custom segments so that
it won't print the segment in case the content is empty.

With this it becomes possible to make conditional custom prompts simply
by making it not print anything when it's not supposed to be shown.
Dan Miller 19ccfa64eb Add option for non-verbose battery
Ben Hilburn 467742286f Merge pull request from andjscott/prompt_dir_shortening
Handle shorting path when in the .git directory
Andrew Scott d720b725e8 Use git's show-toplevel to get top level directory
Ben Hilburn 45ff1d1b51 Merge pull request from andjscott/package_name
Only match first name in package.json
Andrew Scott c3019d11ef Handle shorting path when in the .git directory
`git rev-parse --git-dir` returns just `.` when in the top level of
a`.git` directory. This would cause a problem when extracting the
package_path. Closes 
Andrew Scott 19ceb08372 Only match first name in package.json
This ensures that the following package.json extract would just give the
prompt "foo" rather than "foo\nbar".

    {
      "name": "foo",
      "author":
      {
          "name": "bar",
      }
    }
Sudarshan Wadkar 99429ab268 Add new pyenv segment to show active python version
This commit provides a new segment `pyenv` to show current python environment.
This prompt can be used in place of `virtualenv` segment. However, it is
targeted at users of [pyenv](https://github.com/yyuu/pyenv) and not meant to
replace the `virtualenv` segment.

The prompt works by parsing output of `pyenv version` and displaying the first
word of the output as segment text. The design (color etc.) is same as the
`virtualenv` segment including the icon. The segment would need to be
revisited if `pyenv version` changes its output format.

Tested on my personal machines (Mac OSX 10.11.4 and Ubuntu 15.04).
Ben Hilburn 41888bf2a9 Merge pull request from thuandt/python-icon
PYTHON ICON for virtualenv prompt
Mateus "Doodad" Medeiros 89fdfa0148 Make prompt_custom not print the segment if empty
Currently you can't make a conditional custom segment. This changes the
prompt_custom function responsible for printing custom segments so that
it won't print the segment in case the content is empty.

With this it becomes possible to make conditional custom prompts simply
by making it not print anything when it's not supposed to be shown.
Dominik Ritter 47879f4b7b Refactor location installation path code
Now it is possible to set the installation path by setting
POWERLEVEL9K_INSTALLATION_PATH. If set, this path will always be used.
If it was not set manually, we try to determine the path automatically.
Thuan (Duong Tien) 086cd1fdcf [ADD] python icon in virtualenv prompt
Ben Hilburn 0b57ee3669 Merge pull request from cbourgeois/next
Fix incorrect background jobs number
David McKay 61a0cee4f5 Using logical CPUs, as it's a fairer reflection of CPU load
Clement Bourgeois 1c17acb758 Fix incorrect background jobs number
David McKay d2728f0dd1 Consolidated if statements and fixed OSX cpu cores command
David McKay 78b4ab0414 Improvements to load prompt, now reporting warning and critical at 50% and 70% cpu core utilisation
Jan Laermann 391b3327ee Added anaconda segment.
The segment relies on a lookaround to determine the currently
active conda environment.
If available ack is preferred, otherwise grep will be used.
Recent versions of grep offer `-P` to support perl-regex.
Older ones (e.g. those shipped on OSX) will fail.
Ben Hilburn 511bbcf124 Merge pull request from orhanbalci/next
rust icon added to rust segment
Dominik Ritter 7b2e995299 Fix truncation of changeset in detached tag mode
orhanbalci 72315fdc59 rust icon added
Ben Hilburn 0f4e3e7588 git-tagname: Now showing hash/branchname when sitting on a tag
Ben Hilburn aec9d95295 Merge pull request from alexlafroscia/add-package-name-shortening-strategy
Add shortening strategy based on package.json name
Dominik Ritter 104e774873 Fix configurability of actionformat color
Alex LaFroscia 4ca6938801 Apply max dir length to package name shortener
Ben Hilburn 2d3131fb8a Merge pull request from sabricot/docker_machine
Add a new segment for current active docker machine
Sudarshan Wadkar 7fcac16c5f Combine two checks into one
Sudarshan Wadkar f7b7ff21c9 Fix NVM prompt to return if not used
This commit changes nvm prompt setup to return immediately if no node
version is installed/available.
Currently, prompt complains for lack of global node version.
Specifically, if you install nvm (from brew or manually) and do not have
global node installed (or set), then the prompt should not set or show
anything. This commit ensures this by immediately returning if
`nvm current` returns "none".
sabricot 3c95feb0bd Add a docker machine segment
Alex LaFroscia daa7255e85 Add shortening strategy based on package.json name
Sudarshan Wadkar 415194941c [WIP] Rebase to origin:next branch
Ben Hilburn 9d8041fc76 Fixed actionformat color coding
Ben Hilburn cd5c2e7dcd trying to debug color code that won't deref in `vcs_states`
Ben Hilburn b3fae48893 Merge pull request from dritter/rename_vcs_default_state
Rename vcs default state
Ben Hilburn 5d31763a8e Merge pull request from rmad17/nodeenv-support
Adding `nodeenv` segment.
Dominik Ritter 9ac79bd3aa Rename VCS default state to `clean`
Ben Hilburn 2260b83c98 Merge pull request from dritter/fix_vcs_foreground_color
Allowing VCS Foreground Color to be over-rideable.
Dominik Ritter e9953710f7 Clean up states in VCS segment
rmad17 8d0f4c9e1d Fixed name issue
rmad17 06dd26a0bd Added nodeenv support
rmad17 e0603314d5 Nodeenv work
Ben Hilburn e93d053035 Merge pull request from natemccurdy/issues/215
Improve the rbenv prompt by using `version-name`
Nate McCurdy 01bdee42a2 Improve the rbenv prompt by using `version-name`
Prior to this, the rbenv prompt only showed something if the
$RBENV_VERSION environment variable was set. This was not a complete
solution because rbenv can be configured locally, per directory, with
dotfiles. When using dotfiles, the $RBENV_VERSION variables is not set.

This fixes the issue by taking the output of the `rbenv version-name`
command which shows the real rbenv version being used based on any of
the 4 ways to change rbenv as shown here:

https://github.com/rbenv/rbenv#choosing-the-ruby-version

If the current version of Ruby being used is the same as the global
Ruby, nothing is shown.

This commit also adds documentation to the README that describes the
prompt.

Fixes issue 
Dominik Ritter a1ef6548d5 Fix dynamic coloring of VCS segment
The VCS segment had a lot of own color definitions. Now they are all
gone, so that the only color definitions are when the segment gets
printed.
Dominik Ritter 7efc6e4187 Fix go test
If no GO is available, there should be no output.
Ben Hilburn 4bbff138fb Merging @theminor's changes from PR
Ben Hilburn 4897c795fa Merge branch 'master' into next
Ben Hilburn dfd7ae1f1d Merge pull request from dritter/dir_delimiter
Change default dir truncation delimitor to ellipsis
Ben Hilburn 4f4a15de82 Merge pull request from dritter/vcs_customizable
VCS-hooks customizable
Ben Hilburn 25bf6d60a0 Merge pull request from dritter/split_up_ram_segment
Split up `ram` segment into `ram` and `swap`.
Dominik Ritter 54254600d1 Change default dir truncation delimitor to ellipsis
John Minor d7c26513c8 Add "_UNTRACKED" option for _VCS to change colors - default yellow
Dominik Ritter 15665a4f95 Joining conditional segments now work as expected. If between the last
printed segment is a full but conditional segment, the joined one gets
promoted.
This fixes 
Dominik Ritter cd78c66997 First try: Now joined segments are promoted to "full" segments, if their
predecessor was conditional and had no output.
Dominik Ritter 930ae170a4 Made the VCS-hooks customizable.
Dominik Ritter eba3a3ca95 Reworked the AWS Elastic Beanstalk segment.
James Bowman af119c9406 Adding command prompt for AWS Elastic Beanstalk environment name.
Dominik Ritter 6aadf76397 Split up `ram` segment into `ram` and `swap`.
Dominik Ritter c379cf2657 Syntax fix.
v1rgul 29b346930b fix wc glitch on OSX
v1rgul 11d00ce713 background_jobs: show number if verbose
Dominik Ritter 01e4e8d324 Added "visual identifier" concept to `icons_test` segment.
rjorgenson 3767397711 fixing segment call for new state implementation in prompt_load
Ben Hilburn 817cdf98a1 Merge pull request from rjorgenson/next
added check for nvm command before running
Kayant cf921fb90c Add sub folder icon when in home subdirectories
Big thanks to @dritter for guidance, @rjorgenson for great explanation.
And @bhilburn for further guidance and encouragement.
See http://i.imgur.com/2Vncypo.png for a presentation of how it looks.
Robert Jorgenson 6f2f78b21f fixed conditional statement
Robert Jorgenson 446f46473b reworked nvm check
Now the prompt segment just returns without doing anything if nvm is not present.
Ben Hilburn 88ed3c2378 Merge branch 'symlink_resolving_improvement' of https://github.com/dritter/powerlevel9k into dritter-symlink_resolving_improvement
Robert Jorgenson 2fa7b1d08f don't output segment if node_version was not populated
rjorgenson e29b3545bd fixed called to ioreg on OS X machines
rjorgenson 9aeff8d43b added check for nvm command before running
Dominik Ritter 989a9b3b4b Improved symlink dereferencing on OSX by calling a perl script.
Dominik Ritter 0b27bdc6f5 Comment cleanup.
Dominik Ritter cdf08734db Cleanup of the `load` segment.
Dominik Ritter d0a76d721c Sorted segments alphabetically.
Dominik Ritter bbaa4a57f9 The foreground and background instructions are spaceless by default. No
need to make them spaceless explicitly.
Ben Hilburn 8dfca40eaf Cleaning up comments. Also fixes .
Ben Hilburn c39c8cbb99 Merge pull request from dritter/consistent_visual_identifier
Better support for segments that are just icons.
Niklas Heer 3441f750bf used set_default-function instead
Niklas Heer f472ba7341 added a new variable POWERLEVEL9K_SHORTEN_DELIMITER to specifiy the delimiter
Niklas Heer 2fdbd6158c added fishe-like shortening strategy
Dominik Ritter e9ef0429e4 More consistent visual identifiers. Now even segments that just have an
icon as content print these icons as visual identifiers. Some of these
segments have a verbose mode. If this verbose mode is false, some print
just the icon (like the battery segment), which didn't work correctly
before this change.
Dominik Ritter d5a8211aa1 Merge branch 'battery_visual_identifier' of github.com:dritter/powerlevel9k into battery_visual_identifier
Dominik Ritter 2a519ee2d7 Merge branch 'status_color_fix' into battery_visual_identifier
Dominik Ritter ac4502ca1f Added the "visual identifier" concept to the `vcs` segment.
Dominik Ritter 5cfd800585 Added the "visual identifier" concept to the `symfony2_version` segment.
Dominik Ritter 045f451e4e Added the "visual identifier" concept to the `symfony2_tests` and
`rspec_stats` segments.
Dominik Ritter b738ba900c Added the "visual identifiers" concept to the `ram` segment.
Dominik Ritter 7ed0abebd6 Little VCS segment cleanup.
Dominik Ritter 0cb1c0ffda Changed the order of default segments.
Dominik Ritter ad2e4f0bcc Added ability to join segments together. You always join a segment
with the previous one. Just add "_joined" to the segment name in
your `POWERLEVEL9K_LEFT_PROMPT_ELEMENTS`-array.

Developers: Be aware that the order of parameters given to
left/right_prompt_segment has changed!
Dominik Ritter cd5b4d0deb Added the "state" concept to the `dir` segment.
Dominik Ritter 056d4ff29a Only check for a user defined variable if we really have an visual
identifier.
Dominik Ritter 409303f45d Added the "visual identifier" concept to the `rbenv` segment.
Dominik Ritter 4fc59fd57c Added the "visual identifier" concept to the `node_version` segment.
Dominik Ritter 1d0f47fb97 Bugfix: the default should be a pure color, not a full ZSH color
modifier.
Dominik Ritter 78d22ba309 Interesting: We don't need to swap the whitespaces if the visual
identifier should be rendered on the right side, because the terminal
gets printed from left to right and the double width characters need
their "print me right"-whitespaces on the right side anyways.
Dominik Ritter 6f7d6f7259 For left aligned segments start the foreground color after the visual
identifier has been printed.
Dominik Ritter c5726bc548 Added the "visual identifier" concept to the `todo` segment.
Dominik Ritter d514b077d0 Added the "visual identifier" concept to the `rvm` segment.
Dominik Ritter fd0fcba5e9 Added the "visual identifier" concept to the `node_version` segment.
Dominik Ritter 35b1cb5b8d Added the "visual identifier" concept to the `load` segment.
Dominik Ritter bb5cca9af7 Added the "visual identifier" concept to the `ip` segment.
Dominik Ritter d5d5acb490 Added the "visual identifier" concept to the `dir` segment.
Dominik Ritter e505c0698e Added the "visual identifier" concept to the `aws` segment.
Dominik Ritter 1194826ef4 Used the new "visual identifier" concept for the battery segment.
Dominik Ritter 0c528461fb Allow users to overwrite the color for the visual identifier only.
Dominik Ritter 036433dd53 Segments now can have "visual identifiers" which are basically just
special icons.
Dominik Ritter 21f80e4da7 Removed trailing whitespaces.
Dominik Ritter 5a4de1d274 Split up the `status` segment into a `background_jobs`, `root_indicator` and `status` segment.
This fixes 
Ben Hilburn 0059f9a066 Merge pull request from dritter/hotfix/utility_function_loading
Try to fetch the utility function path automatically
Ben Hilburn df153db93b Merge pull request from dritter/battery_rework
Performance improvement of battery segment
Dominik Ritter 8c71a28a77 The script location should only be set once!
Dominik Ritter 0dc36ee614 We need to always evaluate the path for the home/folder icon mechanism to work correctly.
Dominik Ritter b01588e2f9 File might be a symlink.
Dominik Ritter 46575182c7 Fallback mechanism is now more robust. If does not matter if the user specified a file or a directory in `POWERLEVEL9K_INSTALLATION_PATH`.
Dominik Ritter 972e24ad41 Added more checks to find the installation dir. Now we try to find prezto automatically and print a nice warning as a fallback.
Dominik Ritter c10bac90ba In Awesome-Mode either print a home-icon or a folder icon, depending in which directory the user is.
Ben Hilburn 3fea92369f Merge pull request from Tritlo/custom_string
Adding a segment that can execute a custom command.
Dominik Ritter b8d7d1387e By default: set verbose mode on.
Ben Hilburn 08a3b49d73 Merge pull request from dritter/hotfix/go_version_fix
Fix for the GO segment.
Dominik Ritter 23e2a54067 Added a verbose mode.
Dominik Ritter 323610cebf More structure to the battery segment: Now there is a concept of "states" that a battery can have. That makes the code much clearer and users could adjust the colors of these states as they want.
Dominik Ritter 3437c7850c Battery icon is already defined in the icons-array.
Dominik Ritter c8137fcf1a Pre-Grep the raw data to save some memory and to avoid cluttering up the output of `setopt xtrace` too much.
Dominik Ritter dad38b0592 Better code structure.
Dominik Ritter da2b8e342e Arithmetics in ZSH 101: If you want to calculate a percentage, multiply the numerator with 100 _before_ the devision. With that method there is no need for hacks to convert the numerator into a float.
Dominik Ritter 239aa29a12 Better use of test flags.
Dominik Ritter 8d72b5eb12 Renamed variable "conn" to "icon_color"
Dominik Ritter b316089c6b Make use of set_default method for better code readability.
Dominik Ritter c0efe9c342 Performance improvement: Avoid aggregation of data over and over again by extracting a local variable.
Dominik Ritter 7774294113 Performance improvement by calculating the battery percentage with zsh.
Dominik Ritter 4b636d226e Renamed variable.
Dominik Ritter 49a3a3e750 The `nvm` segment should use the standard node icon (rather than defining an own icon).
Dominik Ritter 351dc84320 Fix for the GO version.
Matthías Páll Gissurarson df51db1412 added a segment to be able to display the result of a custom command.
Dominik Ritter 727b3e501b Now the script just returns instead of exiting with an errorcode. The reason for this is that users can't log in anymore if the specified a wrong path in POWERLEVEL9K_INSTALLATION_PATH and the script `exit`s. With `return` not the whole shell is terminated, so users get an ugly prompt, but are still able to modify .zshrc.
Dominik Ritter a0323b7e80 The installation path of powerlevel9k is now configurable by setting the variable POWERLEVEL9K_INSTALLATION_PATH. The value must be set to the exact location of the powerlevel9k.zsh-theme file (including the file name).
This has only effect if you load your theme as a function and your ZSH version is below 5.0.8.
Dominik Ritter 0aaf999857 For ZSH 5.0.8 `whence -v` tells also the path to the command. In that case we can use that information to get a proper path to the utility functions.
Ben Hilburn 1eadf5ad76 Merge pull request from Tritlo/battery_fix
Battery segment fix and enhancement.
Ben Hilburn 951a4956fc Merge pull request from Tritlo/prompt_end
Add icon for end of left prompt.
Matthías Páll Gissurarson 36fa3f2277 fix some issues with the battery segment
Matthías Páll Gissurarson 231cfda809 added icon to be able to set the end of the prompt explicitly
Ben Hilburn e79a2ffff0 Merge pull request from Tritlo/master
Now allowing the RPROMPT to be on a newline.
Matthías Páll Gissurarson 47eb8f10ac added variable to have rprompt on the newline
Dominik Ritter f9957ca559 Used typeset to define the local array. This does the trick on linux.
Dominik Ritter ce7b99cdaf Added a mechanism to make deprecated segments visible to the user.
Ben Hilburn 9b067ea29c Merge pull request from dritter/rust_version
Added Rust version segment.
Dominik Ritter c81863e234 Add an Identifier to version.
Dominik Ritter 5d314bec8e Add segment for rust version.
Dominik Ritter 643555a30c Huge performance improvement if you use `rvm` segment.
Thanks to @rjorgenson for the hint.
Ben Hilburn 0673352e7e Merge branch 'master' into next
Stéphane Dupille 81a4b3907d Get terminal capabilities using a zsh builtin for portability
Dominik Ritter eef5286005 Issue : This fixes history-substring-search, home and end keys.