Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-10 Thread Chet Ramey
On 4/10/13 9:56 AM, dnade@orange.com wrote: > WRT getopts, what improvements can we expect for bash 4.3 (or later) ? There are no changes in getopts between bash-4.2 and bash-4.3. It behaves as Posix specifies. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

RE: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-10 Thread dnade.ext
-- > De : bug-bash-bounces+dnade.ext=orange@gnu.org [mailto:bug-bash- > bounces+dnade.ext=orange@gnu.org] De la part de Roman Rakus > Envoyé : mercredi 10 avril 2013 15:42 > À : bug-bash@gnu.org > Objet : Re: to - Bookmark file system locations in bash on POSIX-like > syste

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-10 Thread Roman Rakus
I think the much better would be to improve getopt command or getopts builtin. RR On 04/10/2013 03:35 PM, dnade@orange.com wrote: Sorry to hack the thread, but I was wondering too if there was actually a place/list to announce such contributions. I've recently developpedhttps://github.co

RE: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-10 Thread dnade.ext
Sorry to hack the thread, but I was wondering too if there was actually a place/list to announce such contributions. I've recently developped https://github.com/Anvil/bash-argsparse (high level argument parsing library for bash) and wanted to submit it to the "bash community" for review, commen

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-08 Thread Greg Wooledge
On Thu, Apr 04, 2013 at 08:51:19PM -0500, Mara Kim wrote: > The biggest benefit is that it is just plain easier than managing a > directory of symbolic links on your own. I am extremely lazy. > > Here is an example use case. At the end of a work day, I like to bookmark > the folder I am working in

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-05 Thread Chris Down
On 6 Apr 2013 01:49, "Mara Kim" wrote: > > > See the `-f' option to ln. > > So I did some experimentation, and it is not sufficient to simply use the -f option to ln to update bookmarks > $ ln -s /bin foo > # foo -> /bin/ > $ ln -sf /etc foo > ln: failed to create symbolic link `rot/etc': Permissi

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-05 Thread Mara Kim
> See the `-f' option to ln. So I did some experimentation, and it is not sufficient to simply use the -f option to ln to update bookmarks $ ln -s /bin foo # foo -> /bin/ $ ln -sf /etc foo ln: failed to create symbolic link `rot/etc': Permission denied You also need to use the -n option to preven

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-05 Thread Chris Down
On 2013-04-04 20:51, Mara Kim wrote: > To get back on track. Note that this process is the same even if the 'work' > bookmark already exists, while doing things by hand would throw an error > without first removing the old link. See the `-f' option to ln. > Also you would need to remember to use

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-05 Thread Domingo Ignacio Galdos
Actually, that seems like kind of a good point to me. I think I may dabble with your tool! On Thu, Apr 4, 2013 at 9:51 PM, Mara Kim wrote: > Hi Domingo, > > The biggest benefit is that it is just plain easier than managing a > directory of symbolic links on your own. I am extremely lazy. > > He

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-04 Thread Mara Kim
Hi Domingo, The biggest benefit is that it is just plain easier than managing a directory of symbolic links on your own. I am extremely lazy. Here is an example use case. At the end of a work day, I like to bookmark the folder I am working in on my cluster with to -b work The next day, I can co

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-04 Thread Chris Down
On 2013-04-04 21:05, Domingo Ignacio Galdos wrote: > Hn, I use a similar tool called ln > > In all seriousness what value does or could a tool like this add above ln? > > ln -s ~/some/long/path ~/bookmark > cd ~/bookmark > cd ~/bookmark/nested/tab/completion > rm ~/bookmark > > Sorry I don't mean t

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-04 Thread Domingo Ignacio Galdos
Hn, I use a similar tool called ln In all seriousness what value does or could a tool like this add above ln? ln -s ~/some/long/path ~/bookmark cd ~/bookmark cd ~/bookmark/nested/tab/completion rm ~/bookmark Sorry I don't mean that in a snarly way I am curious if you can come up or have with any

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-04 Thread Mara Kim
On Thu, Apr 4, 2013 at 4:27 AM, Chris Down wrote: > Hmm, that's interesting and potentially desirable (I think this is the first > time I've said that on this list!). It gets downright dangerous once you realize you can use the -p option to do things like $ vim $(to -p foo/bar.cpp) I've done a c

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-04 Thread Chris Down
Hi Mara, On 2013-04-04 03:58, Mara Kim wrote: > What is do you mean specifically by function vs [? Do you mean parens? Is > function a bash-ism? function is a bashism, yes. You can just omit it and your function declarations magically become POSIX. > I am really only enthusiastic about the int

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-04 Thread Pierre Gaston
On Thu, Apr 4, 2013 at 11:58 AM, Mara Kim wrote: > Hi Chris! > > Actually, this is great! Style critique, plus runtime analysis. Am I > dreaming? :D > > I see your point regarding the use of variables to hold commands. Using > PATH is a much better method of handling that functionality. And w

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-04 Thread Mara Kim
Hi Chris! Actually, this is great! Style critique, plus runtime analysis. Am I dreaming? :D I see your point regarding the use of variables to hold commands. Using PATH is a much better method of handling that functionality. And with the magic of vim and git *POOF* it's gone... What is do

Re: to - Bookmark file system locations in bash on POSIX-like systems

2013-04-04 Thread Chris Down
Hi Mara, On 2013-04-03 17:08, Mara Kim wrote: > I thought you guys might enjoy this simple tool I wrote. It's under GPL so > use it, hack it, fork it, ignore it, etc. I'm sorry that the first reply has to be criticism, but since you posted it on a mailing list, I guess you're looking for feedbac