Marc Cornellà
eafa78217d
fix(history): fix history -c
( #12362 )
...
Fixes #12362
2024-04-18 07:12:32 +02:00
Martin Hans
efa8de0b52
fix(history): fix edge cases introduced in #12341 ( #12357 )
2024-04-16 19:38:58 +02:00
MoAlkhateeb
605d76616a
fix(history): revert to old behavior when no args passed ( #12341 )
...
* Fixed a bug in *omz_history* where it would automatically create a file when run with the -p flag
* Reverted old history behaviour while fixing parsing bug
2024-04-09 18:09:26 +02:00
MoAlkhateeb
a8f7f9f707
fix(history)!: fix arg passing to fc
for history
command ( #12338 )
...
BREAKING CHANGE: we have fixed a bug in the `history` wrapper for OMZ which means
that running just history will now not show all the history since the 1st command,
but only recent ones. To get the previous behavior, you can run `history 1` to get
all the command history, or other commands such as `history -30` to get the last
30 commands.
2024-04-09 08:07:57 +02:00
Marc Cornellà
28ed2880c7
Revert "lib: remove share_history"
...
This reverts commit 2376022890
.
Fixes #9430
2020-11-09 12:00:15 +01:00
Marc Cornellà
bad9ee0004
lib: delete zsh session history list
...
NOTE: it still lives somewhere in the current zsh process. Run `fc -P` to
restore it.
2020-10-27 10:33:21 +01:00
Marc Cornellà
2376022890
lib: remove share_history
...
Related: #2537 , #9324
2020-10-10 12:38:17 +02:00
Marco Trevisan
ed4e317bbb
lib: don't override bigger HISTSIZE and SAVEHIST values ( #8993 )
...
oh-my-zsh Changes the HISTSIZE and SAVEHIST values to fixed sizes,
however if a bigger value is set in ~/.zshrc, it will override it,
potentially causing the user history to be deleted.
So, only set these values if no other is set and if it is lower than the
default ones.
2020-06-03 19:34:57 +02:00
Benoit GALATI
fcd0747bc1
core: remove inc_append_history option ( #8048 )
2020-05-21 18:29:00 +02:00
Marc Cornellà
cfdd3c8dd8
Revert "core: enable hist_reduce_blanks"
...
This reverts commit cbd6fbe7a7
.
Fixes #8949
2020-05-20 14:02:42 +02:00
Marc Cornellà
cbd6fbe7a7
core: enable hist_reduce_blanks
...
Fixes #8722
2020-05-16 17:18:20 +02:00
David Remy
62abacebea
lib: fix issues with nounset and parameters used before defined ( #7433 )
2019-04-09 12:58:45 +02:00
Marc Cornellà
5a729f6667
lib: fix history wrapper when passing numbers
...
If a number is passed without explicitly passing `-l`, it will now behave
as if using the history builtin, instead of throwing an error.
2018-09-15 22:56:12 +02:00
Cristian Consonni
d3e3b2dd0d
Add support for custom timestamp format in history ( #6770 )
2018-07-13 13:14:15 +02:00
Marc Cornellà
2589cdd8f9
Increment HISTSIZE to fix hist_expire_dups_first
...
This fixes the old behavior which made it so all duplicates would be
deleted if the command history filled up with unique events.
> You should be sure to set the value of HISTSIZE to a larger number
> than SAVEHIST in order to give you some room for the duplicated
> events, otherwise this option will behave just like HIST_IGNORE_ALL_DUPS
> once the history fills up with unique events.
2018-04-22 15:33:12 +02:00
Marc Cornellà
9f2f22d953
Remove duplicate option append_history
...
The option inc_append_history already has the same effect.
2018-04-22 15:33:11 +02:00
Marc Cornellà
20d63be655
Use zparseopts to get passed arguments
2018-04-22 15:33:10 +02:00
Marc Cornellà
f8180c3a64
Allow overriding -l flag in history
2018-04-22 15:32:30 +02:00
Marc Cornellà
03758416fe
Ensure builtin fc is used (see #3001 )
2018-04-22 15:32:02 +02:00
Marc Cornellà
643bb25a0d
Organize history.zsh file and improve comments
2018-04-22 15:32:02 +02:00
Marc Cornellà
94baa9eadd
Simplify `if' into oneliner, allow spaces in HISTFILE
2018-04-22 15:32:01 +02:00
Marc Cornellà
d87d4331cf
Change history alias into a function
...
This commit changes the history alias into a function which puts
the passed arguments before `-l 1`. It also provides a temporary
workaround to the lack of a `history -c` command in zsh.
For more information see issues 739 and 789.
2018-04-22 15:31:53 +02:00
LFDM
d33b0aae91
Refactors history alias and moves it.
...
More compact case statement instead of the ugly if elif... else
statement. Moves it to history.zsh
2015-02-10 19:22:39 +01:00
Robby Russell
1978a0923c
Revert PR #3359 as this is breaking stuff for many folks. Need to rethink how we handle system defaults differently on this
2014-12-15 08:11:04 -08:00
Joe Block
5bf715787a
Existing code indents with spaces, not tabs, conform.
2014-11-30 17:39:21 -08:00
Joe Block
1ebc98b9ed
Don't clobber HISTSIZE or SAVEHIST if they're already set
2014-11-30 17:37:47 -08:00
Robby Russell
9eacd7d589
Merge pull request #750 from blueyed/history-drop-default-append-history
...
`setopt append_history` is not necessary.
2014-03-22 13:59:19 -07:00
Flavius Aspra
3826c7bf85
allow setting a custom HISTFILE before oh-my-zsh is loaded
2013-03-15 22:07:47 +01:00
Daniel Hahler
98578ec241
setopt append_history
is not necessary.
...
Especially given the inc_append_history option, it is not necessary to
set the (default) append_history option.
2011-12-16 14:21:45 +01:00
Göran Gustafsson
3fc812afc9
Removed duplicate setting and sorted the remaining
2011-12-03 13:18:37 +01:00
James Rowe
edc8e3d092
Ignore commands that start with a space.
...
This is useful when you want to use a dangerous command, as it won't be
available with history searching.
2010-06-05 23:22:57 +08:00
Mike Hostetler
93f9825b79
share history with your zsh's on the same host
2010-05-08 04:23:50 +08:00
James Cox
8a8a7bafa0
merge upstream
2009-09-23 16:14:04 +01:00
Robby Russell
ff545e6934
Bumping up history to 10k commands
2009-09-23 08:07:02 -07:00
Robby Russell
8debd097fb
Moving all zsh config options into a lib/ subdirectory to make way for some upcoming changes to directory structure and configuration options
2009-09-23 07:43:36 -07:00