From bash to ksh…
I’ve finally made the move. For some time now I’ve been using bash in vi mode - however there is just one little niggle with it, every now and then the display messes up and you start seeing things like this:
le/why/has/this/moved/here?puter ~ $ mplayer /some/long/path/to/some/fi
That is really really really annoying when it happens.
Anyway, a colleague mentioned some time ago that this was the reason he moved back to Korn Shell… so I figured I’d give it a go. So far the only thing I’ve not managed to get working is coloured ls output…. Everything else is working, tab completion (even though I’m trying to use Esc + \ instead), coloured PS1 prompt etc etc … most importantly though, vi mode hasn’t, as of yet, messed up!
I’m starting to get a little concerned though - I’ve moved away from Gnome to Fluxbox at home and to fvwm2 at work… then on top of this I’ve now changed my shell from bash to ksh - what is happening!?!
Edit: I’ve now got coloured ls working… I was too involved reading the .bashrc files in Gentoo trying to work out how bash does it… instead I should have just typed man ls….
--color[=WHEN]
control whether color is used to distinguish file types. WHEN may be `never',
`always', or `auto'
Duh!
michaelfclarke@mikes-computer michaelfclarke $ alias ls ls='ls --color=always'
April 13th, 2008 at 1:28 pm
On the whole I’d say that ksh is a lost cause
I’m considering a move to zsh… it all comes down to how powerful zsh’s programmable tab completion is
As to why bash messes up… it’s because the terminal was resized while a process was running, i.e. bash didn’t get the signal to notify it that the rows/columns had changed. You can fix it by re-resizing the window
April 13th, 2008 at 5:06 pm
I think this is a normal transition when you really want to be productive. Next you’ll move from fvwm2 to ion3 !!
You’ll also not care too much about colour except perhaps in syntax highlighting in vim
This is good news, I wish more people would be less interested in GUIs and more in getting the job done!
April 13th, 2008 at 6:57 pm
Lewis -
I did look at zsh - but I didn’t like the stupid welcome thing it gave me the first time I typed ‘zsh’ and all this menu to set it up etc. Besides, I don’t see the difference really between zsh, bash, ksh etc as I put the thing straight into vi mode anyway and then use vi functionality for navigating around, completion (Esc + \ and Esc + =) etc etc…. In essence they’re all the same - just one displays correctly and the other simply doesn’t!
In regards to the ‘fix’ - it’s more of a work around. If ksh doesn’t suffer the problem why does bash? The developers of Korn Shell evidently found a way to get around it - why didn’t the developers of bash? Maybe I’ll write a patch if I can find the time, but at the moment my dtrace bug and MouthOS is taking most of my spare time
Jerry -
Indeed I quite agree. I’m finding it so much nicer not having all these detractions on my desktop when I’m working
Mike