darcs

Issue 1194 Mark directories in 'show files' when listing files & directories

Title Mark directories in 'show files' when listing files & directories
Priority wishlist Status given-up
Milestone 2.8.0 Resolved in
Superseder Nosy List btcoburn, darcs-devel, dmitry.kurochkin, jaredj, kowey, thorkilnaur, twb
Assigned To
Topics ProbablyEasy, UI

Created on 2008-11-03.05:59:53 by btcoburn, last changed 2017-07-31.00:37:38 by gh.

Messages
msg6568 (view) Author: btcoburn Date: 2008-11-03.05:59:47
The 'darcs show files' command needs an option like '--mark-directories' which
adds a trailing '/' to directory names (or simply, a change in it's default
behavior).

As it stands now (darcs 2.1), the default behavior of 'show files' is to list
everything in the repository without distinguishing between files and
directories. This leaves one having to either test each path to see what it is,
or running 'darcs show files --no-files', post-processing the output, and then
combining it with 'darcs show files --no-directories'.

IMHO, the default behavior should be to add trailing slashes to directory
names... However if there is sufficiently strong reason not to do this, it would
be good to have an option like '--mark-directories'.
msg7556 (view) Author: twb Date: 2009-03-29.07:32:48
On Sun, Nov 02, 2008 at 06:59:47PM +0000, Ben Coburn wrote:
> [Add a trailing slash when "darcs show files" talks about directories.]

It looks like this should be done in Darcs.SlurpyDirectory.Internal's
list_slurpy_dirs?

Or perhaps this would be achieved by special casing /// such that

     (\\\) :: FilePath -> FilePath -> FilePath
     (\\\) "" d = d
     (\\\) d "." = d
    +(\\\) d "" = "/" ++ d
     (\\\) d subdir = reverse subdir ++ "/" ++ d

     (///) :: FilePath -> FilePath -> FilePath
     (///) "" d = d
     (///) d "." = d
    +(///) d "" = d ++ "/"
     (///) d subdir = d ++ "/" ++ subdir

I confess that how slurpy works completely eludes me.
msg7577 (view) Author: kowey Date: 2009-04-06.01:19:16
On Sun, Mar 29, 2009 at 07:32:50 -0000, Trent Buck wrote:
> It looks like this should be done in Darcs.SlurpyDirectory.Internal's
> list_slurpy_dirs?
> 
> Or perhaps this would be achieved by special casing /// such that

It sounds like here, a shallower approach on the level of
Darcs.Commands.ShowFile would be more appropriate.
msg10669 (view) Author: kowey Date: 2010-04-04.19:13:51
Sounds like a potential candidate for the 2010-10 hacking sprint
msg15241 (view) Author: gh Date: 2012-03-09.20:07:51
How should directory marking appear under Windows?
With a final "\"?
History
Date User Action Args
2008-11-03 05:59:53btcoburncreate
2009-03-29 07:32:50twbsetstatus: unread -> unknown
nosy: + twb
messages: + msg7556
2009-04-06 01:19:19koweysetnosy: kowey, dagit, simon, twb, thorkilnaur, btcoburn, jaredj, dmitry.kurochkin
messages: + msg7577
2009-08-10 23:50:16adminsetnosy: - dagit
2009-08-22 00:15:13koweysetstatus: unknown -> needs-implementation
nosy: kowey, simon, twb, thorkilnaur, btcoburn, jaredj, dmitry.kurochkin
2009-08-25 17:33:22adminsetnosy: + darcs-devel, - simon
2009-08-27 14:29:06adminsetnosy: kowey, darcs-devel, twb, thorkilnaur, btcoburn, jaredj, dmitry.kurochkin
2010-04-04 19:13:53koweysettopic: + Target-2.6
messages: + msg10669
2010-06-15 21:07:52adminsettopic: - Target-2.6
2010-06-15 21:07:53adminsetmilestone: 2.8.0
2012-03-09 20:07:52ghsetmessages: + msg15241
2017-07-31 00:37:38ghsetstatus: needs-implementation -> given-up