bug-bash
[Top][All Lists]
Advanced

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

Re: to - Bookmark file system locations in bash on POSIX-like systems


From: Chris Down
Subject: Re: to - Bookmark file system locations in bash on POSIX-like systems
Date: Thu, 4 Apr 2013 17:27:23 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Mara,

On 2013-04-04 03:58, Mara Kim wrote:
> What is do you mean specifically by function vs [?  Do you mean parens?  Is
> function a bash-ism?

function is a bashism, yes. You can just omit it and your function declarations
magically become POSIX.

> I am really only enthusiastic about the interface of 'to'.  While 'jump'
> has a faster running time, 'to' lets you move directly to subdirectories of
> your bookmark.  For example, '$ to foo/bar' moves you to the bar directory
> under the foo bookmark, with tab completion!

Hmm, that's interesting and potentially desirable (I think this is the first
time I've said that on this list!).

> You are right though, the implementation is a mess.  I originally wanted to
> have a stable filesystem representation of a user's bookmarks (thus, the
> bookmarks file) so that a user could directly edit the bookmarks, but that
> has turned into a messy glob of sed statements.  The concept itself is so
> simple that I think I'm going to reimplement it using a bookmarks folder
> with symlinks.  That would solve all the problems related to filenames, and
> most likely provide better running times as well. (*cough* git checkout -b
> link)

That is a good idea which for some reason slipped my mind. You probably will
want to use cd -P.

Will probably follow up with a jump implementation using symlinks, I like it. It
certainly makes sense since we're dealing with paths anyway.

Chris

Attachment: pgppjz5CjSdTR.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]