LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 03-18-2012, 12:07 PM   #1
haziz
Member
 
Registered: Jan 2012
Location: /dev/null
Distribution: Slackware, Fedora, Debian, Centos, Ubuntu
Posts: 60

Rep: Reputation: 1
Garbled Prompt with oh_my_zsh?


I am getting a garbled prompt when using oh_my_zsh; same with bash_it (prompt is garbled in a different way). I suspect that these shell scripts expect too much bling which the default terminal font is unable to deliver. I am using it mainly from the CLI and am generally happy with the terminal font when used for my main purpose, CLI programming in C (emacs is my editor if it matters), so I am not sure I really want to change it. Interestingly terminal within xfce seems to continue displaying a plain bash (or zsh) prompt with monochrome ls output (root gets color!??)

Have used oh_my_zsh on other systems and have generally been happy with it, though I hate it's auto-correction feature and generally turn it off.

My usual shell is zsh and really want just three things from my prompt:

1. Current path.

2. Git status and branch.

3. Color output from ls.

The rest is just bling and often irritating.

By using these shell scripts I am paying too much in cpu cycles for what I want.

Any suggestions, either with using these scripts or as a separate shell script. I am OK with either zsh or bash.

Thanks.
 
Old 04-18-2012, 06:12 PM   #2
geek745
Member
 
Registered: Jul 2004
Location: Boston, MA
Distribution: Slackware; Ubuntu; Slax
Posts: 172
Blog Entries: 2

Rep: Reputation: 33
Unless you're really clever with the environment variables that supply the prompt components (like PS1 and PS2 etc in BASH), you won't be able to get the git status and branch shown in there.

I'd recommend sticking with oh-my-zsh for that reason, and within it, you should be able to achieve your #1 and #3 as well.

#1. According to https://github.com/robbyrussell/oh-my-zsh, it's configured just like ZSH, using a ~/.zshrc and a .zsh file within the oh-my-zsh config and you should be able to manipulate the prompt strings to show the current path, truncated or otherwise.

#2. use the extensions configuration from oh-my-zsh

#3. this is typically done using shell aliases - look up the ZSH way at http://zsh.sourceforge.net/ you would link the shell command 'ls' to the same thing with the options you want, like single column, append characters indicating links or directories, etc.
 
  


Reply

Tags
bash, shell, zsh


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
Sound Is Garbled carlosinfl Debian 1 06-07-2011 06:52 AM
terminal prompt different from console prompt dh2k Slackware 5 03-29-2010 04:38 PM
passing parameters from a unix shell prompt into a windows cmd.exe prompt nano2 Programming 1 09-01-2009 11:26 AM
XGL is garbled lhuser Suse/Novell 4 02-21-2007 12:00 AM
Garbled Thanotos Slackware 8 12-11-2005 07:22 PM


All times are GMT -5. The time now is 01:37 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration