Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4f71b89
basic sqlite history
phiresky Apr 1, 2022
dd93aba
fix test compilation
phiresky Apr 1, 2022
4c03e68
final touches for MVP
phiresky Apr 1, 2022
a669fb3
better documentation
phiresky Apr 1, 2022
187f867
fix for empty history
phiresky Apr 2, 2022
01b62e7
partial change to non-generic history
phiresky Apr 16, 2022
3e76ae7
mostly working
phiresky Apr 16, 2022
317a69f
fix tests and ci
phiresky Apr 18, 2022
7d4b7ca
fixes, format
phiresky Apr 18, 2022
5fc904e
move history item to new file
phiresky Apr 18, 2022
f756189
fix some comments, fix test compile errors
phiresky Apr 20, 2022
4d60705
ci features matrix
phiresky Apr 20, 2022
13b32b9
fix index creation
phiresky Apr 18, 2022
56a210c
fix file-based tests
phiresky May 8, 2022
7c6b09a
move logic for not saving empty entries to engine
phiresky May 8, 2022
9cab40f
fix update last command on empty, set up application_id and check ver…
phiresky May 8, 2022
37afda0
Merge remote-tracking branch 'origin/main' into sqlite-history-2
phiresky May 8, 2022
556115b
add specific error variants
phiresky May 8, 2022
285ea4b
format
phiresky May 11, 2022
c772fad
fix compile errors
phiresky May 11, 2022
74c8f71
fix fmt
fdncred May 11, 2022
d84fd86
sqlite with bashisms
elferherrera May 21, 2022
a9c9d3a
Merge branch 'main' of https://github.com/nushell/reedline into sqlit…
elferherrera May 21, 2022
428544d
hide with features
elferherrera May 21, 2022
014bd48
cargo fmt
elferherrera May 21, 2022
a8d8703
improve performance of bashisms selectors
phiresky Jun 6, 2022
33b7610
Merge remote-tracking branch 'origin/main' into sqlite-history-2
phiresky Jun 6, 2022
6d803bb
Style: Remove commented out code
sholderbach Jun 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improve performance of bashisms selectors
  • Loading branch information
phiresky committed Jun 6, 2022
commit a8d8703d391865c874b63a0834e65da493574e65
14 changes: 3 additions & 11 deletions src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ impl Reedline {
end_time: None,
start_id: None,
end_id: None,
limit: None,
limit: Some(index as i64), // fetch the latest n entries
filter: SearchFilter::anything(),
})
.unwrap_or_else(|_| Vec::new())
Expand All @@ -1208,7 +1208,7 @@ impl Reedline {
end_time: None,
start_id: None,
end_id: None,
limit: None,
limit: Some((index + 1) as i64), // fetch the oldest n entries
filter: SearchFilter::anything(),
})
.unwrap_or_else(|_| Vec::new())
Expand All @@ -1222,15 +1222,7 @@ impl Reedline {
}),
ParseAction::LastToken => self
.history
.search(SearchQuery {
direction: SearchDirection::Backward,
start_time: None,
end_time: None,
start_id: None,
end_id: None,
limit: None,
filter: SearchFilter::anything(),
})
.search(SearchQuery::last_with_search(SearchFilter::anything()))
.unwrap_or_else(|_| Vec::new())
.get(0)
.and_then(|history| history.command_line.split_whitespace().rev().next())
Expand Down