Skip to content

Add --children command line flag - #5

Open
mpw wants to merge 2 commits into
alldritt:mainfrom
mpw:main
Open

Add --children command line flag#5
mpw wants to merge 2 commits into
alldritt:mainfrom
mpw:main

Conversation

@mpw

@mpw mpw commented Feb 26, 2026

Copy link
Copy Markdown

Add a --children command line flag that lists the possible further path components for a given incomplete path. Useful for exploring based on the paths.

This is a first cut at that functionality.

@alldritt

Copy link
Copy Markdown
Owner

Thanks for the Pull Request. My apologies for taking so long to respond.

How does the --children flag differ from the existing --sdef flag?

% aequery /Finder/desktop/folder --sdef
class folder 'cfol' (folders) : container
  properties:
    entire contents 'ects' : specifier [r]
    expandable 'pexa' : boolean [r]
    expanded 'pexp' : boolean
    completely expanded 'pexc' : boolean
    container window 'cwnd' : specifier [r]
    name 'pnam' : text
    displayed name 'dnam' : text [r]
    name extension 'nmxt' : text
    extension hidden 'hidx' : boolean
    index 'pidx' : integer [r]
    container 'ctnr' : specifier [r]
    disk 'cdis' : specifier [r]
    position 'posn' : point
    desktop position 'dpos' : point
    bounds 'pbnd' : rectangle
    label index 'labi' : integer
    locked 'aslk' : boolean
    kind 'kind' : text [r]
    description 'dscr' : text [r]
    comment 'comt' : text
    size 'ptsz' : double integer [r]
    physical size 'phys' : double integer [r]
    creation date 'ascd' : date [r]
    modification date 'asmo' : date
    icon 'iimg' : icon family
    URL 'pURL' : text [r]
    owner 'sown' : text
    group 'sgrp' : text
    owner privileges 'ownr' : priv
    group privileges 'gppr' : priv
    everyones privileges 'gstp' : priv
    information window 'iwnd' : specifier [r]
    properties 'pALL' : record
    class 'pcls' : type [r]
  elements:
    items 'cobj'
    containers 'ctnr'
    folders 'cfol'
    files 'file'
    alias files 'alia'
    application files 'appf'
    document files 'docf'
    internet location files 'inlf'
    clippings 'clpf'
    packages 'pack'
    items 'cobj'
    containers 'ctnr'
    folders 'cfol'
    files 'file'
    alias files 'alia'
    application files 'appf'
    document files 'docf'
    internet location files 'inlf'
    clippings 'clpf'
    packages 'pack'

@mpw

mpw commented Jul 3, 2026

Copy link
Copy Markdown
Author

Hi Mark!

Thanks for looking at my (probably ill-advised) PR, and apologies for taking your time.

What I was/am looking for was a simple "what could I type next" functionality, like an autocomplete, but from the perspective of the URIs this tool gives as the interface.

The --sdef flag gave some information in terms of AppleScript, which to me as someone without a lot of AS knowledge (intended audience for this tool?) didn't tell me how I could meaningfully add a next path component to the URI.

I did try it, and all the things I tried from the --sdef output initially just gave me an error.

Instead of just asking for the feature, I thought I'd try to build one with a bit of help from my friendly LLM, and it appeared to do what I wanted, and now all the things I tried did something useful!

Looking at your example, I gues it turns out it just reordered the output from sdef so the elements are first. It also appears that in the examples I tried, the reason that worked for me whereas the previous attempts with --sdef failed was just good/bad luck.

I still think that it would be helpful for this feature to be framed in terms of the URI and not in terms of the AppleScript dictionary, even if that is ultimately where the information comes from.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants