fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
a53db7256
master
1# localization: skip(private) 2function __fish_complete_lpr_option --description'Complete lpr option' 3set -l optstr"$ ( commandline -t ) " 4switch $optstr 5case '*=*' 6string split -m1 = --" $optstr " | read -l opt val 7set -l descr 8for lin ( lpoptions -l2> /dev/null| string match --"* $opt *" | string replace -r'.*/(.*):\s*(.*)$' '$1 $2' | string split" " ) 9if not set -q descr[ 1 ] 10set descr$l 11continue 12end 13set -l default'' 14if string match -q'\**' --$l 15set default'Default ' 16set l( string sub -s2 --$l ) 17end 18echo $opt =$l \t $default$descr 19end 20case '*' 21lpoptions -l2> /dev/null| string replace -r'(.*)/(.*):.*$' '$1=\t$2' 22end 23 24end