Re: newly installed apps not in path?

2006-05-16 Thread Alex Zbyslaw

Danny Pansters wrote:


On Monday 15 May 2006 22:36, Atom Powers wrote:
 


I've noticed this behavior since 4.3, but it's just now starting to
get really annoying.

Whan I install a new application (from ports) I have to execute it
with the full path until I start a new shell. (in sh, tcsh, and bash)

What causes this behavior, and how can I fix it (cause newly installed
apps to be executable without a full path)?
   



If you're using the [t]csh shell, you need to run 'rehash' to update your 
current path. It would be good if the post-everything part of ports would do 
that when needed.
 

It can't.  The rehash has to be executed within the context of your 
current shell (it's a builtin) and the only place you have that is the 
command line.  Any process you run (like make, portupgrade) has no 
access to that context.


If you are not wedded to tcsh, then bash would do it for you; other 
shells too, perhaps, but I can't say never having tried them.


--Alex


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


newly installed apps not in path?

2006-05-15 Thread Atom Powers

I've noticed this behavior since 4.3, but it's just now starting to
get really annoying.

Whan I install a new application (from ports) I have to execute it
with the full path until I start a new shell. (in sh, tcsh, and bash)

What causes this behavior, and how can I fix it (cause newly installed
apps to be executable without a full path)?


DIT793# which sudo
sudo: Command not found.
DIT793# portinstall sudo
...
DIT793# ll /usr/local/bin/sudo
---s--x--x  2 root  wheel  89020 May 15 13:31 /usr/local/bin/sudo
DIT793# which sudo
sudo: Command not found.
DIT793# tcsh
DIT793# which sudo
/usr/local/bin/sudo
DIT793# exit
exit
DIT793# which sudo
sudo: Command not found.


--
--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: newly installed apps not in path?

2006-05-15 Thread Charles Swiger

On May 15, 2006, at 4:36 PM, Atom Powers wrote:

Whan I install a new application (from ports) I have to execute it
with the full path until I start a new shell. (in sh, tcsh, and bash)

What causes this behavior, and how can I fix it (cause newly installed
apps to be executable without a full path)?


Try doing a rehash

--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: newly installed apps not in path?

2006-05-15 Thread Atom Powers

On 5/15/06, Charles Swiger [EMAIL PROTECTED] wrote:

On May 15, 2006, at 4:36 PM, Atom Powers wrote:
 Whan I install a new application (from ports) I have to execute it
 with the full path until I start a new shell. (in sh, tcsh, and bash)

 What causes this behavior, and how can I fix it (cause newly installed
 apps to be executable without a full path)?

Try doing a rehash


That does it; thanks.
Any reason the ports don't do this as part of the installation?

--
--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: newly installed apps not in path?

2006-05-15 Thread Mike Jeays
On Mon, 2006-05-15 at 13:36 -0700, Atom Powers wrote:
 I've noticed this behavior since 4.3, but it's just now starting to
 get really annoying.
 
 Whan I install a new application (from ports) I have to execute it
 with the full path until I start a new shell. (in sh, tcsh, and bash)
 
 What causes this behavior, and how can I fix it (cause newly installed
 apps to be executable without a full path)?
 
 
 DIT793# which sudo
 sudo: Command not found.
 DIT793# portinstall sudo
 ...
 DIT793# ll /usr/local/bin/sudo
 ---s--x--x  2 root  wheel  89020 May 15 13:31 /usr/local/bin/sudo
 DIT793# which sudo
 sudo: Command not found.
 DIT793# tcsh
 DIT793# which sudo
 /usr/local/bin/sudo
 DIT793# exit
 exit
 DIT793# which sudo
 sudo: Command not found.
 
 

For csh and tcsh, I beleive you have to issue a 'rehash' command after
modifying the libraries in $PATH.  I would not have expected to see this
problem with bash, however.

-- 
Mike Jeays
http://ca.geocities.com/[EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: newly installed apps not in path?

2006-05-15 Thread Atom Powers

On 5/15/06, Mike Jeays [EMAIL PROTECTED] wrote:

On Mon, 2006-05-15 at 13:36 -0700, Atom Powers wrote:
 I've noticed this behavior since 4.3, but it's just now starting to
 get really annoying.

 Whan I install a new application (from ports) I have to execute it
 with the full path until I start a new shell. (in sh, tcsh, and bash)


For csh and tcsh, I beleive you have to issue a 'rehash' command after
modifying the libraries in $PATH.  I would not have expected to see this
problem with bash, however.



I only recently started using bash, on some systems, so I could be
wrong about that behavior.

--
--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: newly installed apps not in path?

2006-05-15 Thread Jerry McAllister
 
 I've noticed this behavior since 4.3, but it's just now starting to
 get really annoying.
 
 Whan I install a new application (from ports) I have to execute it
 with the full path until I start a new shell. (in sh, tcsh, and bash)
 
 What causes this behavior, and how can I fix it (cause newly installed
 apps to be executable without a full path)?

This is nothing new.   
Your shell reads up the stuff in its path when it starts up
and makes an internal table so it doesn't have to go fishing
around every time you type a command.   This is to speed up
response and cut down on unnecessary disk accesses. 

You can make it re-read the path and recreate that table 
with the 'rehash' shell command.

jerry

 
 
 DIT793# which sudo
 sudo: Command not found.
 DIT793# portinstall sudo
 ...
 DIT793# ll /usr/local/bin/sudo
 ---s--x--x  2 root  wheel  89020 May 15 13:31 /usr/local/bin/sudo
 DIT793# which sudo
 sudo: Command not found.
 DIT793# tcsh
 DIT793# which sudo
 /usr/local/bin/sudo
 DIT793# exit
 exit
 DIT793# which sudo
 sudo: Command not found.
 --
 Perfection is just a word I use occasionally with mustard.
 --Atom Powers--
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: newly installed apps not in path?

2006-05-15 Thread Danny Pansters
On Monday 15 May 2006 22:36, Atom Powers wrote:
 I've noticed this behavior since 4.3, but it's just now starting to
 get really annoying.

 Whan I install a new application (from ports) I have to execute it
 with the full path until I start a new shell. (in sh, tcsh, and bash)

 What causes this behavior, and how can I fix it (cause newly installed
 apps to be executable without a full path)?

If you're using the [t]csh shell, you need to run 'rehash' to update your 
current path. It would be good if the post-everything part of ports would do 
that when needed.

Dan.


 
 DIT793# which sudo
 sudo: Command not found.
 DIT793# portinstall sudo
 ...
 DIT793# ll /usr/local/bin/sudo
 ---s--x--x  2 root  wheel  89020 May 15 13:31 /usr/local/bin/sudo
 DIT793# which sudo
 sudo: Command not found.
 DIT793# tcsh
 DIT793# which sudo
 /usr/local/bin/sudo
 DIT793# exit
 exit
 DIT793# which sudo
 sudo: Command not found.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]