Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DAMN
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Finnish
View previous topic :: View next topic  
Author Message
ToTTi
n00b
n00b


Joined: 10 Dec 2004
Posts: 14

PostPosted: Sat Jan 01, 2005 4:58 pm    Post subject: DAMN Reply with quote

Nyt en jostain syystä saa millä dir_colorssia toimimaan. Kopioin /etc/DIR_COLORS filun ~/.dir_colors


Mutta ei.. voiskos joku jeesata.. :D
Back to top
View user's profile Send private message
jmz2
Guru
Guru


Joined: 13 Jan 2004
Posts: 421
Location: Finland

PostPosted: Sun Jan 02, 2005 5:17 pm    Post subject: Reply with quote

Laita .bashrc:hen seuraava koodinpätkä:
Code:
if [ "$PS1"] ; then
     eval `dircolors $HOME/.dir_colors`
fi
Back to top
View user's profile Send private message
ToTTi
n00b
n00b


Joined: 10 Dec 2004
Posts: 14

PostPosted: Wed Jan 05, 2005 12:55 pm    Post subject: Ei muuten Reply with quote

Joo

Testasin, mutta ei pelittänyt....

kotihakemistosta kyllä löytyy .dir_colors ja .bashrc jossa ehdottamasi koodi...
Back to top
View user's profile Send private message
ToTTi
n00b
n00b


Joined: 10 Dec 2004
Posts: 14

PostPosted: Wed Jan 05, 2005 1:37 pm    Post subject: Hmm.. Reply with quote

Heittelin tuon koodin /etc/profile filuun
heitti vain errorin

<clip>

-bash: [: missing `]'

</clip>
Back to top
View user's profile Send private message
jmz2
Guru
Guru


Joined: 13 Jan 2004
Posts: 421
Location: Finland

PostPosted: Wed Jan 05, 2005 1:50 pm    Post subject: Re: Hmm.. Reply with quote

ToTTi wrote:
Heittelin tuon koodin /etc/profile filuun
heitti vain errorin

<clip>

-bash: [: missing `]'

</clip>


Laita välilyönti lainausmerkin ja ]:n väliin. Koodia ei tarvitse laittaa /etc/profileen, voi toki, mutta en silti suosittele. Aja sitten
Code:
source ~/.bashrc
Jos tämä tuo oikeat värit, niin ~/.bash_profile -tiedostostasi puuttuu rivi:
Code:
if [ -f ~/.bashrc ]; then
        source ~/.bashrc
fi
Back to top
View user's profile Send private message
ToTTi
n00b
n00b


Joined: 10 Dec 2004
Posts: 14

PostPosted: Wed Jan 05, 2005 2:19 pm    Post subject: No errori hävis Reply with quote

Joo se error hävis..

edes tuon source ~/.bashrc jälkeen ei värit näkyny :(

outoo...
Back to top
View user's profile Send private message
jmz2
Guru
Guru


Joined: 13 Jan 2004
Posts: 421
Location: Finland

PostPosted: Wed Jan 05, 2005 6:04 pm    Post subject: Re: No errori hävis Reply with quote

ToTTi wrote:
Joo se error hävis..

edes tuon source ~/.bashrc jälkeen ei värit näkyny :(

outoo...


Ajathan ls:ää --color -parametrilla? Ja onhan terminaalisi xterm tai linux?

Jos ls:lle ei ole aliasta, voit laittaa .bashrc:hen mainitsemani if:n sisään
Code:
alias ls='ls --color -F'
Tämän jälkeen ls:n tulostus on värikästä ja hakemistojen perään laitetaan kauttaviiva.
Back to top
View user's profile Send private message
ToTTi
n00b
n00b


Joined: 10 Dec 2004
Posts: 14

PostPosted: Wed Jan 05, 2005 6:50 pm    Post subject: Itse asiassa on Reply with quote

tuossa muuten mun .bashrc



if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

if [ "$PS1" ] ; then
eval `dircolors $HOME/.dir_colors`
fi
eval `dircolors -b /etc/DIR_COLORS`
alias d="ls --color"
alias ls="ls --color -F"
alias ls -al = "ls -al --color=auto"
alias ll="ls --color -l"
Back to top
View user's profile Send private message
ToTTi
n00b
n00b


Joined: 10 Dec 2004
Posts: 14

PostPosted: Wed Jan 05, 2005 6:50 pm    Post subject: niin tuossahan on Reply with quote

toi yks rivi liikaa, mutta sillä ei ole vaikutusta asiaan.. :D
Back to top
View user's profile Send private message
ToTTi
n00b
n00b


Joined: 10 Dec 2004
Posts: 14

PostPosted: Fri Jan 07, 2005 9:36 am    Post subject: ei Reply with quote

Juu ei se vaan toimi jostain syystä...
Back to top
View user's profile Send private message
juhoms
n00b
n00b


Joined: 08 Feb 2005
Posts: 4

PostPosted: Fri Feb 11, 2005 7:13 pm    Post subject: Reply with quote

Mikäli tuo todellakin on sinun .bashrc ei siinä pitäisi olla rivejä:
Code:


if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi



Sillä source komento liittää siille annetun tiedoston suoritettavaan scriptiin, eli tuon pitäisi ollan ikuinen silmukka. Onneksi bash kaatuu, kun suoritettava scripti sourceaa itsensä. Valitettavasti tämä tapahtuu ilman minkäänlaista virheilmoitusta, mutta komennot rivin source ~/.bashrc jälkeen jäävät suorittamatta.

Korjaus ehdotukseni on siis poistaa nuo rivit kokonaan.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Finnish All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum