File Exchange

image thumbnail

hs: a pedestrian history search engine

version 1.2.0.0 (8.29 KB) by us
hs searches the command history for patterns

0 Downloads

Updated 21 Apr 2009

View License

HS searches the command history file for entries containing a specific pattern using the regular expression engine.
the results are displayed in the command window in the format:

#entry location: line

clicking the -location- will open the history file at this line;
clicking the -line- will copy/paste the line to the command prompt and may be return by an [ENTER] command.

see:

>> help hs

for more explanations for this snippet

Cite As

us (2020). hs: a pedestrian history search engine (https://www.mathworks.com/matlabcentral/fileexchange/20610-hs-a-pedestrian-history-search-engine), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (11)

Matt Bauman

Matt Bauman

This is great! Thanks for the submission. One small fix for this to work on Mac:

Change the function GREP_copypaste (line 1168) to

import java.lang.*
import java.awt.*;
import java.awt.event.*;
clipboard('copy',s);
rob=Robot;
if ismac
modifier = KeyEvent.VK_META;
else
modifier = KeyEvent.VK_CONTROL;
end
rob.keyPress(modifier);
rob.keyPress(KeyEvent.VK_V);
rob.keyRelease(modifier);

Yuri K

Works as expected. Great tool! I believe it should be part of Matlab. Thanks a lot!

Yuri K

I downloaded the file and unzipped it into directory in matlab path. Tried to restart matlab. This error always pops up. I can see grep function nested in hs.m and I can see this line at the end. But I don't have grep.m ('which grep' returns 'not found'.) Looks like I need it but hs documentation does not say it.

us

yuri, i do not understand this error - GREP is embedded into HS...
if you
type hs
you should see this line at the end (-2 two lines)

%$SSC_INSERT_END 29-Aug-2008/17:29:29 F:/usr/matlab/unix/grep.m

can you give more information...
urs

Yuri K

When clicking on a line I get error:
??? Undefined function or method 'grep' for input arguments of type 'double'. Matlab 2008a.

It does what it claims to do, and does so well.

Thierry Dalon

Look great!
I would remove all history entries coming from hs itself. there are not very useful.

Urs (us) Schwarz

dear WS - because at work (a hospital), i'm living behind two(!) firewalls, which wont let me upload anything else than a zip attachment...
sorry for the inconvenience
us

w s

Why do you put a single m-file in a zip-file? Yet, great tool!

Updates

1.2.0.0

Yuri Kotliarov has disclosed a strange behavior, which was corrected; thanks, Yuri!
version tag: 21-Apr-2009 21:38:10

1.0.0.0

changed line-click from rerun to copy/paste to the command prompt; version tag 29-Aug-2008 17:28:54

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux