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.

Submitter:  Kaz Kylheku <kkylheku>
Submitted:  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
Assigned to:  None Percent Complete:  0%
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

dir:503:txr
file:503:.bashrc

That's just one idea.

Kaz Kylheku <kkylheku>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code