Qi Xiao
89bc1e5fa6
Support deleting command history with store:del-cmd.
...
This addresses #554 .
However, the command sequence number shown in histlist mode is not
correct for session-local entries and when there are deleted entries.
2018-05-14 23:26:36 +01:00
Qi Xiao
3cc906809b
store: RemoveCmd -> DelCmd.
2018-05-14 23:26:36 +01:00
Qi Xiao
a13c7c2a51
Add a store: module, with store:del-dir for deleting from directory history.
...
This fixes #555 .
2018-03-20 23:05:21 +00:00
Qi Xiao
e6d9ba6b55
store: RemoveDir -> DelDir, add test.
2018-03-20 23:05:21 +00:00
Qi Xiao
47a8bec88d
Define a common interface for store.Store and daemon.Client.
...
This interface type is also used by store.Service in favor of the
concrete *store.Store type.
2017-12-28 21:44:10 +00:00
xofyarg
c873d39717
Replace SQLite with BoltDB ( #441 )
...
* Vendor boltdb
* Replace sqlite3 with boltdb
Fix #435
2017-07-19 22:19:42 +02:00
Qi Xiao
e99031f3e2
Use understore in filenames.
2017-06-26 19:47:10 +02:00
Qi Xiao
24c56a40c4
Move definitions in store/ to store/storedefs.
...
Now only the daemon/service depends on store/.
2017-06-20 02:57:45 +02:00
Qi Xiao
88f3082fe6
store: Make Waits a method.
2017-06-20 00:03:35 +02:00
Qi Xiao
013168bce3
store: Fix test case.
2017-06-07 11:07:04 +01:00
Qi Xiao
b814a7e457
store: Store.AddCmd returns sequence of added command.
2017-06-07 01:10:40 +01:00
Qi Xiao
eab1e8ec9e
store: Change Cmd method names and return types.
2017-06-02 03:51:23 +01:00
Qi Xiao
106600a7da
Fix misspellings.
2017-05-21 23:57:57 +01:00
Qi Xiao
910610f583
Make golint slightly happier.
2017-05-21 23:54:04 +01:00
Qi Xiao
04571ff31a
Fix go-vet errors.
2017-05-21 23:20:55 +01:00
Qi Xiao
b9735f3940
Run "gofmt -s".
2017-05-21 23:18:24 +01:00
Qi Xiao
6a21a6ac18
Rename store methods.
2017-03-01 01:30:34 +00:00
Qi Xiao
bafd299a94
Add store.Cmd as return type of {Last,First}Cmd.
2017-03-01 01:21:36 +00:00
Qi Xiao
a6bdb0c591
Rename store methods.
2017-03-01 01:14:03 +00:00
Qi Xiao
700b6a836c
Implement (*Store).Cmds with .IterateCmds.
2017-03-01 01:09:32 +00:00
Qi Xiao
3523c830da
Add $le:loc-hidden, a list of directories to be hidden in location mode.
...
This fixes #326 .
2017-02-25 21:08:46 +00:00
Qi Xiao
7da036e187
File renames, preferring dashes.
2017-02-03 20:53:22 -08:00
Qi Xiao
a2fcfcfae3
Remove store.DataDir and store the data dir in Evaler.
2017-01-27 21:25:32 +00:00
Christian Muehlhaeuser
499b2e3f0d
Stick to common SQL syntax conventions ( #305 )
2017-01-11 23:33:19 +00:00
Qi Xiao
d8c187cbdc
Remove database-based history deduplication.
2016-10-16 16:59:44 +08:00
Qi Xiao
ec80bc7a80
Improve performance of $le:history.
...
Slicing and iteration now only costs one database query.
2016-10-13 15:35:33 +08:00
Qi Xiao
89347dfcde
Use only one sqlite connection.
...
This fixes #263 .
2016-10-13 15:27:27 +08:00
Qi Xiao
ea08e1d891
Remove unreachable code.
2016-10-09 23:19:48 +08:00
Qi Xiao
fed66d6fc1
Store schema version and don't upgrade DB if up-to-date.
2016-10-04 00:13:11 +08:00
Qi Xiao
1dae07a181
Use a transactio for adding command; report possible error.
2016-10-03 23:26:05 +08:00
Qi Xiao
1cbeff11b9
Fix test case.
2016-09-19 16:29:30 +02:00
Qi Xiao
a9123a53c6
Don't use SQL "LIKE" for filtering in loc mode.
...
This fixes #218 .
2016-09-19 16:24:16 +02:00
Qi Xiao
69d9984f2e
Change decreasing factor of dir history.
2016-03-11 14:15:55 +01:00
Qi Xiao
1d4494f884
Change algorithm for matching directories in location mode.
2016-03-10 15:15:17 +01:00
Qi Xiao
84a0012b38
Use underscores in filenames.
2016-03-06 19:46:38 +01:00
Qi Xiao
8819c9ebd4
Fix test.
2016-02-29 19:49:21 +01:00
Qi Xiao
c4254581c6
Going by location mode also increases score, but lower.
2016-02-29 19:22:17 +01:00
Qi Xiao
441fe04d37
store: Apply a decay to existing directories when adding a new one.
2016-02-29 19:01:50 +01:00
Qi Xiao
0e0e855fc3
store: Renames.
2016-02-27 19:23:24 +01:00
Qi Xiao
b459c0449d
store: Fix dir_hist.go
2016-02-27 19:22:02 +01:00
Qi Xiao
6e131e8eb3
store: Fix misnomer.
2016-02-27 19:20:47 +01:00
Qi Xiao
81a7646f86
Use subsequence matching in location mode.
2016-02-27 19:18:03 +01:00
Qi Xiao
06b176eafc
store: Reorder dir_hist.go
2016-02-27 18:55:18 +01:00
Qi Xiao
92fb6e5161
Support shared variable.
...
This fixes #15 . Only string is supported ATM.
2016-02-26 04:05:47 +01:00
Qi Xiao
6f21bc690f
Go back to mattn/go-sqlite3.
2016-02-20 03:04:44 +01:00
Qi Xiao
5c03407a8a
Wait for store jobs to finish when exiting.
...
This fixes #144 #147 .
2016-02-20 02:32:12 +01:00
Qi Xiao
098965cfac
Also close the database.
...
Doesn't help with #147 though.
2016-02-20 02:27:26 +01:00
Qi Xiao
3c75e71a8b
Use a fork of mxk/go-sqlite.
2016-02-20 01:47:40 +01:00
Qi Xiao
8cb35dfafc
Fix a NullPointerException.
2016-02-20 01:37:38 +01:00
Qi Xiao
8900e57707
Switch to mxk/go-sqlite for the SQLite3 backend.
...
This one has the advantage of supporting SQLite3-specific operations.
2016-02-20 01:22:22 +01:00