0

I am having a problem with the following:

Alias:

alias gks='gitk --all &; clear; git status' 

 

When I try it I see -

Console Resp:

$ gks
bash: syntax error near unexpected token `;'

It appears to be the job control ('&') for the gitk command, is it possible to integrate this job control into an alias?

4
  • 3
    & on its own terminates the first command. See related Use & (ampersand) in single line bash loop – steeldriver Mar 10 '20 at 17:19
  • thank you steeldriver!! such simplicity, just drop the semicolon after the & – J-Dizzle Mar 10 '20 at 17:40
  • thank you, works now 😊 – J-Dizzle Mar 10 '20 at 17:41
  • Yep! This is what steeldriver shares above, working now – J-Dizzle Mar 10 '20 at 18:02

Browse other questions tagged or ask your own question.