<table cellspacing="0" cellpadding="0" border="0"><tr><td valign="top"><p>I think this will work for both Linux and BSD systems</p>
<p>ls -l "$MARKPATH" | sed 's: : :g; s:->:|->:' | cut -d' ' -f9- | column -ts'|' && echo</p>
<p>Basically, it does a long listing of the .marks directory and grabs the symlink information (fields 9 and on) and pretty-prints it using the column utility.<br>
The sed expression compresses multiple spaces to one space, which makes it easier for the cut utlity to grab the right fields. It also adds a delimiter to the symlink arrow, which the column utility will use to mark the columns.</p>
<p>The "&& echo" is optional; it just adds a newline to the end of the list.</p>
<p>I used colons rather than slashes for my sed regexp separators since I am often searching and replacing filepaths.</p>
<p>Lan<br>
PS: I find it useful to put all the shell functions and the bash completion into a script, which I then source in my .bashrc.</p>
</td></tr></table> <div id="_origMsg_">
<div>
<br />
<div>
<div style="font-size:0.9em">
<hr size="1">
<b>
<span style="font-weight:bold">From:</span>
</b>
Lan Dang <l.dang@ymail.com>; <br>
<b>
<span style="font-weight:bold">To:</span>
</b>
SGVLUG Discussion List. <sgvlug@sgvlug.net>; <br>
<b>
<span style="font-weight:bold">Subject:</span>
</b>
Re: [SGVLUG] Quick directory navigation tip <br>
<b>
<span style="font-weight:bold">Sent:</span>
</b>
Tue, Aug 20, 2013 6:03:48 PM <br>
</div>
<br>
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td valign="top"><p>It looks pretty cool. I may adjust my policy of not overly customizing my environments to use this.</p>
<p>I am going to investigate his horrific OSX version of the marks function and see if we can't come up with something better than that pipeline of tail, sed, cut, and awk. I notice the Linux version of the marks function is not much better.</p>
<p>Lan</p>
</td></tr></table> <div id="_origMsg_">
<div>
<br />
<div>
<div style="font-size:0.9em;">
<hr size="1">
<b>
<span style="font-weight:bold;">From:</span>
</b>
James McDuffie <mcduffie@pitfall.org>; <br>
<b>
<span style="font-weight:bold;">To:</span>
</b>
SGVLUG Discussion List. <sgvlug@sgvlug.net>; <br>
<b>
<span style="font-weight:bold;">Subject:</span>
</b>
[SGVLUG] Quick directory navigation tip <br>
<b>
<span style="font-weight:bold;">Sent:</span>
</b>
Tue, Aug 20, 2013 5:55:42 PM <br>
</div>
<br>
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">This guy created a pretty nifty and compact way to place marks on<br>commonly used directories to allow you to quickly navigate to them:<br><a rel="nofollow" target="_blank" href="http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-filesystem-from-the-command-line.html">http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-filesystem-from-the-command-line.html</a><br><br>There are other solutions but this one just requires some additions to<br>your .bashrc (or .zshrc).<br><br></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>