Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My screen starup commands look like:

screen alias1
screen alias2

alias1 is an alias pointing to command1 alias2 is an alias pointing to command2. alias1 and command1 share the same name. alias2 and command2 have different names. command1 unlike command2 is also in the path

When I launch screen/byobu it launches a window with command1 but it gives the message

Cannot exec 'alias2': No such file or directory

It seems that for alias1 and command1 screen/byobu calls alias1 as if it was a command and since command1 is in the path it runs successfully. If that is true it explains why alias2 gives the error message, since alias2 is not a real command nor is there any other command with the same name in the path (and neither is command2 in the path).

If this is the case then how can I get screen/byobu to call the aliases as aliases rather than as commands?

Thank you.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

screen itself is a command that takes arguments.

screen [ -options ] [ cmd [ args ] ]

cmd there cannot accept shell built-in functions or evaluate aliases, sorry.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.