diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-02-03 12:33:19 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-02-03 12:33:19 +0100 |
| commit | 933b3ebd0a8bd3adfa32065fafbadc65cab1a7d9 (patch) | |
| tree | 94f78eac0d4d7beee766d0768199f8990d0107ba /mark.fish | |
| parent | 9aacf9220796cac5d02c220dd6470fa71ec716f5 (diff) | |
| download | mark-933b3ebd0a8bd3adfa32065fafbadc65cab1a7d9.tar.gz mark-933b3ebd0a8bd3adfa32065fafbadc65cab1a7d9.zip | |
fix array index for fish 3.0.0
array[01..n] fails for fish shell version 3.0.0. This change makes sure
we always index without leading zeros.
Diffstat (limited to 'mark.fish')
| -rw-r--r-- | mark.fish | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,3 +1,6 @@ +# Copyright (c) 2017-2019 Florian Fischer. All rights reserved. +# Use of this source code is governed by a MIT license found in the LICENSE file. + function __mark_print_block -d "prints block from mark_store" -a block file set c (string match -r "#$block#[^#]*" (echo (cat $file))) set c (string replace "#$block#" "" $c) @@ -90,7 +93,7 @@ function __mark_get --description 'extract information from a mark_store' \ set marks (string split "" $range_marks) - set marks $marks[$start_d[3]..(math $start_d[3] + $range)] + set marks $marks[(math $start_d[3])..(math $start_d[3] + $range)] echo (string join "" $marks) else |
