LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


View Poll Results: Which shell do you use for interactive use?
sh 4 4.17%
bash 80 83.33%
ksh 4 4.17%
pdksh 0 0%
mksh 1 1.04%
csh 1 1.04%
tcsh 4 4.17%
fish 3 3.13%
zsh 8 8.33%
Multiple Choice Poll. Voters: 96. You may not vote on this poll

Reply
  Search this Thread
Old 06-23-2016, 06:47 PM   #16
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761

Quote:
Originally Posted by notKlaatu View Post
Cool, gezley! thanks. I might try some of those options.

I do think you have a typo in your .tshrc though:

Code:
# set editor
setenv EDITOR vi
"vi" is not how you spell emacs ;^)
haha! I wasn't getting anywhere with evil in emacs so I'm back to square one: learn vim thoroughly this time, and then, and only then, dump vim and use emacs with evil. Evil, I know, but vim really does have superior keys, and emacs has org-mode. Therefore, it has to be vim until I can use the evil emacs!

;-)
 
Old 06-24-2016, 04:11 AM   #17
nivieru
Member
 
Registered: Feb 2008
Posts: 78

Rep: Reputation: 14
zsh, with oh-my-zsh for configuration
 
Old 06-24-2016, 05:06 AM   #18
NonNonBa
Member
 
Registered: Aug 2010
Distribution: Slackware
Posts: 192

Rep: Reputation: Disabled
I personally did bash -> busybox's ash -> bash -> mksh -> dash -> bash -> mksh.

Strictly shell-scripting-wise I could live with dash actually, but the lack of completion is just a pity and the busybox's ash, which has one, is not very handy for packaging (kernel-like interactive configuration). So, mksh, while being "fat" for my usage, remains lighter and faster than bash and, more than all, doesn't mess with long command lines when there are ANSI color sequences in the prompt (a recurrent problem making me mad with bash). Once you learn to remove the leading spaces on the command line (they prevent this one to be added to the history, feature for which I never found any useful case and which I really wish it could be disabled, at least at compile-time), it's a simple and nice shell to use. That's why all my local shell stuff is nowadays "#!/bin/mksh".
 
1 members found this post helpful.
Old 06-24-2016, 05:07 AM   #19
bassplayer69
Member
 
Registered: Jul 2007
Location: In a van down by the river...
Distribution: MX Linux 21
Posts: 237

Rep: Reputation: 56
I use KSH only because it's what I'm used to from back in my Unixware days in the early 90's.
 
1 members found this post helpful.
Old 06-24-2016, 11:17 AM   #20
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by NonNonBa View Post
I personally did bash -> busybox's ash -> bash -> mksh -> dash -> bash -> mksh.

Strictly shell-scripting-wise I could live with dash actually, but the lack of completion is just a pity and the busybox's ash, which has one, is not very handy for packaging (kernel-like interactive configuration). So, mksh, while being "fat" for my usage, remains lighter and faster than bash and, more than all, doesn't mess with long command lines when there are ANSI color sequences in the prompt (a recurrent problem making me mad with bash). Once you learn to remove the leading spaces on the command line (they prevent this one to be added to the history, feature for which I never found any useful case and which I really wish it could be disabled, at least at compile-time), it's a simple and nice shell to use. That's why all my local shell stuff is nowadays "#!/bin/mksh".
I really like mksh, and Thorsten went far beyond the call of duty some time ago to help me with a query I had. I appreciated that and will continue to use and recommend mksh.
 
Old 06-24-2016, 01:42 PM   #21
ttk
Senior Member
 
Registered: May 2012
Location: Sebastopol, CA
Distribution: Slackware64
Posts: 1,038
Blog Entries: 27

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Fifteen years ago, tcsh was my primary shell, but these days I only use it on my laptop (mostly because of inertia) and bash on all of my other machines.

The only tcsh features I really miss under bash are the "time" output format and the "repeat" builtin.

I implemented a "rpt" script which does everything tcsh's "repeat" does (and more), so that's taken care of:
http://ciar.org/ttk/codecloset/repeat/

The output of tcsh's "time" can be approximated under bash with appropriate $TIMEFORMAT, but it's a pain setting that up on all of my machines, and I'm not supposed to on the servers at work anyway, so I just don't bother and sigh occasionally in remembrance of tcsh's output. It's not a big deal.
 
1 members found this post helpful.
Old 06-24-2016, 09:36 PM   #22
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by gezley View Post
I wouldn't mind bash so much if I used Linux exclusively. It just doesn't sit right with my BSD temperament to install it on NetBSD. tcsh and mksh feel native on both Slack and NetBSD.
OSX uses it, too.

Not that I'm a big fan of OSX; I just have to use it at work.
 
Old 06-24-2016, 09:52 PM   #23
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
A colleague of mine had come up with the idea that if having a directory of executable/readable scripts are good for the OS, then they are good for you too.

The beginning of .bashrc
Code:
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# setup environment for any login
export TEMP=/tmp/${USER}
export TMP=${TEMP}
mkdir -p ${TEMP}

# setup environment for interactive logins
if [ "$PS1" ] ; then
  # source environment settings
  if [ -d ~/etc/env.d ] ; then
    for f in $(find ~/etc/env.d -type f); do
      . $f
    done
  fi
fi
The beginning of ~/.bash_profile
Code:
# ~/.bash_profile: executed by bash(1) for login shells.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/login.defs
#umask 022

# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi

# add the user's bin to the PATH
if [ -d ~/bin ] ; then
  PATH=~/bin:"${PATH}"
