ZTree.com  | ZEN  | About...  

 Index   Back

[ZEP] Labels in history lists   [ZEP]

By: Ben Kent       
Date: Aug 03,2020 at 16:40
In Response to: [ZEP] Labels in history lists (Laurent Duchastel)

> Filter Specification's History List allows labels, which are of
> great help to visually find an entry. Moreover, that specific history
> list allows space between label and filter expression for a neat
> alignment.
>
> History of Filter, clear and clean
>
>
> Unfortunately, all other history lists do not support labels. You can
> add a label manually (by editing the ZTW.HST file) but the label will
> generate an error when the item is pasted in command input line.
>
> History of Treespec, less clear and clean
>
>
> I wish labels could be accepted in all history lists, for both
> productivity and uniformity of user experience.

Get's my vote as well.

But XTree only had labels on filters because ":" is not a valid filter character and so can safely be used as a label terminator, whereas other input locations ":" can be a valid character. ZTree just followed XTree.

So the problem becomes how to delimit the label in a way that will not break existing history items.

Below are some old notes on the subject.

-----------------------------------
History: Labeling history lists

At present only the FileSpec history list can be labeled, by using a
colon as a label terminator, like this

Scripts:*.vbs *.js *.wsf *.wsh *.bat *.cmd

To give long or complex filespecs a easy to recognize tag, so that when
it comes to retrieving it from the history list, it is easier to find.

I would like this functionality or some variant to be applied to the
other history lists, especially the macro and rename mask ones, but there
is the problem that colon is a valid character in these items and so how
would ZTree differentiate between the a colon as a label and one that is
just part of the item? Macros can have a comment suffixed using the
",STOP, comment" syntax. I don't like the idea of changing the terminator
from colon for these entries as it is easy to read. A possible solution
is to use a prefix character as well as the colon terminator for the
label on history lists where colon could be part of the entry (most of
them excluding filespec), something like one of these

$Label:SPLIT,TAB,\,ALT_UP,ESC,TAB,\,F3,RET
!Label:SPLIT,TAB,\,ALT_UP,ESC,TAB,\,F3,RET
:Label:SPLIT,TAB,\,ALT_UP,ESC,TAB,\,F3,RET

My preference is for colon ":", as it looks clean, but may cause problems
with some of the history lists, but then how often is colon need to be
the first character in a history list?

The prefix character needs to be easy to type (and on non-US keyboards),
and have mnemonic meaning

@ Don't add to the history list, except for the macro list, where it
means load the file after the @ : label terminator

Another method is a label termination character (to be used instead of
colon) that is accessed with a key like Alt-], but displays as a square,
or the colon in inverted colours. With this there would be no problem of
the character being used in the text of the item that the label is going
to be used for.
-----------------------------------


Ben

124 views      
 

Messages in this Thread

 
95,101 Postings in 11,990 Threads, 350 registered users, 54 users online (0 registered, 54 guests)
Index | Admin contact |   Forum Time: Sep 23, 2020 - 3:31 pm EDT  |  Hits:34,220,573  (13,413 Today )
RSS Feed