Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

pushd popd 'down' and 'next'

I see you built a 'pushd' into each command, that's just as I had it, so now using Autohotkey for the time being) I have:

Alt+Up = pushd ^ cd..
Alt+Down = cdin
Alt+Left = popd
Alt+Right = cdnext

Violation of symmetry with Alt+Left of course, but I figure that in almost all cases CDPREV and POPD will have identical targets -- but it's debatable.

With plugins, the very last word in elegance would be if Rex could make it such that a compatible help file could be written that would automaticaly integrate with the main help system.

BTW tx for CDH, that replaces a laborious alias of mine.
 
On Sat, 29 May 2010 11:00:47 -0400, rayandrews <> wrote:

|I see you built a 'pushd' into each command

No I haven't. CDIN, CDNEXT, and CDPREV change directory like this:

VOID ChangeDir(WCHAR *p)
{
WCHAR szCmd[MAX_PATH + 8];
Sprintf(szCmd, L"CD `%s`", p);
Command(szCmd, 0);
}

just as if you executed it at the command line. That's so TCC will update the
dirhistory and the "CD -" mechanism. I don't use PUSHD/POPD but I'm pretty sure
it's something else.
--
- Vince
 
On Sat, 29 May 2010 11:00:47 -0400, rayandrews <> wrote:

|I see you built a 'pushd' into each command

No I haven't. CDIN, CDNEXT, and CDPREV change directory like this:

VOID ChangeDir(WCHAR *p)
{
WCHAR szCmd[MAX_PATH + 8];
Sprintf(szCmd, L"CD `%s`", p);
Command(szCmd, 0);
}

just as if you executed it at the command line. That's so TCC will update the
dirhistory and the "CD -" mechanism. I don't use PUSHD/POPD but I'm pretty sure
it's something else.

After reading my own post I realized I could simply use Cd_Cmd().
 
After reading my own post I realized I could simply use Cd_Cmd().

Well, however you did it, the effect is that a popd after executing one of your commands will 'popd' just as if there was pushd built in i.e. I go back where I came from which is just what I like. I want a pushd (or equivalent) in front of every directory change I make.

Repenting of my folly, I now see that the 'Alt+' keys should be left as they were, and I'm now using 'Ctrl+[]' for my navigation keys -- of couse that trips up Ctrl+Left and Ctrl+Right, but they can be done without. Hard to navigate a straight path from 4DOS to TCC without bumping into these conflicts between old defaults and new defaults and old keys and new keys -- can't be helped tho. But I wish I had that 'converting from 4DOS to TCC' document that (was it) Steve mentioned existed in the early days of 4NT.
 
On Sat, 29 May 2010 13:00:11 -0400, rayandrews <> wrote:

|Well, however you did it, the effect is that a popd after executing one of your commands will 'popd' just as if there was pushd built in i.e. I go back where I came from which is just what I like. I want a pushd (or equivalent) in front of every directory change I make.

I swear I didn't do it; I just CD and just CDing doesn't affect the directory
stack. I doubt it's even a side-effect of what I've done. I'd have to guess
you still have some aliases hanging around. See, it doesn't do it here:

v:\> cdin

v:\dira> popd
TCC: Directory stack empty

v:\dira> cdnext

v:\dirb> popd
TCC: Directory stack empty

v:\dirb>

|Repenting of my folly, I now see that the 'Alt+' keys should be left as they were, and I'm now using 'Ctrl+[]' for my navigation keys -- of couse that trips up Ctrl+Left and Ctrl+Right, but they can be done without. Hard to navigate a straight path from 4DOS to TCC without bumping into these conflicts between old defaults and new defaults and old keys and new keys -- can't be helped tho. But I wish I had that 'converting from 4DOS to TCC' document that (was it) Steve mentioned existed in the early days of 4NT.

If you won't miss scrolling the console with keystrokes, you might be able to
(haven't tried it) use the INI directives "NormalKey=Alt-PgUp", et c. to make
those keys available.
--
- Vince
 
I swear I didn't do it; I just CD and just CDing doesn't affect the directory
stack. I doubt it's even a side-effect of what I've done. I'd have to guess
you still have some aliases hanging around. See, it doesn't do it here:

- Vince

Hmmm -- I have a 'pushd' aliased to 'cd' and 'cd..', etc, so that must be where it comes from. Anyway, tx. for the additions, I've now got things running in TCC about the same as in 4DOS, excepting CTRL+ vs. ALT+, but I can see that the ALT+ keys need to keep their current use, so it's all for the best. I'll be bugging you again when I start tinkering with plugins.
 
Back
Top