Welcome!

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

SignUp Now!

Question About Commands Executed from XHISTORY

Jun
562
4
When a command that was originally executed from a directory different from the current one is executed from the XHISTORY popup window, is it executed from the now-current directory or from the then-current directory? If not the latter, it would be good if there were an option to do that.
 
OK. I'll have to think about whether it would be a good thing. The case that comes to mind is a command such as "edit file". If one wanted to execute it again to edit that same file, one would have to be in the original directory. Perhaps the answer would be to provide a button to change to the directory of the currently highlighted command line (while not exiting the dialog window). Then one could use ENTER to execute the command.

I'm just beginning to think about the possibilities offered by this new feature.

In any case, the documentation could be explicit that the command line is rerun in the now-current directory, even if it is not the one from which the command was originally run.
 
I think it would be better (and less apt to cause unexpected side effects and confusion) to have an option to (re)execute the command by switching to the saved CWD, executing the command, then reverting to the current directory.

I agree. What I suggested in the Suggestions Forum is buttons in the popup that do various things. One button would just change to the directory of the highlighted command. Another button might do what you suggest: push to that directory, run the command, and pop back to the original directory.

I'm still trying to get my head around this new feature and how it can be used effectively. Sometimes it might be used simply to see and understand something that one did in the past.

I just tried using the regular history popup and noticed that it has a set of buttons on the right. The edit button works slightly differently: the cursor is at the beginning rather than the end of the original command line. I don't know if that was intentional. You also have buttons for rearranging the order of the commands that are not in the XHISTORY popup.

In my playing around just now, the popup crashed TakeCommand again, and now that I have restarted it, the popup keys no longer work. Something got really messed up.
 
I just tried using the regular history popup and noticed that it has a set of buttons on the right. The edit button works slightly differently: the cursor is at the beginning rather than the end of the original command line. I don't know if that was intentional. You also have buttons for rearranging the order of the commands that are not in the XHISTORY popup.

This is WAD. The Extended History is intended to be the complete original history, not a reordered one. And reordering would render the timestamps pointless.

In my playing around just now, the popup crashed TakeCommand again, and now that I have restarted it, the popup keys no longer work. Something got really messed up.

Check to see if you have any background TCC processes that might have a lock on the extended history list file. And look in "C:\ProgramData\JP Software\" to see if your xhistory32 file is there (and hasn't been corrupted).
 
This is WAD. The Extended History is intended to be the complete original history, not a reordered one. And reordering would render the timestamps pointless.

That makes sense, but what about the command-line editing? That also re-writes history. Maybe the edited command should not be saved unless executed, in which case it should be added at the end (which it is now, but the original command has also been changed).

Hmmm. I'm not sure what to think. Perhaps when a command is edited and ENTER pressed, the edited version should be placed at the end of the history and highlighted.

Perhaps your intent is that editing is to be used to correct mistakes in the original command, not to create new commands and that Ctrl-Enter should be used to copy an old command to the command line for editing into a new command. (Still trying to get my head around this new feature.)
 

Similar threads

Back
Top