@@ -108,13 +108,16 @@ ZPY_PROCS=${${$(nproc 2>/dev/null):-$(sysctl -n hw.logicalcpu 2>/dev/null)}:-4}
108108 # the first of the next. This is true of at least highlight 3.58.
109109
110110 # The method below bypasses both issues consistently
111- # across all known versions of highlight, and still outperforms bat :
111+ # across all known versions of highlight, and still outperforms the rest :
112112 local content=$(<&0)
113113 if [[ $content ]] {
114114 local themes=(aiseered blacknblue bluegreen ekvoli navy)
115115 HIGHLIGHT_OPTIONS=${HIGHLIGHT_OPTIONS:-"-s $themes[RANDOM % $#themes + 1]"} \
116116 highlight -O truecolor --stdout --force -S $1 <<<$content
117117 }
118+ } elif (( $+commands[gat] )) { # recommended themes: base16-snazzy, doom-one, gruvbox, onedark, vulcan
119+ GAT_THEME=${GAT_THEME:-doom-one} \
120+ gat --force-color -l $1
118121 } elif (( $+commands[bat] )) { # recommended themes: ansi, zenburn
119122 BAT_THEME=${BAT_THEME:-ansi} \
120123 bat --color always --paging never -p -l $1
@@ -299,7 +302,7 @@ ZPY_PROCS=${${$(nproc 2>/dev/null):-$(sysctl -n hw.logicalcpu 2>/dev/null)}:-4}
299302 .zpy_fzf_cmd || return
300303 local fzf_cmd=$REPLY
301304
302- local multi fzf_args=(--reverse -0 --preview='<{}/*.in')
305+ local multi fzf_args=(--layout= reverse-list -0 --preview='<{}/*.in')
303306 if [[ $1 == --multi ]] {
304307 unset reply
305308 fzf_args+=(-m)
@@ -1232,17 +1235,19 @@ ZPY_PROCS=${${$(nproc 2>/dev/null):-$(sysctl -n hw.logicalcpu 2>/dev/null)}:-4}
12321235
12331236 rehash
12341237
1238+ local blocklist=(setuptools six pip pip-tools wheel)
1239+
12351240 local cells=()
12361241 if (( $+commands[jq] )) {
12371242 cells=($(
12381243 .zpy_ui_vrun $vrun_args $list_outdated 2>/dev/null \
1239- | jq -r '.[] | select(.name|test("^(setuptools|six|pip|pip-tools|wheel )$")|not) | .name,.version,.latest_version'
1244+ | jq -r '.[] | select(.name|test("^('${(j:|:)blocklist}' )$")|not) | .name,.version,.latest_version'
12401245 ))
12411246 } elif (( $+commands[wheezy.template] )) {
12421247 local template=(
12431248 '@require(__args__)'
12441249 '@for pkg in __args__[0]:'
1245- '@if pkg["name"] not in ("setuptools ", "six", "pip", "pip-tools", "wheel "):'
1250+ '@if pkg["name"] not in ("'${(j: ", ":)blocklist}' "):'
12461251 '@pkg["name"]'
12471252 '@pkg["version"]'
12481253 '@pkg["latest_version"]'
@@ -1261,7 +1266,7 @@ import sys
12611266from json import load
12621267pkgs = load(sys.stdin)
12631268for pkg in pkgs:
1264- if pkg["name"] not in ("setuptools ", "six", "pip", "pip-tools", "wheel "):
1269+ if pkg["name"] not in ("'${(j: ", ":)blocklist}' "):
12651270 print(pkg["name"], pkg["version"], pkg["latest_version"], sep="\n")
12661271 '
12671272 ))
@@ -1435,7 +1440,7 @@ def reqs_from_reqsin(reqsin):
14351440 reqs.append(
14361441 re.search(r'^(-\S+\s+)*([^#]+)', line).group(2).rstrip()
14371442 )
1438- return sorted(set(r for r in reqs if r.strip()))
1443+ return sorted(set(r for r in reqs if r.strip() and r not in ('.',) ))
14391444
14401445
14411446suffix = 'requirements.in'
@@ -1520,7 +1525,7 @@ Path('''${newtoml}''').write_text(tomlkit.dumps(toml_data))
15201525 jq --argjson val "$value" "${keypath}=\$val" "$jsonfile"
15211526 )" >$jsonfile
15221527 } else {
1523- python -c "
1528+ python3 -c "
15241529from collections import defaultdict
15251530from json import loads, dumps
15261531from pathlib import Path
@@ -1830,7 +1835,7 @@ for pkg in pkgs:
18301835 local fzf_cmd=$REPLY
18311836
18321837 local fzf_args=() fzf_header fzf_prompt multi
1833- fzf_args=(--reverse -0)
1838+ fzf_args=(--layout= reverse-list -0)
18341839 fzf_header='Packages:'
18351840 fzf_prompt='Which package? '
18361841 while [[ $1 == --(header|multi) ]] {
@@ -1908,7 +1913,7 @@ for pkg in pkgs:
19081913 projects_home=$1; shift
19091914 bins_home=$1; shift
19101915
1911- local bins_showlist=() bins_hidelist=() linkonly=1 fzf_args=(--reverse -m -0) fzf_header=Installing
1916+ local bins_showlist=() bins_hidelist=() linkonly=1 fzf_args=(--layout= reverse-list -m -0) fzf_header=Installing
19121917 while [[ $1 == --(cmd|activate|no-cmd|auto1|header) ]] {
19131918 if [[ $1 == --cmd ]] { bins_showlist=(${(s:,:)2}); shift 2 }
19141919 if [[ $1 == --no-cmd ]] { bins_hidelist=(${(s:,:)2}); shift 2 }
@@ -2949,7 +2954,7 @@ _.zpy_ui_pipz () {
29492954 )
29502955 wheezy.template =(<<<${(F)template}) $json >$txt
29512956 } else {
2952- python -c "
2957+ python3 -c "
29532958from pathlib import Path
29542959from json import loads
29552960
0 commit comments