Codebergdnkl

foot

master
ply6 git calls655 ms29 KiB3 cachedprotocol v2
90 lines2.7 KiBRaw
1# Bash completion script for foot
2_foot()
3{
4 COMPREPLY=()
6 local cur prev flags word commands match previous_words i offset
7 flags=(
8 "--app-id"
9 "--toplevel-tag"
10 "--check-config"
11 "--config"
12 "--font"
13 "--fullscreen"
14 "--help"
15 "--hold"
16 "--log-colorize"
17 "--log-level"
18 "--log-no-syslog"
19 "--login-shell"
20 "--maximized"
21 "--override"
22 "--print-pid"
23 "--pty"
24 "--server"
25 "--term"
26 "--title"
27 "--version"
28 "--window-size-pixels"
29 "--window-size-chars"
30 "--working-directory"
31 )
32 flags="${flags[@]}"
33 cur=${COMP_WORDS[COMP_CWORD]}
34 prev=${COMP_WORDS[COMP_CWORD-1]}
36 # Check if positional argument is completed
37 previous_words=( "${COMP_WORDS[@]}" )
38 unset previous_words[-1]
39 commands=$(compgen -c | grep -vFx "$(compgen -k)" | grep -vE '^([.:[]|foot)$' | sort -u)
40 i=0
41 for word in "${previous_words[@]}" ; do
42 match=$(printf "$commands" | grep -Fx "$word" 2>/dev/null)
43 if [[ ! -z "$match" ]] ; then
44 if [[ ${COMP_WORDS[i-1]} =~ ^(--app-id|--toplevel-tag|--config|--font|--log-level|--pty|--term|--title|--window-size-pixels|--window-size-chars|--working-directory)$ ]] ; then
45 (( i++ ))
46 continue
47 fi
48 # Positional argument found
49 offset=$i
50 fi
51 (( i++ ))
52 done
54 if [[ ! -z "$offset" ]] ; then
55 # Depends on bash_completion being available
56 declare -F _command_offset >/dev/null || return 1
57 _command_offset $offset
58 return 0
59 elif [[ ${cur} == --* ]] ; then
60 COMPREPLY=( $(compgen -W "${flags}" -- ${cur}) )
61 return 0
62 fi
64 case "$prev" in
65 --config|--print-pid|--server|-[cps])
66 compopt -o default ;;
67 --working-directory|-D)
68 compopt -o dirnames ;;
69 --term|-t)
70 command -v toe > /dev/null || return 1
71 COMPREPLY=( $(compgen -W "$(toe -a | awk '$1 !~ /[+]/ {print $1}')" -- ${cur}) ) ;;
72 --font|-f)
73 command -v fc-list > /dev/null || return 1
74 COMPREPLY=( $(compgen -W "$(fc-list : family | sed 's/,/\n/g' | uniq | tr -d ' ')" -- ${cur}) ) ;;
75 --log-level|-d)
76 COMPREPLY=( $(compgen -W "none error warning info" -- ${cur}) ) ;;
77 --log-colorize|-l)
78 COMPREPLY=( $(compgen -W "never always auto" -- ${cur}) ) ;;
79 --app-id|--toplevel-tag|--help|--override|--pty|--title|--version|--window-size-chars|--window-size-pixels|--check-config|-[ahoTvWwC])
80 # Don't autocomplete for these flags
81 : ;;
82 *)
83 # Complete commands from $PATH
84 COMPREPLY=( $(compgen -c -- ${cur}) ) ;;
85 esac
87 return 0
90complete -F _foot foot
Diagnostics6 git calls · 655 ms
CallStatusSizeTime0655 ms
discover200178 B4 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=178
git.server.agent=git/2.56.1-Linux
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch server-option object-format
git.server.fetch=shallow wait-for-done filter
git.protocol.version=2
git.pkt.frames=9
git.pkt.data=7
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=178
git.pkt.payload.max=35
ls-refs20010 KiB4 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=4
git.response.bytes=10322
git.response.cache=UPDATING
git.response.duration_ms=4
git.protocol.version=2
git.pkt.frames=108
git.pkt.data=107
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=10322
git.pkt.payload.max=106
git.ls_refs.count=107
git.ls_refs.head=refs/heads/master
fetchcombine:blob:none+tree:2 · deepen 12008.6 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=8830
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=combine:blob:none+tree:2
git.fetch.wants=c0d2c3e95d74cb60526ff28aec9f34ee3df545e0
git.fetch.haves.count=0
git.fetch.deepen=1
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=7
git.pkt.data=5
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=8830
git.pkt.payload.max=8730
git.sideband.band1.bytes=8730
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=14
git.pack.bytes=8730
git.fetch.wide.objects=14
git.fetch.wide.extra_bytes=9909
git.fetch.wide.blobs=0
fetchtree:0 · deepen 102009.3 KiB · hit4 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=9489
git.response.cache=HIT
git.response.duration_ms=4
git.fetch.filter=tree:0
git.fetch.wants=c0d2c3e95d74cb60526ff28aec9f34ee3df545e0
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=7
git.pkt.data=5
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=9489
git.pkt.payload.max=9389
git.sideband.band1.bytes=9389
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=10
git.pack.bytes=9389
git.pack.ofs_delta=0
git.pack.ref_delta=0
git.pack.chain.max=0
git.pack.trailer=de930681b6073ba5b599a0f956bfbd114762ad5a
git.pack.full=10
Open pack map
fetchtree:0200133 B · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=646
git.response.bytes=133
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=tree:0
git.fetch.wants=44adf88aa1bb4dd07c080f1605235d2e075c4f7f
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=133
git.pkt.payload.max=106
git.sideband.band1.bytes=106
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=106
git.pack.trailer=ed54ef790a9d645ded5355cff4a79c1c5e067091
Open pack map
fetch2001.1 KiB646 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=1079
git.response.cache=MISS
git.response.duration_ms=646
git.fetch.wants=e27be2fa88e3f5ea49f4e94131740652802f7465
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=1079
git.pkt.payload.max=1052
git.sideband.band1.bytes=1052
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://codeberg.org/dnkl/foot
Ref
refs/heads/master
Commit
c0d2c3e95d74cb60526ff28aec9f34ee3df545e0
cf-ray
a5e30eed3f8e8a31
Request
d40f5016…
Protocol
v2 · sha1
Agent
git/2.56.1-Linux
Filter
advertised
Fetch
shallow wait-for-done filter
Capabilities
agent ls-refs fetch server-option object-format