taskText Extractor TXR - Tasks: task #11434, Deprecate hacky pipe ! and...


You are not allowed to post comments on this tracker with your current authentication level.

task #11434: Deprecate hacky pipe ! and directory $ syntax; provide richer functionality.

Submitted by:  Kaz Kylheku <kkylheku>
Submitted on:  Thu 13 Oct 2011 12:46:00 AM UTC  
Should Start On:  Wed 12 Oct 2011 07:00:00 AM UTC Should be Finished on:  Wed 12 Oct 2011 07:00:00 AM UTC
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Percent Complete:  0% Assigned to:  None
Open/Closed:  Open Effort:  0.00

Thu 13 Oct 2011 12:46:00 AM UTC, original submission:  

TXR uses a hack in its @(next) and @(output) directives. If a filename is prefixed with a ! it is a command process pipe to be opened for reading or writing. If it begins with $, it is a directory to be opened such that the directory entries are read as if they were lines of a text file.

Since we have keyword arguments, this hack is unnecessary and should be deprecated.

Secondly, there should be a way to specify to append to a file, rather than to overwrite it.

Furthermore, the directory reading functionality should be richer. It should allow the directory entries to be sorted, so the query doesn't have to resort to piping the output of "ls".

Furthermore, the directory stream can provide more information in the form of fields which the TXR query can capture with pattern matching. Instead of just the name of every directory entry, we can stat() the entry and provide arbitrary inode information: object type, permissions, timestamp, et cetera.

Perhaps a special syntax can specify exactly what fields to be made available and in what form. For instance

@(next :directory "." :format `@type:@uid:@name`)

Where the directory stream would then look like


That's just one idea.

Kaz Kylheku <kkylheku>
Project Administrator


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by kkylheku (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.5