Re: Fwd: Re: interactive shell detection in shrc

2024-10-01 Thread RVP
On Tue, 1 Oct 2024, RVP wrote: Ugly, but, works--after a fashion: - Only for DIRs in the CWD. - no `/' allowed in DIR. - if CMD with the same name as DIR is found in $PATH, that will be executed. (I tried defining a command_not_found_handle function but that doesn't seem to work if the comm

Re: Fwd: Re: interactive shell detection in shrc

2024-10-01 Thread RVP
On Tue, 1 Oct 2024, Rhialto wrote: In bash, I use an alias '..' for 'cd ..', and '...' for 'cd ../..', and a few levels more. It is a very poor approximation of the AmigaShell feature where typing a directory name as a command does a 'cd' to that directory. I wish (ba)sh had such a feature...

Re: [PATCH] Allow qualified filename (bar/foo) PATH searching.

2024-10-01 Thread Mouse
>> This distinction you are drawing between locators and identifiers >> is, as far as I can tell, entirely your own invention when it comes >> to ocating executables (or indeed any other file(name) operation). > Well, not really. There are already the difference between URI and > URL. That's why

Re: [PATCH] Allow qualified filename (bar/foo) PATH searching.

2024-10-01 Thread tlaronde
On Tue, Oct 01, 2024 at 01:34:04PM -0400, Mouse wrote: > >> Well, I think my point was that _every_ pathname component is > >> path-relative. The "foo"s in /usr/bin/foo, /tmp/foo, > >> /home/mouse/foo, and xyz/foo bear no relation to one another except > >> similarity of spelling [...]. . and ..

Re: [PATCH] Allow qualified filename (bar/foo) PATH searching.

2024-10-01 Thread Mouse
>> Well, I think my point was that _every_ pathname component is >> path-relative. The "foo"s in /usr/bin/foo, /tmp/foo, >> /home/mouse/foo, and xyz/foo bear no relation to one another except >> similarity of spelling [...]. . and .. are no different in that >> regard. > Since it is the key, I w

Re: [PATCH] Allow qualified filename (bar/foo) PATH searching.

2024-10-01 Thread tlaronde
On Tue, Oct 01, 2024 at 11:54:02AM -0400, Mouse wrote: > > >> [about the dot business] > [...] > > Well, I think my point was that _every_ pathname component is > path-relative. The "foo"s in /usr/bin/foo, /tmp/foo, /home/mouse/foo, > and xyz/foo bear no relation to one another except similarity

Re: Fwd: Re: interactive shell detection in shrc

2024-10-01 Thread Rhialto
In bash, I use an alias '..' for 'cd ..', and '...' for 'cd ../..', and a few levels more. It is a very poor approximation of the AmigaShell feature where typing a directory name as a command does a 'cd' to that directory. I wish (ba)sh had such a feature... (I tried defining a command_not_found_ha

Re: [PATCH] Allow qualified filename (bar/foo) PATH searching.

2024-10-01 Thread Rhialto
On Tue 01 Oct 2024 at 11:54:02 -0400, Mouse wrote: > > You can just change in the shell, but in this case, calling an > > utility dealing with utilities (nice, nohup, timeout, xargs...) you > > can't use the feature since then the command name is an argument, > > unless you add ad hoc knowledge in

Re: [PATCH] Allow qualified filename (bar/foo) PATH searching.

2024-10-01 Thread Mouse
tlaronde and I have been exchanging mail off-list on this thread and part of our discussion has wandered back into on-list territory. The last mail I got on the subject says > [I think that these exchanges about the semantics could be discussed > more widely on the list. If you agree, could you a

Re: [PATCH] Allow qualified filename (bar/foo) PATH searching.

2024-10-01 Thread Robert Elz
Date:Tue, 1 Oct 2024 08:51:12 +0200 From:tlaro...@kergis.com Message-ID: | For {get,set}progname and err*()/warn*(), it would need an option to | not truncate to last component. err() and warn() just use the results of setprogname() - which on NetBSD just happens