LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-10-2003, 08:19 AM   #16
Bebo
Member
 
Registered: Jul 2003
Location: Göteborg
Distribution: Arch Linux (current)
Posts: 553

Rep: Reputation: 31

It uses a whole bunch (see man tcsh), but the ones I use are /etc/csh.cshrc and ~/.cshrc. Actually, I want to keep the defaults apart from my own settings, so I just add the line source /etc/mycshrc at the end of /etc/csh.cshrc, and then I put all the stuff I want to be in common for all users (such as "set nobeep" ) in /etc/mycshrc.

melquiades: nice yellow
 
Old 11-10-2003, 08:21 AM   #17
fasta
Member
 
Registered: Aug 2003
Location: Livorno - Italy
Distribution: Debian
Posts: 84

Rep: Reputation: 15
Thumbs up great

Thx ALOT bebo !
hey try this tcsh shell prompt:

set prompt="[%n@%m:%{\033[34m%}%c%{\033[0m%}]%{\033[31m%}%T%{\033[0m%}%#"

Another question. I am sure i can set aliases in tcsh (like alias ll='ls -lh --color' in bash I use...), how?

More: i found this nice tutorial on csh customizing

Have fun


Last edited by fasta; 11-10-2003 at 08:26 AM.
 
Old 11-10-2003, 08:26 AM   #18
Bebo
Member
 
Registered: Jul 2003
Location: Göteborg
Distribution: Arch Linux (current)
Posts: 553

Rep: Reputation: 31
Wow, great! I see you've got the hang of the colours!
 
Old 11-10-2003, 08:26 AM   #19
fasta
Member
 
Registered: Aug 2003
Location: Livorno - Italy
Distribution: Debian
Posts: 84

Rep: Reputation: 15
LOL we're forum-chattin

Quote:
Wow, great! I see you've got the hang of the colours!
heheh I like to snoop around till i find what i want
 
Old 11-10-2003, 08:29 AM   #20
Bebo
Member
 
Registered: Jul 2003
Location: Göteborg
Distribution: Arch Linux (current)
Posts: 553

Rep: Reputation: 31
Hehe, yep

So, have you changed your shell to tcsh now?
 
Old 11-10-2003, 08:36 AM   #21
fasta
Member
 
Registered: Aug 2003
Location: Livorno - Italy
Distribution: Debian
Posts: 84

Rep: Reputation: 15
trying...
I still like the bash "auto complete" (TAB key) regarding directory listings...
Still, I have to find out how to set aliases... I'm way too used to my "ll" (double L) list alias...

Hey Bebo, any hint about this problem of mine ?

And how about this one ...

 
Old 11-10-2003, 08:44 AM   #22
fasta
Member
 
Registered: Aug 2003
Location: Livorno - Italy
Distribution: Debian
Posts: 84

Rep: Reputation: 15
FOUND it!
"set autolist" will make csh behave like bash (in auto-completion feature...)

Last edited by fasta; 11-10-2003 at 08:46 AM.
 
Old 11-10-2003, 08:51 AM   #23
Bebo
Member
 
Registered: Jul 2003
Location: Göteborg
Distribution: Arch Linux (current)
Posts: 553

Rep: Reputation: 31
I think that the auto complete is always on, so that shouldn't be any problem. I have also

set correct = cmd
set autolist

in my setup. set correct = cmd helps in correcting misspelled command. I find it helpful sometimes, but I guess one can find it a bit disturbing. Can't remember what set autolist does

The ll alias is pretty common I think, but if it's missing in tcsh, it's very easy to add it. The only difference from bash with tcsh when you define aliases is that you don't use an equality sign: alias ll "ls -l"

Gonna look into your other threads
 
Old 11-10-2003, 08:52 AM   #24
Bebo
Member
 
Registered: Jul 2003
Location: Göteborg
Distribution: Arch Linux (current)
Posts: 553

Rep: Reputation: 31
Really? Hm, I just tried without the autolist and it worked anyway. Well, whatever
 
Old 11-13-2003, 10:11 AM   #25
BSlack
Member
 
Registered: Nov 2003
Location: Italy: 44° 42' N - 12° 11' E
Distribution: Slackware, what else?!!
Posts: 63

Rep: Reputation: 15
try this and see what happens

* in csh/tcsh

alias cwdcmd 'echo -n "\033]2;${user}@${host}: ${cwd:s@your_home_path@~@}\007\033]1;${host}: ${cwd:s@your_home_path@~@}\007"'

where:
your_home_path is your home directory path (i.e. /home/albert)

* bash

PROMPT_COMMAND='echo -ne "\033]2;${USER}@${HOSTNAME}: ${PWD/#$HOME/~}\007\033]1;${HOSTNAME}: ${PWD/#$HOME/~}\007"'

Look with care....
 
Old 11-27-2003, 07:40 AM   #26
Bebo
Member
 
Registered: Jul 2003
Location: Göteborg
Distribution: Arch Linux (current)
Posts: 553

Rep: Reputation: 31
Hello again, guys!

Remember our trouble to update the time in the bash prompt? I was following a link in a post, and ended up here. Look in the section Temperature/Battery info in the Bash prompt a bit down. It seems that PROMPT_COMMAND should do the trick

Oops, this seems to be old news... Sorry BSlack, I haven't tried your prompt, but I see that you use exactly this

Cheers!
 
Old 11-27-2003, 08:23 AM   #27
melquiades
Member
 
Registered: Jul 2003
Location: Northern Scotland
Distribution: Slackware 9.1
Posts: 48

Original Poster
Rep: Reputation: 15
cheers bebo, I'm gonna have to have a look into that - on a related point either of you know why my root prompt when I 'su' has no colours? it's fine if I login root but if I su from my normal user account I don't get any colours, in the prompt or in listings etc? very wierd and I don't know what's causing it?!
 
Old 11-27-2003, 08:29 AM   #28
Bebo
Member
 
Registered: Jul 2003
Location: Göteborg
Distribution: Arch Linux (current)
Posts: 553

Rep: Reputation: 31
What happens if you use su - instead of su? The dash makes it a login shell.
 
Old 11-27-2003, 08:49 AM   #29
melquiades
Member
 
Registered: Jul 2003
Location: Northern Scotland
Distribution: Slackware 9.1
Posts: 48

Original Poster
Rep: Reputation: 15
Ah-ha! works perfectly with 'su -' it's all in glorious techni-colour! Thanks for that bebo, I think I'll alias 'su' to 'su -' and then that'll be another wee quirk sorted out just had a quick read through the su man pages and I see the small but rather important difference
 
Old 11-28-2003, 02:47 AM   #30
BSlack
Member
 
Registered: Nov 2003
Location: Italy: 44° 42' N - 12° 11' E
Distribution: Slackware, what else?!!
Posts: 63

Rep: Reputation: 15
A good starting point about bash prompt hacking is the Bash Prompt HOWTO:

http://www.gilesorr.com/bashprompt/howto/book1.html
http://www.linux.org/docs/ldp/howto/...WTO/index.html

but I think you already know it...

bye
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
change default bash directory in gnome-terminal ming0 Linux - Software 5 10-01-2009 06:54 PM
gnome-terminal fails to give bash prompt wfhoney Red Hat 8 04-21-2004 03:38 PM
How can I change the terminal prompt? ICO Slackware 4 02-15-2004 08:09 AM
no prompt in terminal xyfan Linux - Newbie 1 12-05-2003 11:25 PM
terminal with no prompt fletch88 Red Hat 0 11-17-2003 12:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration