Linux on a WinDev’s Laptop Part3 - CDArgs

CDArgs is an essential tool for me to aid navigating directories in a command shell (terminal) window. I used to have my own little utility on Windows, but this is waaay better.

I’m a bit of a command-line freak - probably because of developing my programming skills when DOS was at version 2.0, and working with Unix and Vax systems via terminals. As a result, living on Windows I’ve got pretty good at creating little batch files to assist, sometimes pushing the command shell to its limits (using features of the batch language that most people probably don’t even know exist - but that’s another story).

On thing I find myself doing often is changing the current directory back and forth between favourite places. For example, d:\work\clientz\projectx\source, to c:\inetpub\sitex\html\bin via c:\downloads. Even with tab-completion this is a lot of typing. So I wrote a batch file called GO which let me switch by short names, eg type GO DL would take me to the downloads directory. I always wanted to improve it however, especially since I had about 30 favourite directories after a while and couldn’t always remember what the shortcut was.

On Linux I can say goodbye to all that. One sudo apt-get install cdargs later I have the cv command, which gives me everything I had in my GO.BAT, plus a super-fast (just use arrow keys) directory browser, and the select-from-a-list ability for the bookmarked directories - which are stored in a clean format in ~/.cdargs

I’m not going to explain any more because an article on linux.com, CLI Magic: CDargs explains it all well.

An aside - I wish that GNOME and KDE would cooperate more, at least in the various user preferences files. The GTK/GNOME file picker dialog has a “places” panel in which you can bookmark favourite directories, and the KDE one has ‘bookmarks’ . Yup, they store these in different formats in different places (~/.gtk-bookmarks and ~/.kde/share/apps/kfile/bookmarks.xml) (Sadly neither of them look at ~/.cdargs either). It’s probably too late to change much about KDE 4, but maybe GNOME 3 could think about this one, please!

Another thing that gets me is file picker dialogs (open/save, select folder etc) that don’t have a way to directly type a path, forcing navigation through the tree. The GTK one (used by the Mozilla apps for example) is particularly annoying. The KDE equivalent does. (OOo3 seems to use a new one, which does .. but now has no bookmarks. Sigh. This may be a packaging issue of course)

1 Comment »

  1. There is some hope that Firefox will be able to use KDE dialogs in future, thanks to the QT port - http://dot.kde.org/1218543988/ … here’s hoping

    Comment by walter — August 14, 2008 @ 11:55 am

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.