dotfiles

My collection of dotfiles
git clone git://git.noxz.tech/dotfiles
Log | Files | Refs

commit a79331d1fb2073969ed0e658a6b14ec98e694158
parent 40554adb2586f20681a65cf89586c53034563270
Author: Chris Noxz <chris@noxz.tech>
Date:   Mon, 22 Jun 2020 14:17:20 +0200

[bin] use `set --` for loop in mnt script

Diffstat:
Mbin/.local/bin/mnt | 12+++---------
1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/bin/.local/bin/mnt b/bin/.local/bin/mnt @@ -25,19 +25,13 @@ sources|sshfs|nas:/strg/src|~/mnt/src " _lines() { - local _tmp="${_table}" local _fmt='{print $0}' local _opt="$1"; shift + local _iid="$@" - while :; do - line="${_tmp%% -*}" - _tmp="${_tmp#* -}" + set -- $(echo $_table | sed '/^$/d'); for line; do _id="${line%%|*}" - [ "$line" = "$_tmp" ] && break - [ "$line" = "" ] && continue - [ "$1" != "" ] && [ "$@" != "$_id" ] && continue + [ "$_iid" != "" ] && [ "$_iid" != "$_id" ] && continue case "$_opt" in 'name') _fmt='{print $1}' ;; 'src') _fmt='{print $3}' ;;