Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: F7 to bring up command line history - I've always used arrow keys for reuse  (Read 2569 times)

0 Members and 1 Guest are viewing this topic.

DaveLembke

    Topic Starter


    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
This caught my attention today. F7 key to bring up command line history while in command shell of Windows. I have been just using up and down arrows for years to get to a command that was entered earlier for reuse. Never knew of this F7 method. I guess it could be helpful if you wanted to see all of them listed vs having to up/down arrow select through them, but the up/down arrow method is very fast vs F7 and then select.

Does anyone use this F7 method or do you use the arrow keys to bring up prior command instructions to reuse?

https://www.computerhope.com/tips/tip189.htm

Salmon Trout

  • Guest
Like this?



Since I installed Clink (a Windows command line enhancer, with persistent history, custom coloured prompt, etc) I seem to have lost the F7 feature. I don't actually miss it, as I prefer the arrows.

Clink replaces F7 with another thing you get to with Alt-R, but it doesn't seem very intuitive, but I still like and use Clink.

http://mridgers.github.io/clink/


Salmon Trout

  • Guest
Clink replaces F7 with another thing you get to with Alt-R, but it doesn't seem very intuitive, but I still like and use Clink.
Correction: Ctrl + R, also Ctrl + S

Salmon Trout

  • Guest
When I say Clink has 'persistent history' I mean it remembers your commands forever, i.e. the history survives shutdowns & restarts (like Linux). Or until you clear the history. The only thing that bugs me (and only a bit) is that for tab completion it seems you have to type a bit more before it offers a suggestion.


DaveLembke

    Topic Starter


    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Quote
When I say Clink has 'persistent history' I mean it remembers your commands forever, i.e. the history survives shutdowns & restarts (like Linux).

Cool ... A good feature for a lengthy instruction at command shell or terminal without having to manually type it in which if its not something typed every day could be faster to summon it from history.

 Only worry I would have with something like this is if say your working with -u -p with mysql etc and so the user and password must get stored to a file, so where ever the history is saved it could start to build a file with authentication material. But someone would need to have access already in order to target this file I suppose and if they have that much access already then you have a bigger problem than them being able to get a copy of this history file.  :)

Salmon Trout

  • Guest
Yes, and ssh as well if you type the password as part of the command. I now see Clink has a setting, history_ignore_space. With this set, Clink won't add lines to the history that are prefixed with whitespace, One or more leading spaces won't affect a command, I think.

In C:\Users\%username%\AppData\Local\clink\settings

# name: Skip adding lines prefixed with whitespace
# type: bool
# Ignore lines that begin with whitespace when adding lines in to the history.
history_ignore_space = 1
 


[EDIT] It's in the docs but it does not seem to work. A problem, I think.

« Last Edit: January 18, 2018, 07:19:31 AM by Salmon Trout »

Salmon Trout

  • Guest
UPDATE

I was looking at the wrong settings file, I think it was left by a previous version, the settings file is C:\Program Files (x86)\clink\0.4.9\profile\settings. And the settings change worked. A command with one or spaces at the start is not saved. That 0.4.9 might change if you get a later version than mine.