Create an alias combining a command and prompt

Create an alias combining a command and prompt

cshermanRLQ8L
Observer Observer
450 Views
1 Reply
Message 1 of 2

Create an alias combining a command and prompt

cshermanRLQ8L
Observer
Observer

I would like to create a shortcut for a command that bundles in a specific option that appears after starting the command along with the command itself. For example, if I wanted to make an alias for UCS that automatically calls the [World] option after starting the command, is there a way to call both the command and the option in a single alias, or can I only create an alias for the master command?

0 Likes
Accepted solutions (1)
451 Views
1 Reply
Reply (1)
Message 2 of 2

paullimapa
Mentor
Mentor
Accepted solution

Alias can only support a single command.

But you can always create a lisp function and use that as alias.

For example assuming you currently don't have an alias called UW, then you can create a lisp function UW like this:

(defun c:UW ()(command"_.UCS""_World")(princ))

Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes