glab repo sorting not working with FLAG -s / --sort

Checklist

  • I'm using the latest version of the extension (Run glab --version)
    • Extension version: Put your extension version here
  • Operating system and version: Arch linus - endeavour
  • Gitlab.com or self-managed instance? self-managed instance
  • GitLab version (if self-managed) 18.7.1 (Use the version endpoint, like this: gitlab.my-company.com/api/v4/version)
  • I have performed glab auth status to check for authentication issues
  • Run the command in debug mode (like DEBUG=true glab mr list) and attach any useful output

Summary

when running

glab repo list --all -s desc -F json | jq -r '.[].id'

the output is not sorted

Environment

  • OS: EndeavourOS x86_64
  • SHELL: zsh
  • TERM: kitty
  • GLAB: 1.81.0. ()

Other:

Steps to reproduce

glab repo list --all -s desc -F json | jq -r '.[].id'
17
49
5
48
47
29
12
7
46
13
15
3
2
8
40
45
35
41
44
43
42
18
4
36
39
38
6
1
37
34


glab repo list --all -s asc -F json | jq -r '.[].id'       
9
10
11
14
16
19
20
21
22
23
24
25
26
27
28
30
31
32
33
34
37
1
6
38
39
36
4
18
42
43

What is the current bug behavior?

a random project id list is returned

What is the expected correct behavior?

I expect the repo's-id list to be orders in numerical order!? or how is this constructed. on what basis is this list sorted? this is not mentioned or explained

what is the purpose of the FLAG -s / --sort?

numerical odered output list

1
4
6
9
10
11
14
.
.
.
.

Relevant logs and/or screenshots

Possible fixes

Additional information for improvement

Review all command to be consisten in te way you provide FLAGS sorting across commands

some are -s, some are -S, this makes it confusing especial for integration/automation.

Edited Jan 22, 2026 by Bart DevOps
Assignee Loading
Time tracking Loading