You are not logged in.

#51 2008-03-08 20:23:29

SpookyET
Member
Registered: 2008-01-27
Posts: 410

Re: A new shell?

finferflu wrote:

Ok, that was veeeeeeeeery nice. I was fiddling with fish, and I liked it. So I went on and made it my default shell. The nice thing is that at the login shell it just hangs at the MOTD (with 100% CPU usage, of course). So I couldn't get into my machine anymore, since I have disabled the root account. I had to boot up Knoppix and edit /etc/passwd manually. That's just too bad. Now I have to type "fish" every time I want to use it sad

Read this thread carefully, dude. DO NOT MAKE IT A DEFAULT SHELL because it cannot read the system profile.

PUT 'exec fish' in your .bashrc.

If you get 100% CPU, it's because you have something wrong in config.fish. Start over.
Do not use 'alias', use 'function'. Alias is known to create 100% CPU.

Offline

#52 2008-03-09 06:37:44

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: A new shell?

Ok, sorry, I didn't read the whole thread, I skimmed through it...

Thanks a lot for your help! smile
I have a lot of aliases, but it only hangs at the login shell when it's my default shell. I'll see if it keeps hanging even if I put "exec fish" in my .bashrc, otherwise I'll go for the functions.


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#53 2008-03-09 14:13:33

SpookyET
Member
Registered: 2008-01-27
Posts: 410

Re: A new shell?

finferflu wrote:

Ok, sorry, I didn't read the whole thread, I skimmed through it...

Thanks a lot for your help! smile
I have a lot of aliases, but it only hangs at the login shell when it's my default shell. I'll see if it keeps hanging even if I put "exec fish" in my .bashrc, otherwise I'll go for the functions.

Just convert the aliases to functions. Just like 'The Arch Way,' fish has 'The Function Way'.

Offline

#54 2008-03-09 15:25:53

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: A new shell?

Yeah, I tried to do that, but I failed.
I had aliases which are followed by an argument, such as:

alias open="gnome-open"

Now, in a function I would need something like

function open
gnome-open $1
end

But in fish $1 means nothing, as far as I can see.
Any (further) help is greatly appreciated, thanks smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#55 2008-03-09 15:33:36

SpookyET
Member
Registered: 2008-01-27
Posts: 410

Re: A new shell?

Dude, you really have an attention problem. I even pasted by config file. It's $argv, not $1.
function open; gnome-open $argv; end

By the way, you do not need it. open is a builtin. It already does that for you. Fish is smart.  RTFM.

Offline

#56 2008-03-09 15:46:16

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: A new shell?

LOL I have indeed...
I know about the open function, I actually RTFM before asking here. I always google/read manuals before asking question at least. Even though I might have attention problems tongue

The point is that I don't know how to edit the mimedb (the manual doesn't seem so helpful on this), and at the moment my text files are all opened in Firefox, which is useless (if it was using my .mailcap, that file explicitly specifies that text files are to be opened in Vim). So I rather use gnome-open, which I can customise tongue


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#57 2008-03-09 15:57:22

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: A new shell?

SpookyET wrote:

attention problem

Hah! No such thing!

Last edited by schivmeister (2008-03-09 15:57:59)


I need real, proper pen and paper for this.

Offline

#58 2008-03-09 16:46:19

SpookyET
Member
Registered: 2008-01-27
Posts: 410

Re: A new shell?

It's not usable for scripting.

zsh   test.sh      1.29s user   0.32s system 95% cpu   1.671 total
bash test.sh      2.06s user   0.26s system 96% cpu   2.403 total
dash test.sh      0.42s user   0.29s system 96% cpu   0.743 total
fish   test.fish  18.33s user 35.60s system 91% cpu 58.819 total

for x in `seq 50000`; do
   echo "" > /dev/null
done
for x in (seq 50000);
   echo "" > /dev/null;
end;

Last edited by SpookyET (2008-03-09 16:49:03)

Offline

Board footer

Powered by FluxBB