[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#282067: yes!



on Sat, Dec 18, 2004 at 12:36:17PM +0100, Gergely Nagy (algernon@bonehunter.rulez.org) wrote:
> On Fri, 2004-12-17 at 22:27 -0800, Karsten M. Self wrote:
> > on Wed, Nov 24, 2004 at 04:54:27PM +0000, Colin Watson (cjwatson@debian.org) wrote:
> > > On Fri, Nov 19, 2004 at 06:05:39PM +0100, martin f krafft wrote:
> > > > also sprach Gergely Nagy <algernon@bonehunter.rulez.org> [2004.11.19.1802 +0100]:
> > > > > Umm.. So if I have an NFS-shared $HOME, that I share between
> > > > > Debian, various BSDs and commercial Unixes, I'll have to resort to
> > > > > black magic to get some of my dotfiles appear where they need to,
> > > > > on all of the systems I'm using them?
> > > > 
> > > > Use symlinks.
> > > 
> > > Or how about we all get a grip and stop making changes for the sake of
> > > changes when the present situation works perfectly well and
> > > interoperates well?
> > 
> >     $ ls -d . | wc -l
> >     221
> > 
> > ...note that that includes . & .., so we're talking 219 dotfiles and
> > directories.
> > 
> > Frankly, I'd like to see a $HOME cleanup.  Dotfiles are hard to manage,
> 
> For the past few years, I did not have any problems managing my
> dotfiles, and I have quite a many (346 to be exact).

Have you tracked growth and/or proliferation?  I remember when I had two
dotfiles.  The trend is to more, and it's likely to accelerate.
 
> > there are possible conflicts between packages and user files, and it's
> > tough just to come up with a good directory list recipie to show, say,
> > just dotfiles and directories, excluding . and .., on the command line,
> > without resorting to filters and/or pipes.
> 
> Pipes! Oh god! Run, run for your lives, he said pipes and filters!
> Aaargh!

Actually, I found a solution after a bit of banging around:

   $ ls -A --ignore=[^.]*

...which can be aliased, say:

   alias ldot='ls -A --ignore=[^.]*'


As for avoiding filters and pipes in directory listings:  there's a lot
to be said for ls output which:

  - Is colorized.
  - Is columnar.
  - Doesn't behave radically different from any other ls commands.

Sure, pipes and filters are useful.  Or you can append a '-C' for
columnar output.  Or you can have stuff colorized[1].

Managing this in one command preserves some useful functionality and
consistancy.
 
> > I agree that policy is rather blunt for this to happen, but the
> > desire needs to be expressed somewhere.
> 
> He who is not happy with the situation, can symlink their stuff from
> $HOME to $HOME/etc already. If you're not happy with that, why should I
> be happy with symlinking stuff from $HOME/etc to $HOME?

First, nobody's said which way the symlinks need to run.  And
compatibility modes have run both ways.

What's more important than raw implmentation is expressing a preference
and getting applications developers to start following it.  Everything
else is bloviating.
 
> Especially if that's only on Debian, 

The idea would be for this to get beyond just Debian.

There's some precedent for this.  SysV init comes to mind:  RH
eventually came around to the LSB/Debian mode.  With a compatibility
mode link farm for a while.  Debian's own migration from /usr/doc to
/usr/share/doc is another.  You'll likely find you've still /usr/doc
populated with symlinks on your system.


Anyhow, if folks want to create an ~/etc/ populated with dotfiles as
links:

   cd
   alias ldot="ls -A --ignore=[^.]*"
   mkdir etc
   cd etc
   for f in $( ldot .. )
   do 
       echo -e "Doing $f ... \c"
       ln -s ../$f $( echo $f | sed -e 's/^\.//' ) && echo OK ||
           echo "** error **"
   done

...which puts dotfiles into a form more readily managed, by some
measures.  Note you'll have to refresh the directory as dotfiles are
added and/or removed.


Peace.

--------------------
Notes:

1.  Unless you're a Pommy, and prefer colourised ls.

-- 
Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
   Data corrupts.  Absolute data corrupts absolutely.
   - Ed Self's corollary of Atkinson's Law.

Attachment: signature.asc
Description: Digital signature


Reply to: