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.
2018-02-19 22:00:15 +04:00
Ben Hilburn
02332d5962
Merge branch 'master' into next
2017-08-12 13:46:08 -04:00
Dominik Ritter
a234636982
Fix empty delimiter
...
Even if the delimiter is empty, the min length should be 1.
This fixes #558
2017-07-12 03:29:31 +02:00
guixxx
e6c37b6bc5
Icons for Windows/Cygwin + Refixes 32-bit support
2017-05-07 10:34:54 -03:00
Ben Hilburn
54a444535a
Converting timer start time to hex
2017-04-18 18:02:37 -04:00
guixxx
421f506bf8
Improve logic
2017-04-18 18:02:37 -04:00
guixxx
c403ad6cd7
Adds Android icon/battery plugin support
...
Plus fixes bhilburn/powerlevel9k#479 , which was causing integer overflow on 32-bit CPUs
2017-04-18 18:02:37 -04:00
Benoit Averty
9f4772f993
More possibilities with truncate folder marker
2017-01-31 23:49:46 +01:00
Benoit Averty
ebf808c533
Add dir_truncate_root option
2017-01-31 23:47:49 +01:00
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.
2016-10-27 13:01:02 +05:30
Ben Hilburn
c4fdc8f708
Improved speed of prompt_vcs
by 50%-66%.
2016-08-31 10:35:05 -04:00
Alex LaFroscia
4ca6938801
Apply max dir length to package name shortener
2016-03-22 13:14:10 -04:00
Ben Hilburn
64d81a2b36
Merge pull request #212 from dritter/unit_testing
...
Adding Unit Tests, supported by Travis-CI
2016-02-17 15:39:55 -08:00
Dominik Ritter
d7a0f49391
Add documentation for printSizeHumanReadable
2016-02-12 01:18:35 +01:00
Dominik Ritter
e9da3d5146
Fix joining segments
2016-02-06 20:07:42 +01:00
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
2016-01-23 01:45:39 +01:00
Dominik Ritter
ed28b8d26f
Use explicit word splitting. No need to set SH_WORD_SPLIT
2016-01-23 01:45:39 +01:00
Dominik Ritter
f9957ca559
Used typeset to define the local array. This does the trick on linux.
2015-11-17 18:34:18 +01:00
Dominik Ritter
ce7b99cdaf
Added a mechanism to make deprecated segments visible to the user.
2015-11-17 01:39:49 +01:00
Dominik Ritter
0fa635275c
Extracted color functions to a separate file.
2015-10-24 01:05:37 +02:00
Dominik Ritter
d6584e13da
Extracted icons into a separate file.
2015-10-23 23:42:59 +02:00
Dominik Ritter
fbd1b99bab
Renamed "power-utilities.zsh" to just "utilities.zsh".
2015-10-23 23:39:50 +02:00