Disable Automatic Directory Changes?

Jun 2, 2008
42
0
Is there a way to disable automatic directory changes?
If not could that be added to the suggestion list?
Even better, could a special alias (like UNKNOWN_CMD, perhaps AUTO_CD) be added to allow redefining how automatic directory changes work?

For years I have aliased cd to something else, exactly what has varied. For example, I have often had cd aliased to *pushd. Unfortunately, automatic directory changes easily defeat any alias to cd/cdd/pushd/etc. I would like to ensure that all directory changes occur through a method of my choice. Now I'm in the habit of not using automatic directory changes, but every once in a while it happens anyway. Then of course my directory stack is incomplete and incorrect. I would, of course, prefer to maintain an accurate and complete directory stack.


- Josh
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,423
85
Albuquerque, NM
prospero.unm.edu
For years I have aliased cd to something else, exactly what has varied. For example, I have often had cd aliased to *pushd. Unfortunately, automatic directory changes easily defeat any alias to cd/cdd/pushd/etc. I would like to ensure that all directory changes occur through a method of my choice. Now I'm in the habit of not using automatic directory changes, but every once in a while it happens anyway. Then of course my directory stack is incomplete and incorrect. I would, of course, prefer to maintain an accurate and complete directory stack.

You want all of your directory changes to be pushed onto the directory stack? Isn't that what the directory history is for? (Automatic directory changes are saved in the history.)
 
B

BillMc

Guest
. On Sat 19-Jul-08 8:57am -0600, joshjeppson wrote:
.
. > Is there a way to disable automatic directory changes?
.
I can't think of what changed for automatic directory
changes from 4nt to tcc. What are you referring to?

There is the new "internal alias" called '-' for which most
of us already had a normal alias. The "internal alias" can
be overridden by a normal alias. For example:

alias -=`echos %_cwd&*-&echos -^^> %_cwd`

--
Best regards,
Bill
 
Jun 2, 2008
42
0
You want all of your directory changes to be pushed onto the directory stack? Isn't that what the directory history is for? (Automatic directory changes are saved in the history.)

That was an example. What I want is to be able to guarantee that all directory changes occur via a mechanism I can customize. Currently I can override everything with aliases, except automatic directory changes.


- Josh
 
Jun 2, 2008
42
0
. On Sat 19-Jul-08 8:57am -0600, joshjeppson wrote:
.
. > Is there a way to disable automatic directory changes?
.
I can't think of what changed for automatic directory
changes from 4nt to tcc. What are you referring to?

There is the new "internal alias" called '-' for which most
of us already had a normal alias. The "internal alias" can
be overridden by a normal alias. For example:

alias -=`echos %_cwd&*-&echos -^^> %_cwd`

It's not that something changed from 4NT to TCC. I've dealt with the automatic directory change behavior since it's inception and have worked around it because I rarely use it. I think I actually made a similar request years ago on the newsgroup.

If there is no way to disable automatic directory changes, which I believe there is not, then I would like Rex to add in v10 either a method to disable them or, even better, a method to override their behavior. I'm suggesting a NEW internal alias (AUTO_CD) that would be called whenever an automatic directory change occurred with the directory as a parameter.

If such an alias existed, I could then add whatever functionality I chose to all methods of directory change and bypassing it would require a conscious choice to not use the aliases.


- Josh
 

rconn

Administrator
Staff member
May 14, 2008
12,315
148
Automatic Directory Changes

joshjeppson wrote:

> Is there a way to disable automatic directory changes?
> If not could that be added to the suggestion list?
> Even better, could a special alias (like UNKNOWN_CMD, perhaps AUTO_CD)
> be added to allow redefining how automatic directory changes work?

If you're referring to the directory changes when you enter the
directory name at the prompt (with a trailing backslash, and without a
preceding CD or CDD), then I'm afraid I don't understand the problem.
If you don't want to use that syntax, then why enter it?

(This has no effect on the directory stack, only on the directory history.)

Rex Conn
JP Software
 
Jun 2, 2008
42
0
joshjeppson wrote:
If you're referring to the directory changes when you enter the
directory name at the prompt (with a trailing backslash, and without a
preceding CD or CDD), then I'm afraid I don't understand the problem.
If you don't want to use that syntax, then why enter it?

Actually, I would like to use the syntax. My problem is that I don't have any control over what that syntax does. So I would like to have that control or at least the ability to turn that syntax off to avoid the lack of control.

I just want a method to force all forms of directory changes through a single point. How I choose to use that is my problem. Currently automatic directory changes can NOT be redefined or disabled.


- Josh
 
Similar threads
Thread starter Title Forum Replies Date
vefatica Disable extended directory searches (completely)? Support 8
WadeHatler Any way to disable ALL the global hotkeys? Support 8
F How to? Disable TCC's internal response to Alt-F4 Support 8
T Disable audible beep on input and inkey Support 2
P Can't disable internal tar, at least in pipes Support 3
M Disable commands? Support 2
J How to? Disable unix-style paths interpretation of / Support 2
P Disable global hotkey Ctrl+Shift+T Support 19
jbarnes1967 Disable wildcard [ char in destination Support 10
S How to? enable or disable screen saver password Support 5
rconn How to disable avatars Support 10
vefatica V15's automatic error emails to JPSoft! Support 3
D Automatic directory changes don't work at all Support 4
S Suggestion: enhanced automatic quoting of filenames Support 2
fishman@panix.com HELP!! I just updated to Version 28 and as usual I cannot make extended directory search work. Support 2
D How to use multi-line DO to loop through first level directory names Support 5
D ParentDirectory does not update directory history Support 6
samintz CDD to non-existent directory hangs Support 2
gworley rd (Remove Directory) gives interesting error: Support 2
D Directory History Window with wildcard search Support 3
D How to? Skip removing directory (RMDIR) without error message Support 2
gentzel Directory stack empty when running TCEXIT? Support 9
M WAD "Pictures" directory is empty in TCC but not in CMD or Explorer Support 4
G Local Directory Corruption Support 11
Jay Sage Directory Alias Access to FTP Servers Support 2
Joe Caverly DIRectory Colorization in v25 Help File Support 0
K copy changing destination current directory Support 1
thorntonpg option /u not working The directory name is invalid Support 5
J built in file explorer - how do i go back "up" the directory? Support 2
vefatica Extended directory searches? Support 6
Joe Caverly Using a Directory Alias with @iniwrite fails Support 14
A Installer /extract: extracts into current directory if target not exists Support 12
Charles Dye Ctrl-Shift-Up doesn't update directory history Support 1
G Extended directory search not working Support 4
CWBillow Editing in the root directory of windows 10 Support 6
D Directory stack empty Support 1
J directory or folder to start in Support 2
M How to unlock a directory Support 1
Alpengreis Fixed TCMD FileExplorer Start-Directory problem Support 4
R V19 - At startup, TCC save directory in the directory history list Support 2
C Touch command — I Need to touch matching files in another directory. Support 5
nickles Move takecommand.18.0.key location to installation directory Support 4
fishman@panix.com Extended Directory Searches are not working for me in CDD Support 9
vefatica TCMD's current directory? Support 4
J How to set working directory Support 10
nickles How to? Follow a JUNCTION type directory link Support 9
Steve Pitts WAD Strange output from DEL of a non-existent directory Support 7
I tab completion with directory commands Support 7
vefatica Start-up directory for new tabs? Support 7
cgunhouse Problem with CALL and Directory Aliases in V17 Support 9

Similar threads