1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
Unix bash:
Q: I have wcd.exe installed and defined the function
in ~/.bashrc but the shell returns: "command not found".
A: The problem is that ~/.bashrc is not executed because
the bash is started as an interactive login shell.
The bash only executes the commands in ~/.bashrc if it
is started as an interactive shell that is not a login
shell.
If the bash is started as an interactive login shell it
first reads and executes commands from the file
/etc/profile, if that file exists. After reading that
file, it looks for ~/.bash_profile, ~/.bash_login, and
~/.profile, in that order, and reads and executes commands
from the first one that exists and is readable.
The solution is to define the wcd function in one of these
files.
DOS/Windows 3.1/9x/ME/NT/2000/XP
Q: How do I automatically start the explorer after wcd?
A: If you use the dos32bit version on windows 95/98/ME this batch script will work:
@echo off
wcd.exe %1 %2 %3 %4 %5 %6
explorer.exe .
If you use the win32 console version add an extra line to your wcd.bat
script (on windows NT/2000/XP).
@echo off
wcdwin32.exe %*
echo explorer.exe . >> c:\wcdgo.bat
c:\wcdgo.bat
Windows NT/2000/XP
Q: The system administrator has set environment variable HOME,
but I want the behaviour of wcd as if HOME and WCDHOME were
not set (as I was used to on DOS/Windows 9x).
A: In the wcd.bat file you have to copy HOME into another
variable, unset HOME, run wcd, and copy HOME back to its original
value. An example follows:
@echo off
set HOMETEMP=%HOME%
set HOME=
wcdwin32.exe %*
set HOME=%HOMETEMP%
c:\wcdgo.bat
You may need to rescan your drives after this.
|