11 July 2011

Fish 3.07: More compact longer listings

I made a minor update to Fish, available from Github. This fixed a rather nasty bug that had broken many aspects of the perms command and which also modified the behaviour of the ls -L command (longer listing, including Fluidinfo-style permissions summary). The behaviour that was previously generated by ls -L is still available with ls -G, which is exemplified by
$ fish ls -G njr/rating

njr/rating:

ABSTRACT TAG (/tags)
  Write
    update (metadata):   policy: closed; exceptions = [njr, miro]
    delete (delete):     policy: closed; exceptions = [njr, miro]
  Control
    control (acontrol):  policy: closed; exceptions = [njr, miro]

TAG (/tag-values)
  Read
    read (read):         policy: open; exceptions = []
  Write
    create (tag):        policy: closed; exceptions = [njr, miro]
    delete (untag):      policy: closed; exceptions = [njr, miro]
  Control
    control (tcontrol):  policy: closed; exceptions = [njr, miro]
The new behaviour for ls -L will present a more compact summary in the large majority of cases where the four write permissions for tags are identical and the two control permissions are the same. This simplified view is:
$ fish ls -L njr/rating

njr/rating:
     read: policy: open; exceptions = []
    write: policy: closed; exceptions = [njr, miro]
  control: policy: closed; exceptions = [njr, miro]
The longer view is generated when the permissions cannot be shown accurately in this more compact form. Analogous behaviour occurs for namespaces when their three write permissions are identical. For example:
$ fish ls -Gn njr/fi

njr/fi/:

NAMESPACE (/namespaces)
  Read
    list (read):        policy: closed; exceptions = [njr, miro]
  Write
    create (create):    policy: closed; exceptions = [njr, miro]
    update (metadata):  policy: closed; exceptions = [njr, miro]
    delete (delete):    policy: closed; exceptions = [njr, miro]
  Control
    control (control):  policy: closed; exceptions = [njr]
reduces to:
$ fish ls -Ln njr/fi

njr/fi/:
     read: policy: closed; exceptions = [njr, miro]
    write: policy: closed; exceptions = [njr, miro]
  control: policy: closed; exceptions = [njr]
The very perceptive reader will also notice that the longest listing now includes the write update (metadata) permission that controls access to writing the namespace description; this was missing in previous releases as a result of a typographical error in the source. (Computers can be so picky.)

No comments:

Post a Comment

Labels