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?

J-Dizzle
  • 101
  • 2
  • 3
    `&` on its own terminates the first command. See related [Use & (ampersand) in single line bash loop](https://unix.stackexchange.com/questions/91684/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
  • Yep! This is what steeldriver shares above, working now – J-Dizzle Mar 10 '20 at 18:02

0 Answers0