assign remove a path

AmigaOS users can make feature requests in this forum.
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

assign remove a path

Post by JosDuchIt »

Once you have added a path to c: it does not seem possible to remove it (without rebooting)
For testing during development it would be nice to be able to remove an added path. When testing new version of an application you develop a path to its executables is handy. it would be nice to be able to remove the path to the stable version and add the path to the development version (and vice versa)
Of course you could use different names for the executables, but may lead to errors when uploading the archive.

Your opinion?
User avatar
LyleHaze
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 525
Joined: Sat Jun 18, 2011 4:06 pm
Location: North Florida, near the Big Bend

Re: assign remove a path

Post by LyleHaze »

"path show"
shows the current path.

"path add device:dir"
adds "device:dir" to the current path list.

"path remove device:dir"
removes device:dir from the path list.

path reset dev0:dir dev1:dir dev2:dir
replaces the original path with the new one.

Seems failrly complete to me.

Comments?
User avatar
thomasrapp
Posts: 310
Joined: Sat Jun 18, 2011 11:22 pm

Re: assign remove a path

Post by thomasrapp »

The path is local to the CLI and the Path command can only change the path of the CLI it runs in. A new CLI inherits its path from the process it was started from. So most new CLI processes inherit their path from the Workbench process. The problem is that you cannot change the path of the Workbench process or any other process except your own. If you want to change the "global" path you have to change s:user-startup and reboot.
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

Re: assign remove a path

Post by JosDuchIt »

@tylehaze & thomas.thanks for comments

Couldn't path modifications be implemented that don't need a reboot, say when done from the WB menu "execute a command" ?
chris
Posts: 562
Joined: Sat Jun 18, 2011 11:05 am
Contact:

Re: assign remove a path

Post by chris »

JosDuchIt wrote:@tylehaze & thomas.thanks for comments

Couldn't path modifications be implemented that don't need a reboot, say when done from the WB menu "execute a command" ?
You can do "LoadWB NEWPATH" to update WB with the new path.
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: assign remove a path

Post by nbache »

JosDuchIt wrote:Once you have added a path to c: it does not seem possible to remove it (without rebooting)
While the rest of your post (and the thread) deals with using the Path command to manipulate the search path, your thread title and the sentence quoted here seems to deal with the "other way", i.e. "Assign C: Myprogram/binaries ADD".

Contrary to the path, assigns are global, including multi-assigns made with ADD.

And there is also a way to remove ADDed paths from the assignment. From the doc for Assign (the last two examples at the bottom):
1> ASSIGN LIBS: ZCad:Libs ADD

adds ZCad:Libs to the list of directories assigned as LIBS:.

1> ASSIGN LIBS: ZCad:Libs REMOVE

removes ZCad:Libs from the list of directories assign as LIBS:.
Best regards,

Niels
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

Re: assign remove a path

Post by JosDuchIt »

@nbache about the title of this thread.

I was unaware or forgor about the path command and was trying to use the assign PATH option maybe wrongly.

I had the following problem
When using Gui4Cli from my normal install i have an assign guis: to Gui4Cli's drawer which contains the Gui4Cli executableand a path to guis/c which containts tha Gui4Cli launcher "gui4" which will look into the guis; drawer to launch Gui4Cli This is the standard set up i herited from D. Kletsekis the author of Gui4Cli (Ammiga) till v 3.8.5

I was trying out a program written in Gui4Cli that i want to upload with Gui4 and Gui4Cli executables in the archive. The idea was to instruct the user (not having Gui4Cli installed) to just copy the archive in some drawer & clicking on its icon (with gui4 as tool) should run the program.

In that case i want to get rid of the path to guiis:c as well as of the assign to be sure the needed executables are taken from the drawer containing the Gui4Cli program
I hoped i could do that without a reboot.
I was mislead in thinking the assign PATH option had something to do with the CLI path (probably because i misinterpreted the docs lines
PATH
C:ASSIGN )







I
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

Re: assign remove a path

Post by JosDuchIt »

@chris

It seems you need to quit WB first ,
loadWB NEWPATH from a CLI has no effect
W>hen i try quitting Workbench from the WBWorkbench menu i am told that there are still 9 or 10 active tasks running.
SysMon shows me alot of processes and tasks (mostly waiting)
Is there a way to see which tasks are meant in the message?
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

Re: assign remove a path

Post by JosDuchIt »

@ chris
when unchecking in the WBstartup gui all items and reboot i get on trying to quit WB the message some " counter" is still set to 1
Kind of an advance but still.
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: assign remove a path

Post by nbache »

JosDuchIt wrote:In that case i want to get rid of the path to guiis:c as well as of the assign to be sure the needed executables are taken from the drawer containing the Gui4Cli program
I hoped i could do that without a reboot.
You can do that with "Path Guis:C REMOVE" followed by "Assign Guis: REMOVE", but of course, if you had set up the path in e.g. User-Startup and do the REMOVE in a later opened local Shell, then the path component will only have been removed for that particular Shell, which may not be what you are after.

Maybe you could let the icon the user launches call a script which - in one and the same Shell - does the two above commands (maybe with a suitable FailAt first and of course redirection to NIL: of any error messages) followed by the new Assign and Path needed for your local environment to work, and then the command itself, followed by cleanup at the end.

Best regards,

Niels
Post Reply