Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: jedcooper on September 24, 2012, 08:41:51 AM
-
i want to set custom aliases mainly used in shell to make things easier.
sample script S:Aliases
alias cd.. "cd /"
alias ls "ls -l"
etc.
problem now is it doesn't set the aliases, neither running the script from user-startup/startup-sequence, nor out of SYS:WBStartup (OS3.1).
what now?
-
edit s:shell-startup :)
-
edit s:shell-startup :)
yeah solved this way.
BUT: i only have the aliases and path settings in current shell (ok, every new shell with s:shell-startup). but how can i make aliases and path information make _globally_ available? so it's available without starting a shell. and w/o using startup-sequence?
the startup-sequence sets some paths. is the loadwb (workbench) and any other started shell etc. depending on that, so the wb is a shell command/status/process? but the last command is endcli >NIL:
weird... :-/
-
I'm not 100% sure what you are trying to do but I think what you want can be achieved if you use some kind of Assign app. I think MCP allows for this.
I'm also not sure why you don't put some assign commands in the user startup. Cli has to open up before workbench starts After workbench has loaded cli is not needed hence the endcli at the end. Without this you would have the shell window on top of your workbench screen
-
alias ls "ls -l"
That may cause recursion - depending of the shell. Usually 'ls -l' is aliased to 'll'. ;)
Paths, environment etc. are inherited from the parent process - so for a shell launched from Workbench it's initially the same as Workbench's. Workbench is started from startup-sequence (or rather the boot shell running startup-sequence), so it inherits its environment from the boot shell.
Aliases are not inherited, so you need to add them to shell-startup.
Assigns are system-global, no matter by whom and when they are made.
-
yeah solved this way.
BUT: i only have the aliases and path settings in current shell (ok, every new shell with s:shell-startup). but how can i make aliases and path information make _globally_ available?
In AmigaOS aliases are part of the shell; so having aliases without a shell is not possible. You could add some scripts in C: or S: with the executable flag set.
greets,
Staf.