zsh-users
 help / color / mirror / code / Atom feed
* zsh_history not showing all the entries but some
@ 2018-01-05 22:07 shirish शिरीष
  2018-01-05 22:32 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: shirish शिरीष @ 2018-01-05 22:07 UTC (permalink / raw)
  To: zsh-users

Dear Friends,

I don't know why but .zsh_history only shows a few entries and not all.

    shirish@debian ~ % history
      155  zless changelog.Debian.gz
      156* torbrowser-launcher
      157* apt-cache rdepends libsdl1.2debian
      158* hg clone https://bitbucket.org/allacrost/allacrost
      160  cd Videos
      161  history | grep apg
      162  history | less

This is what is in .zshrc -

    % cat .zshrc
    # Set up the prompt

    autoload -Uz promptinit
    promptinit
    prompt adam1

    setopt histignorealldups sharehistory

    # Use emacs keybindings even if our EDITOR is set to vi
    bindkey -e

    # Keep 10000 lines of history within the shell and save it to
~/.zsh_history:
    HISTSIZE=10000
    SAVEHIST=10000
    HISTFILE=~/.zsh_history

    # Use modern completion system
    autoload -Uz compinit
    compinit

    zstyle ':completion:*' auto-description 'specify: %d'
    zstyle ':completion:*' completer _expand _complete _correct _approximate
    zstyle ':completion:*' format 'Completing %d'
    zstyle ':completion:*' group-name ''
    zstyle ':completion:*' menu select=2
    eval "$(dircolors -b)"
    zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
    zstyle ':completion:*' list-colors ''
    zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or
the character to insert%s
    zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}'
'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
    zstyle ':completion:*' menu select=long
    zstyle ':completion:*' select-prompt %SScrolling active: current
selection at %p%s
    zstyle ':completion:*' use-compctl false
    zstyle ':completion:*' verbose true

    zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b)
#([0-9]#)*=0=01;31'
    zstyle ':completion:*:kill:*' command 'ps -u $USER -o
pid,%cpu,tty,cputime,cmd'

I do have several tabs of the VTE (Virtual Terminal Emulator) or zsh
open. Maybe I'm missing a trick or something.

Except for the change in number of entries to be kept on record, all
others the default values.

I am on Debian testing and using zsh version -

    % zsh --version
    zsh 5.4.2 (x86_64-debian-linux-gnu)

     ~ % ls -l ~/.zsh_history
    -rw------- 1 shirish shirish 6451 Jan  5 20:59 /home/shirish/.zsh_history

This is on Debian buster aka testing.

-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
EB80 462B 08E1 A0DE A73A  2C2F 9F3D C7A4 E1C4 D2D8


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: zsh_history not showing all the entries but some
  2018-01-05 22:07 zsh_history not showing all the entries but some shirish शिरीष
@ 2018-01-05 22:32 ` Bart Schaefer
  2018-01-05 23:13   ` shirish शिरीष
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2018-01-05 22:32 UTC (permalink / raw)
  To: shirish शिरीष; +Cc: Zsh Users

On Fri, Jan 5, 2018 at 2:07 PM, shirish शिरीष <shirishag75@gmail.com> wrote:
>
> I don't know why but .zsh_history only shows a few entries and not all.
>
>     shirish@debian ~ % history

       history
              Same as fc -l.

       fc -l [ -nrdfEiD ] [ -t timefmt ] [ -m match ]
             [ old=new ... ] [ first [ last ] ]

              If first is not specified, it will be set to -1 (the most recent
              event), or to -16 if the -l flag is given.  If last is not spec-
              ified,  it  will  be  set  to  first, or to -1 if the -l flag is
              given.

So you should be seeing the 16 most recent entries, minus any that are
duplicates (because you have histignorealldups set).

Note that first and last are relative to the pre-assigned history
event numbers, not applied to a count of entries.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: zsh_history not showing all the entries but some
  2018-01-05 22:32 ` Bart Schaefer
@ 2018-01-05 23:13   ` shirish शिरीष
  0 siblings, 0 replies; 3+ messages in thread
From: shirish शिरीष @ 2018-01-05 23:13 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Zsh Users

at bottom :-

On 05/01/2018, Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Fri, Jan 5, 2018 at 2:07 PM, shirish शिरीष <shirishag75@gmail.com>
> wrote:
>>
>> I don't know why but .zsh_history only shows a few entries and not all.
>>
>>     shirish@debian ~ % history
>
>        history
>               Same as fc -l.
>
>        fc -l [ -nrdfEiD ] [ -t timefmt ] [ -m match ]
>              [ old=new ... ] [ first [ last ] ]
>
>               If first is not specified, it will be set to -1 (the most
> recent
>               event), or to -16 if the -l flag is given.  If last is not
> spec-
>               ified,  it  will  be  set  to  first, or to -1 if the -l flag
> is
>               given.
>
> So you should be seeing the 16 most recent entries, minus any that are
> duplicates (because you have histignorealldups set).
>
> Note that first and last are relative to the pre-assigned history
> event numbers, not applied to a count of entries.
>

Thank you bart for answering fast.

oh, that was the default thing, just saw
https://superuser.com/questions/519596/share-history-in-multiple-zsh-shell
which explains what is happening.

I just used unsetopt histignorealldups

and not it works, thank you

I still have yet to find out the other default values, maybe need to
change those too.

-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
EB80 462B 08E1 A0DE A73A  2C2F 9F3D C7A4 E1C4 D2D8


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-05 23:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-05 22:07 zsh_history not showing all the entries but some shirish शिरीष
2018-01-05 22:32 ` Bart Schaefer
2018-01-05 23:13   ` shirish शिरीष

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).