|
|
Log in / Subscribe / Register

CLI Magic: CDargs (Linux.com)

Linux.com looks at CDargs. "Typing long path names at the command line can get to be a chore very quickly. Even with tab-completion, it can take a lot of typing to move from your home directory to /var/www/www.mysite.com/cgi-bin or something similar. Wouldn't it be much better if you could "bookmark" long path names and type something simple, like cdb site, to get to a directory? That's where CDargs comes in. CDargs is a program that provides bookmarks and browsing at the command line. It takes a little work to set up, but it's well worth it. I've been using this program for a few years now, and it really does help speed up work at the shell."

to post comments

CLI Magic: CDargs (Linux.com)

Posted Sep 19, 2005 19:42 UTC (Mon) by sfeam (subscriber, #2841) [Link] (1 responses)

Oh my. The return of VMS logical names!

CLI Magic: CDargs (Linux.com)

Posted Sep 20, 2005 13:36 UTC (Tue) by pbardet (guest, #22762) [Link]

Or the Amiga "assigns" if I remember correctly the name they used for that feature.
Except that you could use an assign as a starting point to move somewhere down the directory. Doesn't seem that cdargs does that.

CLI Magic: CDargs (Linux.com)

Posted Sep 19, 2005 19:44 UTC (Mon) by nix (subscriber, #2304) [Link]

You can get a very large part of this simply by pointing CDPATH to a directory full of symlinks. Add an alias that invokes mc on that directory, and bingo.

CLI Magic: CDargs (Linux.com)

Posted Sep 19, 2005 20:44 UTC (Mon) by tnoo (subscriber, #20427) [Link]

Why not

alias cdb='/var/www/www.mysite.com/cgi-bin'

This I use all the time, it's easy to maintain and setup is some lines in
a rc file (e.g. .bashrc)

tnoo

CLI Magic: CDargs (Linux.com)

Posted Sep 20, 2005 9:34 UTC (Tue) by mms (subscriber, #11532) [Link]

Those who use Konsole can also use its bookmarks.
Easy to use and manage (But of course, you need an X server).

CLI Magic: CDargs (Linux.com)

Posted Sep 20, 2005 19:50 UTC (Tue) by stijn (subscriber, #570) [Link] (1 responses)

I find the app quite useful, and file system navigation has sped up considerably. Using aliases for
this purpose becomes cumbersome very fast, and I find the cluttering of the alias name-space
annoying. The directory-with-symlinks mentioned elsethread is quite clever. I do find cdarg's
charming curses editor/browser useful though, or equivalently the fact that I can edit its resource
file. That's not as conveniently done with symlinks. I find the cdpath approach by itself neither
scalable, flexible, nor maintanable, although I use it for a few directories with often visited
subdirectories that have very distinct names.

My main problem with cdargs was that it always seems to take you into the curses browser, even if
you give it a uniquely defined bookmark. On some (possibly badly configured) terminals that
messes up the terminal, and in general the flicker is annoying. Its design seems to be optimized for
a situation that I am never in. A small patch has fixed that issue however.

CLI Magic: CDargs (Linux.com)

Posted Sep 22, 2005 10:21 UTC (Thu) by nix (subscriber, #2304) [Link]

Agreed, CDPATH is mostly useless and serves mainly to trip up shell scripts. The one-entry-and-a-dir-with-symlinks trick is the only use I've ever found for it.


Copyright © 2005, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds