#904597 vidir: No CLI for renaming subdirs

Package:
moreutils
Source:
moreutils
Description:
additional Unix utilities
Submitter:
Daniel Shahaf
Date:
2022-10-31 13:45:06 UTC
Severity:
wishlist
Tags:
#904597#5
Date:
2018-07-25 14:16:00 UTC
From:
To:
Dear Maintainer,

vidir's interface is:

	SYNOPSIS
	    vidir [--verbose] [directory|file|-]...

With this interface, there is no way for the user to say "I would like
to open vidir in order to rename several subdirectories of the current
directory".  That's because any directory specified in the arguments is
interpreted as shorthand for "all files in that directory"; the only way
for a directory to be shown as an item in the list is if its parent
directory is an argument.

Put another way, when one runs «vidir foo», the behaviour is different
if foo is a file to if it's a directory.  (That can be surprising, but
on the other hand, it does mirror the behaviour of ls(1) and cp(1).)

I propose a command-line flag that causes any pathname specified in argv
to be handled the same way, whether it's a file or a directory.  That
is, «vidir --new-flag foo» would always open an editor with a single
item in it, regardless of whether foo happened to be a directory or not.

WDYT?

Cheers,

Daniel

#904597#8
Date:
2022-10-31 13:43:47 UTC
From:
To:
* Daniel Shahaf <danielsh@apache.org>, 2018-07-25 14:16:

There is a way, but it's awkward:

     ls -d foo bar | vidir -

I'd like such an option too. It probably should be called
-d/--directory, for consistency with ls(1).