diff --git a/release_notes.html b/release_notes.html
index 8484087d4..45ee8e7ee 100644
--- a/release_notes.html
+++ b/release_notes.html
@@ -22,6 +22,18 @@ li {
A SIGTERM now ends the whole execution stack again (from this issue).
+New Features
+
+- A history builtin, and associated interactive function that enables deleting history items. Example usage:
+
+
+- Print all history items beginning with echo: history --search --prefix echo
+- Print all history items containing foo: history --search --contains foo
+- Interactively delete some items containing foo: history --delete --contains foo
+
+Credit to Siteshwar for implementation. Thanks Siteshwar!
+
+
diff --git a/share/functions/history.fish b/share/functions/history.fish
index 17cd9d939..16a3f4afe 100644
--- a/share/functions/history.fish
+++ b/share/functions/history.fish
@@ -53,8 +53,8 @@ function history --description "Deletes an item from history"
end
read --local --prompt "echo 'Delete which entries? > '" choice
- set choice (echo $choice | tr " " "\n")
-
+ set choice (echo $choice | tr " " "\n")
+
for i in $choice
# Skip empty input; for example, if the user just hits return
@@ -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