Commit graph

42 commits

Author SHA1 Message Date
ridiculousfish
c3ef23b10f Support for a "pending item" in history.
Before running a command, we add the command to history, so
that if the command causes us to exit it's still captured in
history. But that command should not be considered part of
history when expanding the history within the command itself.
For example, `echo $history[1]` should be the previously
run command, not `echo $history[1]` itself.

Fixes #2028
2015-04-20 02:04:17 -07:00
ridiculousfish
7ac593273e Remove a bunch of dead code identified by cppcheck 2014-10-31 01:15:50 -07:00
ridiculousfish
52ae5f885e Improve history robustness against corrupt files
Fixes #1581
2014-07-29 14:42:03 -07:00
ridiculousfish
e9f870e25a Add support for history --merge to incorporate history changes from
other sessions.

Fixes #825
2014-07-25 10:49:12 -07:00
ridiculousfish
0d3169ef70 Run restyle.sh to enforce style rules. 2014-03-31 10:01:39 -07:00
ridiculousfish
aa1b065dd1 Allow appending path hints to history items after they have been added,
allowing us to avoid the delay before items appear in history. Should
fix #984
2014-03-28 23:22:03 -07:00
ridiculousfish
53814983ff Update style and formatting to conform to fish style guide. 2014-01-15 01:40:40 -08:00
ridiculousfish
c6eef16664 Autosuggestion adoption of new parser 2013-10-08 15:05:30 -07:00
ridiculousfish
3e69e5b082 Large set of changes to improve history atomicity on filesystems that do not support locking
Should address https://github.com/fish-shell/fish-shell/issues/685
2013-04-27 15:21:14 -07:00
ridiculousfish
40ec2303ff Make fish try to detect when it's an orphaned process and then exit politely
Fixes https://github.com/fish-shell/fish-shell/issues/422
2012-12-05 13:33:07 -08:00
ridiculousfish
19eddddcff Fix for issue where history file would be read immediately on launch 2012-12-04 16:00:35 -08:00
ridiculousfish
b9283d48b5 Added a history speed test
Profile driven caching of config directory
Style fixes
2012-12-03 02:25:08 -08:00
ridiculousfish
33fc5c99ea Fix for a long standing race where multiple shells can overwrite each others' .tmp files, and lose history.
Added a long description of the incremental history strategy
Fixes https://github.com/fish-shell/fish-shell/issues/371
2012-12-03 01:53:52 -08:00
ridiculousfish
02f16e90b6 Turn on incremental history saving (cross your fingers) 2012-12-03 00:14:22 -08:00
ridiculousfish
984a498063 More work towards incremental history. Added some tests. 2012-12-02 23:38:38 -08:00
ridiculousfish
c1b51c6530 First attempt towards supporting incremental history writes 2012-12-02 16:39:35 -08:00
ridiculousfish
9992b8eb0e Apply new indentation, brace, and whitespace style 2012-11-18 16:30:30 -08:00
Łukasz Niemier
47df1ae40a Remove trailing whitespaces and change tabs to spaces 2012-11-18 11:23:22 +01:00
ridiculousfish
62c49f13ce Switch from std::list to std::vector in a few places to reduce compiled code size 2012-07-24 22:32:11 -07:00
ridiculousfish
d06d6c6964 Various changes to reduce fish's compiled code size
OS X release build executable size dropped from 672k to 511k
2012-07-17 12:47:01 -07:00
ridiculousfish
6f0b00f983 Fix for https://github.com/fish-shell/fish-shell/issues/66
Make fish import .bash_history if regular history is not found
2012-07-09 22:54:08 -07:00
ridiculousfish
18f04adccb Support for importing fish 1.x's history and format, and also bash 2012-06-15 16:24:05 -07:00
Siteshwar Vashisht
ec34f2527a Adding history builtin 2012-06-05 09:54:42 +05:30
ridiculousfish
0bc644abf0 Fix lots of bugs related to the static analyzer
Improved how screen.cpp interacts with output_set_writer()
2012-03-26 01:21:10 -07:00
ridiculousfish
1a87f44325 Re-implement $history variable
Added -L option to set to mean "don't abbreviate"
2012-03-19 11:52:18 -07:00
ridiculousfish
191221eec5 Final cleanup of io_data_t now that I recognize the bizarre way in which it shares output buffers (not sure how this ever worked before) 2012-03-04 02:35:30 -08:00
ridiculousfish
baa813c46f Fix for history being saved too often 2012-03-03 23:10:15 -08:00
ridiculousfish
fd4df6f9bb Changed iterators from iter++ to ++iter
Large set of changes to history to ensure that histories from other sessions don't "bleed" into the current session
2012-03-01 14:56:34 -08:00
ridiculousfish
a08450bcb6 Changes to make autosuggestion smarter about not suggesting commands that could never succeed. 2012-02-16 00:24:27 -08:00
ridiculousfish
a92d9d442b Initial work towards making autosuggestion smarter by recognizing paths 2012-02-15 11:33:41 -08:00
ridiculousfish
27f2859258 Make history searching skip the autosuggestion 2012-02-06 11:52:24 -08:00
ridiculousfish
067dff8489 Initial stab at autosuggestions 2012-02-06 10:52:13 -08:00
ridiculousfish
b14683200a Change the history so that when you go forwards, it no longer highlights 2012-02-05 23:22:18 -08:00
ridiculousfish
00ad837eb4 Final cleanup of history 2012-02-05 22:30:42 -08:00
ridiculousfish
9ab54030b9 Moved LRU to its own file 2012-02-05 20:54:41 -08:00
ridiculousfish
5ad6849d4e Work on new history implementation 2012-02-05 16:42:24 -08:00
ridiculousfish
8d2f107d61 Some changes to migrate towards C++ and a multithreaded model 2011-12-26 19:18:46 -08:00
Grissiom
c6372a1b3f remove trailing spaces
This is done by `sed -i -e 's/[ \t]*$//' *.[c,h]`, which should not
introduce any functionality change.
2010-09-18 09:51:16 +08:00
axel
9dc1a7d5e9 Rewritten history implementation - uses mmap to save lots of memory and also allows incremental saving. The history is autosaved every five minutes and every five added entries
darcs-hash:20061020223649-ac50b-5e3e2c1e395feec0f5ac457149639f68d52d40f0.gz
2006-10-21 08:36:49 +10:00
axel
cf3d30d4e4 Lazily load history file
darcs-hash:20060206150810-ac50b-f4e5fe9312aa898fa025d2874444c4fc5724c309.gz
2006-02-07 01:08:10 +10:00
James Vega
e27664b13b Add header guards to the header files.
darcs-hash:20051004151139-35ec8-7af69b9d7647d145dc621f7eaea726e729cff554.gz
2005-10-05 01:11:39 +10:00
axel
149594f974 Initial revision
darcs-hash:20050920132639-ac50b-fa3b476891e1f5f67207cf4cc7bf623834cc5edc.gz
2005-09-20 23:26:39 +10:00