On Thu, Apr 4, 2013 at 4:27 AM, Chris Down <ch...@chrisdown.name> wrote: > Hmm, that's interesting and potentially desirable (I think this is the first > time I've said that on this list!).
It gets downright dangerous once you realize you can use the -p option to do things like $ vim $(to -p foo/bar.cpp) I've done a complete refresh of 'to' using symbolic links. Turns out, it's a lot simpler (yay!), and seems to mesh better with the conventions of the POSIX file system. Mara On Thu, Apr 4, 2013 at 4:27 AM, Chris Down <ch...@chrisdown.name> wrote: > 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 > -- M -- M