This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cdargs usage


Hi All,

> I am confused about how to use cdargs. I have been reading these two pages:
> http://www.linux.com/learn/tutorials/332972-cdargs-brings-bookmarks-to-the-linux-command-line
> http://www.linux.com/archive/articles/114073
>
> They reference things that don't seem to work on Cygwin.
>
> For example, they both say to source cdargs-bash.sh - which isn't
> present on Cygwin. I do have these:
> /usr/share/cdargs/cdargs-alias.sh
> /usr/share/cdargs/cdargs-bash-completion.sh
> /usr/share/cdargs/cdargs-lib.sh
>
> And they mention a bunch of aliases I don't have, like ca, cdb. And I
> read somewhere else about a mark command I don't have.
>
> How do I set myself up to use these?

Well, I worked out this much thanks to man cdargs:

I can construct my own functions to "mark" a cdargs directory and then
"cdb" into it.

function cdb() {
   cdargs "$1" && cd "`cat "$HOME/.cdargsresult"`" ;
}

function mark() {
   cdargs --add=:$1:` cygpath -u -a .`
}

cd /blah/blah
mark blah
cdb blah

Rob
:)

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]