Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: ferran on April 23, 2020, 02:20:11 PM

Title: Alias persistence
Post by: ferran on April 23, 2020, 02:20:11 PM
I created 2 alias to make more easier the editing and executing the python's programs:

ged = `gedit -w`
py = `python3.6`

First I looked that we don't have .bashrc but yes .ashrc

I edited .ashrc adding my alias in it. But when I opened the terminal automatically ran the gedit editor & python3.6 without I query it  :o

Where I can to store my alias without those issues?
Title: Re: Alias persistence
Post by: Rich on April 23, 2020, 03:50:20 PM
Hi ferran
Take a look in  ~/.profile.
Title: Re: Alias persistence
Post by: ferran on April 23, 2020, 04:54:57 PM
Rich:
I just added my alias into ~/.profile but it don't works:

Code: [Select]
tc@box:~$ ged
sh: ged: not found
tc@box:~$ py
sh: py: not found
tc@box:~$

Maybe i need restart the computer?
Title: Re: Alias persistence
Post by: Greg Erskine on April 23, 2020, 04:59:07 PM
Most aliases are setup in ~/.ashrc

Check your original format, it's wrong.
Title: Re: Alias persistence
Post by: Rich on April 23, 2020, 05:07:11 PM
Hi ferran
Ignore my last post, Greg Erskine is correct. Copy the syntax used in  ~/.ashrc.
Title: Re: Alias persistence
Post by: ferran on April 23, 2020, 05:30:28 PM
Thank you to both.

I got a syntax error typing with " ` " instead " ' ". With:

Code: [Select]
echo "alias ged='gedit -w'" >> ~/.ashrc
echo "alias py='python3.6'" >> ~/.ashrc

Now f.i. I can to do:
ged <name of script> to edit it.
py <name of script.py> to execute it.

Now it works fine ;D

Problem solved Rich !