fi

# add other path elements
if [ -d ~/etc/path.d ] ; then
  for f in $(find ~/etc/path.d -type f); do
    . $f
  done
fi
This kinda-sorta matches what you can do with /etc/profile.d with the difference that you can split path and environment manipulation and (of course) it's only for your login.

In my case, the contents of ~/etc/env.d are
Code:
0 ✓ cranium@cranium ~/etc $ ls -lart env.d/
total 56
-rw-r--r-- 1 cranium users  125 Jul 22  2009 cc.aliases
-rw-r--r-- 1 cranium users    7 Jul 22  2009 biff
-rw-r--r-- 1 cranium users   37 Jul 22  2009 history
-rw-r--r-- 1 cranium users   10 Jul 22  2009 umask
-rw-r--r-- 1 cranium users   67 Jul 22  2009 guile
-rw-r--r-- 1 cranium users   22 Jul 22  2009 bash
-rw-r--r-- 1 cranium users   42 Jul 23  2009 gnome
-rw-rw-r-- 1 cranium users   77 Mar  1  2011 tj3
-rw-r--r-- 1 cranium users   78 Jul 29  2011 maketool
-rw-rw-r-- 1 cranium users  147 Jul 10  2013 qemu
-rw-rw-r-- 1 cranium users   69 Nov 27  2013 perlcrap
drwxr-xr-x 5 cranium users 4096 Nov 27  2013 ../
-rw-rw-r-- 1 cranium users   36 Apr 25 19:58 jenv
drwxrwxr-x 2 cranium users 4096 Apr 27 18:58 ./
The contents of ~/etc/path.d are
Code:
0 ✓ cranium@cranium ~/etc $ ls -lart path.d/
total 24
-rw-rw-r-- 1 cranium users   36 Sep 17  2009 ant
-rw-rw-r-- 1 cranium users   72 Mar  1  2011 tj3
-rw-rw-r-- 1 cranium users   42 Sep  2  2011 gradle
drwxr-xr-x 5 cranium users 4096 Nov 27  2013 ../
-rw-rw-r-- 1 cranium users   40 Apr 27 18:59 jenv
drwxrwxr-x 2 cranium users 4096 Apr 27 18:59 ./
If it seems like overkill to you, both my colleague and I are software engineers. It wasn't overkill to us.
 
2 members found this post helpful.
Old 06-24-2016, 10:15 PM   #24
NoStressHQ
Member
 
Registered: Apr 2010
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by Richard Cranium View Post
A colleague of mine had come up with the idea that if having a directory of executable/readable scripts are good for the OS, then they are good for you too.
[...]
If it seems like overkill to you, both my colleague and I are software engineers. It wasn't overkill to us.
I don't have the exact same setup (I had something similar at once, but I decided to reduce startup complexity for portability concerns), but I agree about having a home's own set of /bin /etc... It's important to install things locally for the user... I'm a software developer too so this might explains that .

Edit: one thing about the dir script containers is that you might need to prepend scripts with some number to control execution order (sometimes it matters).

Last edited by NoStressHQ; 06-24-2016 at 10:17 PM.
 
Old 06-24-2016, 10:35 PM   #25
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by NoStressHQ View Post
I don't have the exact same setup (I had something similar at once, but I decided to reduce startup complexity for portability concerns), but I agree about having a home's own set of /bin /etc... It's important to install things locally for the user... I'm a software developer too so this might explains that .

Edit: one thing about the dir script containers is that you might need to prepend scripts with some number to control execution order (sometimes it matters).
Yep, valid point. You'd have to sort the listing in that case. (It hasn't bitten my behind yet, so I haven't implemented it. *That* isn't the software engineer side of me. If it were work related, I'd sort the listing.)
 
Old 06-25-2016, 11:11 AM   #26
navigium
Member
 
Registered: Aug 2014
Location: Switzerland
Distribution: Slackware, FreeBSD
Posts: 119

Rep: Reputation: 58
Quote:
Originally Posted by nivieru View Post
zsh, with oh-my-zsh for configuration
Same here. I'm a lazy person, that's why I really like all the stuff zsh does, even though it sometimes seems to be a bit overkill for a shell. As long as it doesn't use the same amount of memory as KDE, I'm ok with that.
 
1 members found this post helpful.
Old 06-26-2016, 01:40 AM   #27
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
Quote:
Originally Posted by notKlaatu View Post
I do think you have a typo in your .tshrc though:

Code:
# set editor
setenv EDITOR vi
"vi" is not how you spell emacs ;^)
A common error
 
Old 08-02-2016, 12:24 PM   #28
chucktr
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Rep: Reputation: 8
Cool Bash

Bash because it is what is normally installed on openSuSE by default. I couldn't see any advantages in changing.
 
Old 08-02-2016, 04:45 PM   #29
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
Bash + Vi + Krunner == Bliss
 
  


Reply



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
[SOLVED] Interactive login shells and the Slackware quote. stf92 Slackware 6 06-19-2014 12:38 PM
[SOLVED] Of interactive and non-interactive shells. stf92 Linux - Newbie 1 10-05-2011 12:37 PM
How are variables set for interactive shells? Josh000 Slackware 22 05-07-2010 12:19 AM
[SOLVED] Login and Interactive shells Josh000 Slackware 7 04-23-2010 09:02 AM
Interactive and non-interactive shells? Tim356 Linux - Newbie 7 11-05-2008 10:32 PM

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

All times are GMT -5. The time now is 08:24 AM.

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