Go Back   Linux Forums by TotalPenguin! Get linux Help! > Linux > Linux General

Linux General Any questions that are not covered by other forums go here.

View Poll Results: What shell do you use the most?
sh 0 0%
csh or tcsh 0 0%
bash 2 66.67%
ash or dash 0 0%
ksh 0 0%
zsh 1 33.33%
other (possibly rc or an interpreted programming language?) 0 0%
Voters: 3. You may not vote on this poll

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-28-2008, 05:21 AM
Junior Member
 
Join Date: Jul 2008
Posts: 5
Aereshaa is on a distinguished road
Default What shell do you use?

The title says it all. On your computer what shell do you use for interactive use, scripting, etc?
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 07-28-2008, 05:48 AM
Super Moderator
 
Join Date: Dec 2007
Location: Denmark
Posts: 273
v0id is on a distinguished road
Send a message via MSN to v0id
Default

Nice idea of a poll.

I voted bash.
Reply With Quote
  #3 (permalink)  
Old 07-28-2008, 06:28 AM
Junior Member
 
Join Date: Jul 2008
Posts: 5
Aereshaa is on a distinguished road
Default

Can you beat my l33t prompt?

Made with the power of zsh!
Code:
PR_TIMER="0"
PR_PWD="/etc"

function precmd { #executes each prompt
 local TERMWIDTH
 ((TERMWIDTH = ${COLUMNS} - 1))
 local PRWIDTH
 ((PRWIDTH = `whoami | wc -m` + `tty | wc -m` + `pwd | wc -m` + `date | wc -m` + 16))
 local DSHES
 ((DSHES = TERMWIDTH - PRWIDTH))
 local L_PWD
 L_PWD=$(/home/oren/bin/strhash `pwd`);
 if ((`/home/oren/bin/utm` > PR_TIMER + 30 || L_PWD != PR_PWD)) then
  echo -e "/==(\e[37m$(whoami)\e[0m)on(\e[37m$(tty)\e[0m)in(\e[35m$(pwd)\e[0m)>$(/home/oren/bin/repstr "$DSHES" "-")<(\e[31m$(date)\e[0m)==\\"
  PR_TIMER=`/home/oren/bin/utm`
  PR_PWD=$(/home/oren/bin/strhash `pwd`);
 fi
}
PS1="|==%% "
RPS1="<<(%*)==|"
PS2="|--> "
PS3="|--- "
PS4="|--- "

Last edited by Aereshaa; 07-28-2008 at 06:31 AM.
Reply With Quote
  #4 (permalink)  
Old 07-28-2008, 08:21 AM
Super Moderator
 
Join Date: Dec 2007
Location: Denmark
Posts: 273
v0id is on a distinguished road
Send a message via MSN to v0id
Default

I sure can. My .bashrc:
Code:
PS1="$ "
It all depends on who you are. I prefer it simple, and that's why I don't have all the fancy stuff in my config.
Reply With Quote
  #5 (permalink)  
Old 07-28-2008, 01:12 PM
Jordan's Avatar
Administrator
 
Join Date: Nov 2006
Posts: 570
Jordan is on a distinguished road
Default

I use bash I also like small prompts so that the line doesn't loop when I'm in deep sub-directories. I use about the same as v0id. How come you use zsh? I suppose I use bash because that is what I started with and that is default now.
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 07-28-2008, 02:04 PM
Super Moderator
 
Join Date: Dec 2007
Location: Denmark
Posts: 273
v0id is on a distinguished road
Send a message via MSN to v0id
Default

That's the same reason why I use bash. According to Wikipedia is zsh a collection of the most useful features of bash, ksh and tcsh, so might be worthy a try?

A bit off-topic: Does anyone know how to configure/customize the real terminal, and not just a terminal emulator (like bash, zsh, etc.)? I've got a new box which I installed Debian on. To keep it fast and clean I've chosen not to use a the X window system. I can however not really change the look of the terminal, so when I get into deep directories the line always break, because of the lenghty prompt. It sucks. Any tips?
Reply With Quote
  #7 (permalink)  
Old 07-28-2008, 02:17 PM
Jordan's Avatar
Administrator
 
Join Date: Nov 2006
Posts: 570
Jordan is on a distinguished road
Default

I may give it a try then, it does sound interesting. I have no idea about your question though.
Reply With Quote
  #8 (permalink)  
Old 07-28-2008, 06:29 PM
Junior Member
 
Join Date: Jul 2008
Posts: 5
Aereshaa is on a distinguished road
Default

Quote:
Originally Posted by Jordan View Post
I use bash I also like small prompts so that the line doesn't loop when I'm in deep sub-directories. I use about the same as v0id. How come you use zsh? I suppose I use bash because that is what I started with and that is default now.
Ah, but mine adjusts the number of dashes so that it never loops, and I'm working on a way to trunctate the path when it finally is too long.
I use zsh because my first computer had all of them installed, even rc (from plan 9). So I tested each of them, and found that I liked zsh's syntax best.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl or Shell? Hektor Linux Programming and Scripting 14 07-28-2008 12:53 PM
Using colors in Shell Script ptt3 Linux Programming and Scripting 1 04-03-2008 12:50 PM
"edit" in Shell Lop Linux General 3 10-10-2007 02:35 AM


All times are GMT. The time now is 01:46 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.