mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 05:43:11 +00:00
Update iwctl.fish
colum -> column
This commit is contained in:
parent
800f2414fb
commit
1e925857f0
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ function __iwctl_filter -w iwctl
|
||||||
set -l results (iwctl $argv | string replace -ra '\e\[[\d;]+m' '')
|
set -l results (iwctl $argv | string replace -ra '\e\[[\d;]+m' '')
|
||||||
# calculate column widths
|
# calculate column widths
|
||||||
set -l headers $results[3]
|
set -l headers $results[3]
|
||||||
# We exploit the fact that all colum labels will have >2 space to the left, and inside column labels there is always only one space.
|
# We exploit the fact that all column labels will have >2 space to the left, and inside column labels there is always only one space.
|
||||||
set -l leading_ws (string match -r "^ *" -- $headers | string length)
|
set -l leading_ws (string match -r "^ *" -- $headers | string length)
|
||||||
set -l column_widths (string match -a -r '(?<= )\S.*?(?: (?=\S)|$)' -- $headers | string length)
|
set -l column_widths (string match -a -r '(?<= )\S.*?(?: (?=\S)|$)' -- $headers | string length)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue