Re: [Hampshire] bash error

2021-02-26 Thread Owain Clarke via Hampshire

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@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--

Re: [Hampshire] bash error

2021-02-26 Thread Keith Edmunds via Hampshire
The '&' before 'geany' will put the process into the background. Is that
what you want?
-- 
Linux Tips: https://www.tiger-computing.co.uk/category/techtips/

-- 
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--

Re: [Hampshire] bash error

2021-02-26 Thread Brad Macpherson via Hampshire

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



OpenPGP_signature
Description: OpenPGP digital signature
-- 
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--

[Hampshire] bash error

2021-02-26 Thread Owain Clarke via Hampshire
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


--
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--