Настройка Bash делает меня не иметь историю в Zsh - PullRequest
0 голосов
/ 04 апреля 2019

Я пробую zsh, но это довольно ужасно, так как у меня нет истории вообще (ну, 1 единственная строка).Что в моей настройке bash вызывает это - при условии, что некоторые переменные являются общими?В качестве альтернативы, что мне нужно сделать?

$ cd dotfiles;ag HIST
common-setup/bashrc
113:export HISTFILESIZE=
114:export HISTSIZE=
115:export HISTTIMEFORMAT="[%F %T] "
118:export HISTFILE=~/.bash_eternal_history
125:export HISTCONTROL=ignoredups

Вся моя конфигурация zsh из моих точечных файлов :

# Keybindings, like the readline bindings
bindkey \^U backward-kill-line
bindkey \^K kill-line


# Zsh plugin manager (handles oh-my-zsh, etc)
# https://github.com/zplug/zplug
if [ -e ~/.zplug/init.zsh ]; then
    source ~/.zplug/init.zsh
fi

##################################################
## Based on zplug Example section
## https://github.com/zplug/zplug#example
##################################################

# Async for zsh, used by pure
zplug "mafredri/zsh-async", from:github, defer:0
# Load completion library for those sweet [tab] squares
#zplug "lib/completion", from:oh-my-zsh
zplug "plugin/z", from:oh-my-zsh

# Syntax highlighting for commands, load last
zplug "zsh-users/zsh-syntax-highlighting", from:github, defer:3
# Theme!
zplug "sindresorhus/pure", use:pure.zsh, from:github, as:theme

# Install plugins if there are plugins that have not been installed
if ! zplug check --verbose; then
    printf "Install? [y/N]: "
    if read -q; then
        echo; zplug install
    fi
fi

# Then, source plugins and add commands to $PATH
zplug load --verbose

edit: это может быть общая историяфайл?Я попытался установить HISTFILE=~/.zsh-history в начале .zshrc без видимого эффекта.

Также попытался добавить:

export HISTFILE=~/.zsh_history
export HISTSIZE=100000 # can't be unset, like in bash

# Appends every command to the history file once it is executed
setopt inc_append_history
# Reloads the history whenever you use it
setopt share_history

Тем не менее, каждый раз, когда я выполняю zsh из bashсеанс, история пуста.

1 Ответ

0 голосов
/ 05 апреля 2019

Недостающий кусок был SAVEHIST:

export SAVEHIST=100000

Нашел подсказку здесь

...