summaryrefslogtreecommitdiff
path: root/functions/utilities.zsh
Commit message (Collapse)AuthorAgeFilesLines
* don't read configuration options until the first precmd; plus massive ↵romkatv2019-03-131-233/+22
| | | | refactoring and cleanup
* Strip all newlines from ifconfig outputDominik Ritter2019-02-221-1/+1
|
* Fix regexDominik Ritter2019-02-221-1/+1
|
* Interface States can be unsortedDominik Ritter2019-02-211-3/+7
|
* Avoid loopback interfaces and parse IPv4 on OSXDominik Ritter2019-02-061-1/+4
|
* Fix regular expression and testDominik Ritter2019-02-041-1/+1
|
* Merge remote-tracking branch 'ben/master' into HEADDominik Ritter2019-02-031-1/+3
|\
| * Avoid externals when parsing the os release on linuxDominik Ritter2019-01-241-1/+1
| |
| * Fix for #974Paul Gierz2018-09-071-1/+3
| |
* | Parse IPs properlyDominik Ritter2019-02-031-0/+48
|/ | | | | | | This is done if we want to show a public IP, internal IP, or a VPN. In the VPN case, what we actually want is to display an indicator that a VPN is active, instead of the VPN IP itself. We parse the IP here anyway, because we want to save some specific code there.
* Replace `typeset` check with shellvar flagBen Klein2018-07-121-3/+1
| | | | More performance without changing functionality.
* Fix os detection for MSYS2blackb1rd2018-06-301-1/+1
|
* Fix Linux distribution detectionMax O'Cull2018-05-191-18/+18
|
* Merge pull request #791 from dritter/local_variablesBen Hilburn2018-04-141-0/+1
|\ | | | | Make variables local
| * Make variables localDominik Ritter2018-03-271-0/+1
| |
* | update icons for nerd-fonts 2.0.0Tim Otlik2018-03-201-0/+15
|/
* **LARGE MERGE THAT TOUCHES LOTS OF THINGS.**Ben Hilburn2018-03-071-0/+76
|\ | | | | | | | | From this point until the next tagged release, `next` will be in a state of heavy flux as we make some significant and invasive changes.
| * Fixed silly coding errorChristo Kotze2018-02-221-5/+3
| | | | | | | | Did `local 3=...` instead of `3=...`
| * Update for TravisChristo Kotze2018-02-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While zsh accepts the following code: ``` local paths=(${(s:/:)${1//"~\/"/}}) ``` Travis fails unless it is ``` local paths=$1 paths=(${(s:/:)${paths//"~\/"/}}) ```
| * Updated truncatePath()Christo Kotze2018-02-221-6/+7
| | | | | | | | Added variable `delim_len` with test when delim=""
| * Another Travis testChristo Kotze2018-02-201-1/+2
| |
| * Another change to test TravisChristo Kotze2018-02-191-3/+3
| |
| * Changed path splitting to test TravisChristo Kotze2018-02-191-3/+3
| |
| * Updated path splitting lineChristo Kotze2018-02-191-1/+1
| | | | | | | | Works in the console, but Travis doesn't like it.
| * Added truncatePath to utilities.zshChristo Kotze2018-02-191-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | Added `function truncatePath()` to utilities.zsh to take care of truncation. This is pure zsh code, without calls to `sed`. Parameters are: * $1 Path: string - the directory path to be truncated * $2 Length: integer - length to truncate to * $3 Delimiter: string - the delimiter to use * $4 From: string - "right" | "middle". If omited, assumes right. Cleaned up code to use the new function instead.
* | fix $OS variable for battery segmentTim Otlik2018-02-191-13/+1
| |
* | add check of /etc/os-release for linux distrosTim Otlik2018-02-161-13/+54
| |
* | added LINUX_*_ICON for several OSTim Otlik2018-02-161-0/+16
|/
* Merge branch 'master' into nextBen Hilburn2017-08-121-1/+1
|\
| * Fix empty delimiterDominik Ritter2017-07-121-1/+1
| | | | | | | | | | Even if the delimiter is empty, the min length should be 1. This fixes #558
* | Icons for Windows/Cygwin + Refixes 32-bit supportguixxx2017-05-071-0/+4
|/
* Converting timer start time to hexBen Hilburn2017-04-191-1/+1
|
* Improve logicguixxx2017-04-191-9/+8
|
* Adds Android icon/battery plugin supportguixxx2017-04-191-0/+9
| | | | Plus fixes bhilburn/powerlevel9k#479, which was causing integer overflow on 32-bit CPUs
* More possibilities with truncate folder markerBenoit Averty2017-02-011-8/+9
|
* Add dir_truncate_root optionBenoit Averty2017-02-011-0/+15
|
* Consider delimiter length in dir truncate rightArav Singhal2016-10-271-1/+3
| | | | | | | | | | | Truncating the path from the right now takes in account the delimiter length, so that directories with names shorter than truncated name + delimiter are displayed properly. For example, if SHORTEN_DIR_LENGTH is 4 and the delimiter is "..", "../tests/.." and "../custom/.." are not incorrectly "truncated" to "../test../.." and "../cust../..", both of which are longer or the same length as the original.
* Improved speed of `prompt_vcs` by 50%-66%.Ben Hilburn2016-08-311-1/+15
|
* Apply max dir length to package name shortenerAlex LaFroscia2016-03-221-0/+6
|
* Merge pull request #212 from dritter/unit_testingBen Hilburn2016-02-181-0/+3
|\ | | | | Adding Unit Tests, supported by Travis-CI
| * Add documentation for printSizeHumanReadableDominik Ritter2016-02-121-0/+3
| |
* | Fix joining segmentsDominik Ritter2016-02-061-2/+2
|/
* Joining conditional segments now work as expected. If between the lastDominik Ritter2016-01-231-0/+49
| | | | | | printed segment is a full but conditional segment, the joined one gets promoted. This fixes #186
* Use explicit word splitting. No need to set SH_WORD_SPLITDominik Ritter2016-01-231-4/+4
|
* Used typeset to define the local array. This does the trick on linux.Dominik Ritter2015-11-171-1/+2
|
* Added a mechanism to make deprecated segments visible to the user.Dominik Ritter2015-11-171-0/+15
|
* Extracted color functions to a separate file.Dominik Ritter2015-10-241-48/+0
|
* Extracted icons into a separate file.Dominik Ritter2015-10-241-23/+1
|
* Renamed "power-utilities.zsh" to just "utilities.zsh".Dominik Ritter2015-10-241-0/+190