mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-12-04 21:56:46 +01:00
Update for Travis
While zsh accepts the following code:
```
local paths=(${(s:/:)${1//"~\/"/}})
```
Travis fails unless it is
```
local paths=$1
paths=(${(s:/:)${paths//"~\/"/}})
```
This commit is contained in:
parent
2214124327
commit
ec0f7bdacb
1 changed files with 2 additions and 1 deletions
|
|
@ -234,7 +234,8 @@ function truncatePath() {
|
||||||
# if the path is in the home folder, add "~/" to the start otherwise "/"
|
# if the path is in the home folder, add "~/" to the start otherwise "/"
|
||||||
[[ $1 == "~"* ]] && trunc_path='~/' || trunc_path='/'
|
[[ $1 == "~"* ]] && trunc_path='~/' || trunc_path='/'
|
||||||
# split the path into an array using "/" as the delimiter
|
# split the path into an array using "/" as the delimiter
|
||||||
local paths=(${(s:/:)${1//"~\/"/}})
|
local paths=$1
|
||||||
|
paths=(${(s:/:)${paths//"~\/"/}})
|
||||||
# declare locals for the directory being tested and its length
|
# declare locals for the directory being tested and its length
|
||||||
local test_dir test_dir_length delim_len
|
local test_dir test_dir_length delim_len
|
||||||
# do the needed truncation
|
# do the needed truncation
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue