Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-19-2016, 01:14 AM   #1
LQ Guru
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 10,047

Rep: Reputation: 4623Reputation: 4623Reputation: 4623Reputation: 4623Reputation: 4623Reputation: 4623Reputation: 4623Reputation: 4623Reputation: 4623Reputation: 4623Reputation: 4623
Do you use software to "cd"? For which shell?

Do any of you use software that assists with changing directories? If so, which shells do you use them with?

I'm talking about things like:

So far I've had good results with fasd and tcsh (after fixing its broken tcsh support and submitting a pull request), and with autojump and fish (again, after submitting a bugfix pull request). I've only started trying them, and I don't know how long I'll stick with them. The fact that I immediately found and and was able to fix bugs in both of them just means they target BASH first, ZSH second, and everything else third. I don't (yet) find it a dealbreaker.

What have the rest of this forum's experiences been?

Last edited by dugan; 11-19-2016 at 02:03 AM.
Old 11-19-2016, 09:47 AM   #2
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062
Well, cd is one of the most basic utilities; it "works" with every shell (it's a shell builtin).

I can only speak for the Bourne Shell look- work alike (sh, KornShell and BASH but cd has some handy features -- if you get off into some directory deep down in the file system simply typing cd will return you to your home directory.

You can move "up" from a directory to a previous directory with cd ...

You can set your environment to show your current working directory.

I only use KornShell (BASH is, essentially, KornShell -- it's Bourne Again Shell, incorporating the functions of KornShell). Typically, a KornShell program will run in BASH and vice versa with little or no changes. Slackware comes with KornShell (ksh).

My shell prompt looks like this:
Name of system, login name, current working directory.

It is set in a file in /etc/profile.d/ that is invoked automagically at login to set environment variables that I care about:
fubar-trona-/etc/profile.d: cat
#ident	"$Id$"
#	Name:		$Source$
#	Version:	$Revision$
#	Modified:	$Date$
#	Purpose:	set local environment variables for Korn Shell
#	Author:		T. N. Ronayne
#	Date:		1 Oct 2009
#	$Log$
# Set the HOST environment variable
export HOST="`uname -n`"
# Set ksh93 visual editing mode:
if [ "$SHELL" = "/bin/ksh" ]; then
#  VISUAL=emacs		# ugh
#  VISUAL=gmacs		# double ugh
   VISUAL=vi		# ah, elegance
# Set a default shell prompt:
#PS1='`hostname`:`pwd`# '
# Do these anyway in case sombody uses a different shell
if [ "$SHELL" = "/bin/pdksh" ]; then
 PS1='! $ '
elif [ "$SHELL" = "/bin/ksh" ]; then
 PS1='${HOST}-${USER}-${PWD}: '
elif [ "$SHELL" = "/bin/zsh" ]; then
 PS1='%n@%m:%~%# '
elif [ "$SHELL" = "/bin/ash" ]; then
 PS1='$ '
 PS1='\u@\h:\w\$ '
PS2='> '
Most of that is a small chunk of /etc/profile; you should never alter /etc/profile, you can fiddle with environment variables in other ways. I fiddle with /etc/profile.d/ksh (which does not exist in the standard Slackware release). You can do the same thing in your home directory .profile file but in my systems the standard shell is KornShell and everybody gets the same base variables (and they can twiddle those if they chose).

I discourage any use of C-Shell (and, frankly, nobody gives a hoot about C-Shell in any event). My opinion is that C-Shell is a convoluted mess that offers no function not done better with KornShell (or maybe BASH) however I don't use BASH and only have one user who does -- he likes it, good enough for me.

So, with all that, what I do is a tune-up that meets my needs and most of my users' needs; folks like the shell prompt, they like the command line editing features of the VISUAL environment variable (only one user likes emacs, fine with me, he's happy).

Those settings are for convenience and usability and cd get used heavily in software development and it's handy to know where you are at a glance.

So, yeah, cd is constantly in use with any shell command and programming language when working in a terminal window -- no clicky, no mousey.

Hope this helps some.
Old 11-20-2016, 12:51 PM   #3
John VV
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,523

Rep: Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619
Do any of you use software that assists with changing directories?
as above every shell uses "cd"
i use "cd" "cd ../" or cd ../( the first letter of the folder and <tab>) for auto complete


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
unable to replace "ö" to "p" in shell scripting with "sed" meninmech Programming 5 06-22-2012 02:58 PM
How to set the font-size for "xterm" terminal-emulator (running "bash" shell) ajaygarg Linux - Desktop 1 03-09-2012 12:38 PM
Shell script: I have string "abc____def____ghi", how to make "abc def ghi" vouser Programming 8 03-09-2010 10:01 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:28 PM.

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