Thanks Brad. The second one solves my conundrum.
'cd ~/somedirectory && (ristretto * & geany progress &)'
Owain
On 26/02/2021 09:30, Brad Macpherson via Hampshire wrote:
> G'day Owain,
>
> I'm slightly surprised that works at all without a semicolon :-)
>
> On 26/02/2021 09:23, Owain Clarke via Hampshire wrote:
>> Hi. Could someone help me with the error of my ways? I'm sure this
>> one is dead simple but I can't see it.
>> I have this alias:-
>> alias my_alias='cd ~/somedirectory && ristretto * & geany
>> progress &'
>>
>> The ristretto bit works as expected, but I thought that the text file
>> that opened would be ~/somedirectory/progress, but instead it creates
>> ~/progress. What's wrong with my syntax?
>>
>> Thanks
>>
>> Owain
>>
>>
>
> My guess is that the && is tying together 'cd ~/somedirectory &&
> ristretto * &' which then is backgrounded; 'geany progress &' is
> invoked separately (from whichever directory you issued the alias) and
> backgrounded.
>
> Did you mean to do something like
>
> 'cd ~/somedirectory && ristretto * && geany progress &'
>
> or
>
> 'cd ~/somedirectory && (ristretto * & geany progress &)'
>
> instead?
>
> Cheers
>
> Brad
>
>
--
Please post to: Hampshire@???
Web Interface:
https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL:
http://www.hantslug.org.uk
--------------------------------------------------------------