Bug 746507

Summary: history -r fails
Product: [Fedora] Fedora Reporter: Grégoire Paris <postmaster>
Component: zshAssignee: Dominic Hopf <dmaphy>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: dmaphy, james.antill
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-18 00:52:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Grégoire Paris 2011-10-16 17:39:43 UTC
Description of problem:
I want to change the history depending on what I'm currently working on, so I built a program which change the $HISTFILE variable. It works fine, but I am obliged to open a new terminal for it to be taken into account.
history -r outputs this:
fc: event not found: -r

Version-Release number of selected component (if applicable):
zsh 4.3.11 (x86_64-redhat-linux-gnu)

How reproducible:
Every time

Steps to Reproduce:
1. launch zsh
2. type history -r
  
Actual results:
fc: event not found: -r
new $HISTFILE is not taken into account

Expected results:
no output, and $HISTFILE taken into account

Comment 1 Dominic Hopf 2011-12-17 19:47:37 UTC
Hi Gregoire,

this issue seems to be fixed with a more current version of Zsh. I'm at least not able to reproduce it on F16 with Zsh 4.3.14 from updates-testing. Can you confirm this?

Regards,
Dominic

Comment 2 Grégoire Paris 2011-12-17 20:02:20 UTC
No, it still does not work for me, but the problem seems to go away when I remove my zshrc. I'm going to search what line is responsible for that.

Comment 3 Grégoire Paris 2011-12-17 20:06:27 UTC
It seems that the problem comes from oh-my-zsh, the problem goes away when I don't source this script : https://github.com/robbyrussell/oh-my-zsh/blob/master/oh-my-zsh.sh

Comment 4 Dominic Hopf 2011-12-18 00:52:38 UTC
Well, looks quite clear to me what's happening here. Oh-my-zsh is aliasing history to fc:

    https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/aliases.zsh

You're using a completely other command with that. You could comment out the causing line and maybe consider reporting the issue to the oh-my-zsh author. I hope you are well with closing this bug here. :)

Comment 5 Grégoire Paris 2011-12-18 10:28:47 UTC
Totally well, and thanks for the explanation, I found a similar bug report here: https://github.com/robbyrussell/oh-my-zsh/issues/739 , I referenced this bug report in it.