Menu

#139 Zsh not detected & wrong configuration generated

open
nobody
bug (46)
2015-04-03
2015-03-26
Anonymous
No

Originally created by: fabiantheblind
Originally owned by: dvorka

When adding the configuration to my .zshrc like this:

hh --show-configuration >> ~/.zshrc

It throughs the following errors when sourcing the .zshrc

/PATH/TO/MY/HOMEDIR/.zshrc:199: command not found: shopt
/PATH/TO/MY/HOMEDIR/.zshrc:205: command not found: bind

Discussion

  • Anonymous

    Anonymous - 2015-04-03

    Originally posted by: dvorka

    It seems like an incorrect zsh detection. Can you please run just hh --show-configuration and add it as a comment to this bug? Thanks!

     
  • Anonymous

    Anonymous - 2015-04-03

    Originally posted by: fabiantheblind

    Of course:

    > $ hh --show-configuration
    
    # add this configuration to ~/.bashrc
    export HH_CONFIG=hicolor         # get more colors
    shopt -s histappend              # append new history items to .bash_history
    export HISTCONTROL=ignorespace   # leading space hides commands from history
    export HISTFILESIZE=10000        # increase history file size (default is 500)
    export HISTSIZE=${HISTFILESIZE}  # increase history size (default is 500)
    export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}"   # mem/file sync
    # if this is interactive shell, then bind hh to Ctrl-r
    if [[ $- =~ .*i.* ]]; then bind '"\C-r": "\C-a hh \C-j"'; fi
    
     
  • Anonymous

    Anonymous - 2015-04-03

    Originally posted by: dvorka

    Thank you! Unfortunately didn't detect zsh and therefore it provided Bash configuration instead :-(

    Can you share hh --version please?

    To manually fix the problem please remove the block you just sent to this bug from your `~/.zshrc (which I guess you already did) and use:

    bindkey -s "\C-r" "\eqhh\n"
    export HH_CONFIG=hicolor
    export HISTFILE=~/.zsh_history
    

    to bind hh to ctrl-r, get colors and let zsh to store history into (expected) file. Details can be found in the documentation. My apologies for the problems.

    I will re-add the option that is able to produce zsh configuration + improve zsh detection method.

     
  • Anonymous

    Anonymous - 2015-04-03

    Originally posted by: fabiantheblind

    > $ hh --version
    hh version "1.15"
       build   "Jan 23 2015 09:31:50"
    

    My apologies for the problems.

    No need to apologize. It's a great project. Thanks for the help.

     

Log in to post a comment.