public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cdargs usage
@ 2010-09-25 12:52 Robert Mark
  2010-09-26 14:58 ` Robert Mark
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Mark @ 2010-09-25 12:52 UTC (permalink / raw)
  To: cygwin

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?

Thank you for any advice!

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cdargs usage
  2010-09-25 12:52 cdargs usage Robert Mark
@ 2010-09-26 14:58 ` Robert Mark
  2010-09-26 17:04   ` Robert Mark
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Mark @ 2010-09-26 14:58 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cdargs usage
  2010-09-26 14:58 ` Robert Mark
@ 2010-09-26 17:04   ` Robert Mark
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Mark @ 2010-09-26 17:04 UTC (permalink / raw)
  To: cygwin

Hi All,

> 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

For more detail, I wrote up my experiences here:
http://robertmarkbramprogrammer.blogspot.com/2010/09/using-cdargs-in-cygwin.html

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: cdargs usage
  2008-08-11  8:00 Robert Bram
@ 2008-08-12 23:05 ` Buchbinder, Barry (NIH/NIAID) [E]
  0 siblings, 0 replies; 5+ messages in thread
From: Buchbinder, Barry (NIH/NIAID) [E] @ 2008-08-12 23:05 UTC (permalink / raw)
  To: cygwin, Robert Bram

Robert Bram wrote on Monday, August 11, 2008 1:30 AM:
> The cdargs manpage says:
>   <ENTER>
>       select current entry.
> 
> But when I go to cdargs browse or list mode, I exit cdargs but the
> directory hasn't changed. Have I misinterpreted how cdargs works in
> Cygwin?  

No, not exactly.  It sounds as if you may have misinterpreted how
cdargs works everywhere. :-)

It seems like your shell doesn't know what directory you have chosen
with cdargs.  A process (e.g., cdargs) cannot by itself change it's
parent's working directory.  The best it can do is to leave the
information (the desired directory) somewhere that the shell can
find.  That is why the cdargs man page includes the following in the
SYNOPSIS.  (You might also read the DESCRIPTION carefully.)

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

(Not that I've ever used cdargs ...)

Good luck!

- Barry
  - Disclaimer: Statements made herein are not made on behalf of NIAID.


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* cdargs usage
@ 2008-08-11  8:00 Robert Bram
  2008-08-12 23:05 ` Buchbinder, Barry (NIH/NIAID) [E]
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Bram @ 2008-08-11  8:00 UTC (permalink / raw)
  To: cygwin

Hi All,

The cdargs manpage says:
  <ENTER>
      select current entry.

But when I go to cdargs browse or list mode, I exit cdargs but the
directory hasn't changed. Have I misinterpreted how cdargs works in
Cygwin?

Any help would be most appreciated!
 
Rob

:)

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-09-26  4:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-25 12:52 cdargs usage Robert Mark
2010-09-26 14:58 ` Robert Mark
2010-09-26 17:04   ` Robert Mark
  -- strict thread matches above, loose matches on Subject: below --
2008-08-11  8:00 Robert Bram
2008-08-12 23:05 ` Buchbinder, Barry (NIH/NIAID) [E]

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).