You are not logged in.

#1 2018-06-26 08:07:42

catnap
Member
Registered: 2016-10-03
Posts: 131

[SOLVED] History program missing in Zsh

I have Arch Linux installed in two computers and they both employ the same shell, Zsh. In the first computer man history produces

history(n)                                                                Tcl Built-In Commands                                                               history(n)

________________________________________________________________________________________________________________________________________________________________________

NAME
       history - Manipulate the history list

SYNOPSIS
       history ?option? ?arg arg ...?

and in the second it produces

HISTORY(3)                                                              Library Functions Manual                                                              HISTORY(3)

NAME
       history - GNU History Library

COPYRIGHT
       The GNU History Library is Copyright (C) 1989-2014 by the Free Software Foundation, Inc.

The second history program behaves as expected but the first does not. Maybe I have accidentally installed a wrong program or I'm missing some important libraries.

Last edited by catnap (2018-06-26 09:51:42)

Offline

#2 2018-06-26 08:17:43

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] History program missing in Zsh

Not an Installation issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-06-26 08:50:53

sincomil
Member
Registered: 2018-02-13
Posts: 118

Re: [SOLVED] History program missing in Zsh

Generally in Arch Zsh is default shell and history command is aliased to 'fc -l 1'
fc is zsh built-in command. If your history command is not working you have to put alias definition on your .zshrc:

alias history='fc -l 1'

Last edited by sincomil (2018-06-26 08:54:30)

Offline

#4 2018-06-26 09:53:47

catnap
Member
Registered: 2016-10-03
Posts: 131

Re: [SOLVED] History program missing in Zsh

sincomil wrote:

Generally in Arch Zsh is default shell and history command is aliased to 'fc -l 1'
fc is zsh built-in command. If your history command is not working you have to put alias definition on your .zshrc:

alias history='fc -l 1'

The solution works. The man pages still look different but the functionality looks the same.

Offline

#5 2018-06-26 10:03:13

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: [SOLVED] History program missing in Zsh

The manpage is different because you have installed tcl on the first computer, but not on the second. If you want to read the gnu manpage, then it is available in the man section 3. The tcl history manpage has a higher section priority, so it is displayed instead if you don't specify the section.

man 3 history

You can list all manpages with a specific title with whatis:

whatis history

Last edited by progandy (2018-06-26 10:06:53)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

Board footer

Powered by FluxBB