The mentioned feature request (22208) describes a behaviour similar to what I mentioned with some differences. That solution can be used to reproduce mine, if compression is set to leave 0 characters of package names, except for that it leaves additional dots at the beginning of the results. The most satisfying combination of the two requests could be the following: 1. More than one compression zones could be specified. 2. The zone has a length, which can be given in the number of segments. At all zones but the last, this number is mandatory and must be positive. At the last zone, it can also be a negative number, or can be omitted, which is the same as the setting of -1. A specified setting of 0 is considered negative and means even the last segment is compressed. 3. Different number of characters to show from the segments could be set for each zone. 4. If number of characters to leave from a segment is 0, and the length/depth of that zone is greater than 1, then it should be possible to hide the dots that are in the middle of that zone. (the output of that zone would be a single dot, and not a number of dots equal to the length/depth of the zone). 5. A setting can control, that zones should be compressed only if there are segments remaining after this zone, or also when no segments are after this zone. This is meaningful only in zones with length/depth specified. Processing the zones: - Case A: If the length of the last zone is positive: 1. All segments are compressible. Unprocessed segments are fed to zones from left to right. 2. If a zone does not compress any segments, then compressing stops. 3.1 If the number of uncompressed segments is greater then the length of this zone, then the zone is compressing its prescribed number of segments. 3.2 If case 3.1 does not fit, but the zone is set to 'compress segments, even if the number of uncompressed segments is not greater than the length of this zone (no segments will be left uncompressed in this case), then the zone is compressing the remaining segments. - Case B: If the length of the last zone is negative (or ungiven which is the same as -1): 2. If the full original package name is shorter than 'n' segments, then no segments are compressible, therefore nothing is done, stop. 3 Otherwise, the compressible segments are fed to the zones from left to right. 4. The compressible segments are processed the following way: 4.1 If zone is the last zone (length is negative), all the remaining compressible segments are processed. 4.2 If this is not the last zone, and the previous zone did not process any segments, then this zone does not process any segments. 4.3 If this is not the last zone, and the previous zone processed segments: 4.3.1 If there are at least 'x' number of unprocessed segments where 'x' is the zone-to-be-processed, then the zone is processed. 4.3.2 If zone is not processed in 4.3.1, but there are unprocessed segments, then if the zone is set to process segments, even if the number of unprocessed segments is not greater than the length of the zone (no unprocessed compressible segments remain after the zone), then the zone is processed. In this case, the last zone will process 0 segments. Lets join the two specifications in one algorithm: 1. If the last zone length is positive, all segments are compressible. If the last zone length is negative, then the last 'n' segments are never compressed, where 'n' is the absolute value of the length specifier of the last zone, they are not compressible. The segments before this 'n' segment are the compressible segments. If the last segment length is omitted, it is interpreted as a length of -1. If the last segment length is a specified 0, it is interpreted as in negative, therefore all remaining segments are compressible. 2. If there are no compressible segments, then the original package name is returned. 3. The zones are processed from first to last. The segments are fed to the zones from left to right. 4. Loop on zones: a: If the zone is the last zone and the length is negative, all remaining segments are compressed. Otherwise: b: If the previous case (4.a) does not fit, and there are less than 'x' uncompressed but compressible segments left, where 'x' is the length of this zone, or number of compressible segments left is equal to actual zone length, but last zone length is positive, then - if we are not forced to process zones when there are no segments after the zone, then -- if the last zone is negative, then jump to that zone, and compress all remaining compressible segments as per that zone, and then stop compressing. -- if the last zone is not negative, then stop compressing. - otherwise do case 4.c c: The zone compresses the number of segments specified for it, if there are that many compressible segments, otherwise processes all compressible segments left. If there are compressible segments left, then take next zone, if not specified otherwise in 4.b 5. Uncompressible segments are appended to the compressed ones. Compression of a segment is the following: 1. Take the number of characters as specified to be kept. 2. If the length of the segment is more then the specified for keeping, then append the replace character if it is given. 3. If the segment is not the last segment, then - if the dot in the middle of a zone setting is true for this zone, and it is not the last segment in the processed part of the zone (a zone can be partially processedin step 4.c) then append a dot ('.') - if the dot after the zone setting is true, and we are at the end of the processed part of the zone, then append a dot ('.') The cases in both requests (22208, and this) and also the behaviour in 2.0.1 can be fully carried out with this specification. Zones can be given as a space separated list of zone definitions. A zone is parsed from the right side of the string. A zone definition format is the following: zonedefinition::= [] lengthspecifier::= { SLASH | BACKSLASH } length Slash means compression is not forced if - the last zone length is positive, and no segments remain after the zone, or - the last zone length is non-positive, and the processed zone is not the last, and there are less compressible segments than the length of the zone processed zone Backslash means compression is forced in the upper two cases. compressionspecier::= [][][] dotchar::= { DOT | EXCLAIM | PIPE | ASTERISK } DOT ::= '.' and it means, dots has to be appended after every compressed segment EXCLAIM ::= '!' and it means no dot will be appended after compressed segments PIPE ::= '|' and it means, that only dots in the middle of a processed zone will be appended (in case of incompletely processed zones, the last processed segment won't be followed by a dot). Not too useful. ASTERISK::= dots will be appended only after a processed zone, but no compressed segments not ending a zone Here a segment is considered compressed, even if the name is shorter or equal long to . replacechar::= any non-space and non-digit character (default nothing) ********************************************** * for replacechar to be any valid dotchar * * character, dotchar has to be given as well * ********************************************** keepchars::= number of characters to keep from a segment (default 0) (at least one of the uppers must be specified)