mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
Relnoted history builtin
Tweaked validation regex to use extended regexs
This commit is contained in:
parent
85cbb943b5
commit
be1d216b34
2 changed files with 15 additions and 3 deletions
|
@ -22,6 +22,18 @@ li {
|
|||
<li>A SIGTERM now ends the whole execution stack again (<a href="https://github.com/ridiculousfish/fishfish/issues/13">from this issue</a>).
|
||||
</ul>
|
||||
|
||||
<h3>New Features</h3>
|
||||
<ul>
|
||||
<li>A <b>history builtin</b>, and associated interactive function that enables deleting history items. Example usage:
|
||||
|
||||
<ul>
|
||||
<li>Print all history items beginning with echo: <span class="mono">history --search --prefix echo</span></li>
|
||||
<li>Print all history items containing foo: <span class="mono">history --search --contains foo</span></li>
|
||||
<li>Interactively delete some items containing foo: <span class="mono">history --delete --contains foo</span></li>
|
||||
</ul><br>
|
||||
Credit to Siteshwar for implementation. Thanks Siteshwar!
|
||||
</li>
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ function history --description "Deletes an item from history"
|
|||
end
|
||||
|
||||
#Following two validations could be embedded with "and" but I find the syntax kind of weird.
|
||||
if not echo $i | grep -q "^[0-9]+\$"
|
||||
if not echo $i | grep -E -q "^[0-9]+\$"
|
||||
printf "Invalid input: %s\n" $i
|
||||
continue
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue