Commit Graph

50 Commits (3e9a41d6193bc5e552919dbca73fffcb8bc00d0a)

Author SHA1 Message Date
romkatv 85e9f4955b expand string parameters with (g::) where appropriate 6 years ago
romkatv 5ee0054298 don't read configuration options until the first precmd; plus massive refactoring and cleanup 6 years ago
Dominik Ritter 1049bca473 Strip all newlines from ifconfig output 6 years ago
Dominik Ritter fef639eb48 Fix regex 6 years ago
Dominik Ritter 1ab6a32c4b Interface States can be unsorted 6 years ago
Dominik Ritter 9f9bc62dc9 Avoid loopback interfaces and parse IPv4 on OSX 6 years ago
Dominik Ritter a00cb84da4 Fix regular expression and test 6 years ago
Dominik Ritter 06151eeba9 Merge remote-tracking branch 'ben/master' into HEAD 6 years ago
Dominik Ritter 40e04e053c Parse IPs properly
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.
6 years ago
Dominik Ritter 938b0d49a1 Avoid externals when parsing the os release on linux 6 years ago
Paul Gierz 735994f82e Fix for #974 6 years ago
Ben Klein 45b0d68ec4
Replace `typeset` check with shellvar flag
More performance without changing functionality.
6 years ago
blackb1rd 592e765a95 Fix os detection for MSYS2 6 years ago
Max O'Cull fcea56be5c Fix Linux distribution detection 6 years ago
Ben Hilburn 7234d52ebd
Merge pull request #791 from dritter/local_variables
Make variables local
7 years ago
Dominik Ritter 9a895bc7e4 Make variables local 7 years ago
Tim Otlik 7a8fcf98c1
update icons for nerd-fonts 2.0.0 7 years ago
Ben Hilburn 99f142de36 **LARGE MERGE THAT TOUCHES LOTS OF THINGS.**
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.
7 years ago
Christo Kotze 2bd3e0f67e Fixed silly coding error
Did `local 3=...` instead of `3=...`
7 years ago
Christo Kotze ec0f7bdacb Update for Travis
While zsh accepts the following code:

```
  local paths=(${(s:/:)${1//"~\/"/}})
```

Travis fails unless it is

```
  local paths=$1
  paths=(${(s:/:)${paths//"~\/"/}})
```
7 years ago
Christo Kotze 2214124327 Updated truncatePath()
Added variable `delim_len` with test when delim=""
7 years ago
Christo Kotze d31ac26caa Another Travis test 7 years ago
Christo Kotze f10a7daab0 Another change to test Travis 7 years ago
Christo Kotze 04726d21ef Changed path splitting to test Travis 7 years ago
Christo Kotze 4996e955e0 Updated path splitting line
Works in the console, but Travis doesn't like it.
7 years ago
Christo Kotze 21b7749075 Added truncatePath to utilities.zsh
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.
7 years ago
Tim Otlik 80176c263f
fix $OS variable for battery segment 7 years ago
Tim Otlik bba8bb883e
add check of /etc/os-release for linux distros 7 years ago
Tim Otlik 845e74c5c3
added LINUX_*_ICON for several OS 7 years ago
Ben Hilburn 02332d5962 Merge branch 'master' into next 7 years ago
Dominik Ritter a234636982 Fix empty delimiter
Even if the delimiter is empty, the min length should be 1.
This fixes #558
7 years ago
guixxx e6c37b6bc5 Icons for Windows/Cygwin + Refixes 32-bit support 7 years ago
Ben Hilburn 54a444535a Converting timer start time to hex 8 years ago
guixxx 421f506bf8 Improve logic 8 years ago
guixxx c403ad6cd7 Adds Android icon/battery plugin support
Plus fixes bhilburn/powerlevel9k#479, which was causing integer overflow on 32-bit CPUs
8 years ago
Benoit Averty 9f4772f993 More possibilities with truncate folder marker 8 years ago
Benoit Averty ebf808c533 Add dir_truncate_root option 8 years ago
Arav Singhal 1edb74ba91 Consider delimiter length in dir truncate right
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.
8 years ago
Ben Hilburn c4fdc8f708 Improved speed of `prompt_vcs` by 50%-66%. 8 years ago
Alex LaFroscia 4ca6938801 Apply max dir length to package name shortener 9 years ago
Ben Hilburn 64d81a2b36 Merge pull request #212 from dritter/unit_testing
Adding Unit Tests, supported  by Travis-CI
9 years ago
Dominik Ritter d7a0f49391 Add documentation for printSizeHumanReadable 9 years ago
Dominik Ritter e9da3d5146 Fix joining segments 9 years ago
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 #186
9 years ago
Dominik Ritter ed28b8d26f Use explicit word splitting. No need to set SH_WORD_SPLIT 9 years ago
Dominik Ritter f9957ca559 Used typeset to define the local array. This does the trick on linux. 9 years ago
Dominik Ritter ce7b99cdaf Added a mechanism to make deprecated segments visible to the user. 9 years ago
Dominik Ritter 0fa635275c Extracted color functions to a separate file. 9 years ago
Dominik Ritter d6584e13da Extracted icons into a separate file. 9 years ago
Dominik Ritter fbd1b99bab Renamed "power-utilities.zsh" to just "utilities.zsh". 9 years ago