2018-08-12 02:14:46 +08:00
# Installation
Install:
* [Ubuntu ](#ubuntu )
* [Fedora ](#fedorarhelcentos )
* [Gentoo ](#gentoo )
* [CentOS ](#fedorarhelcentos )
* [openSUSE ](#opensuse )
* [RHEL ](#fedorarhelcentos )
* [Debian ](#debianmint )
* [Mint ](#debianmint )
* [Arch Linux ](#arch-linux )
* [Scientific Linux ](#fedorarhelcentos )
* [macOS ](#macos )
Build:
* [build on any Linux distro ](#build-on-any-linux-distro )
2018-08-13 06:09:10 +08:00
* [build snap ](#snap )
2018-08-12 02:14:46 +08:00
* [build on Ubuntu ](#build-on-ubuntu )
* [build on Debian ](#build-on-debian )
* [build on Fedora ](#build-on-fedora )
2018-08-12 05:34:45 +08:00
* [build on Windows Subsystem for Linux (WSL) ](#build-on-wsl )
2018-08-12 02:14:46 +08:00
* [build on Cygwin ](#build-on-cygwin )
2018-08-21 04:22:02 +08:00
* [build on macOS ](#build-on-macos )
2018-08-12 02:14:46 +08:00
Tarball:
* [build and install tarball ](#build-and-install-tarball )
# Install
Install HSTR using a package.
## Ubuntu
Install `hh` on Ubuntu using one-liner:
2015-01-08 05:36:50 +08:00
2016-10-11 14:51:18 +08:00
```bash
sudo add-apt-repository ppa:ultradvorka/ppa & & sudo apt-get update & & sudo apt-get install hh & & hh --show-configuration >> ~/.bashrc
```
2018-08-12 02:14:46 +08:00
2016-10-11 14:51:18 +08:00
... or step by step:
2018-08-12 02:14:46 +08:00
2015-01-08 05:36:50 +08:00
```bash
sudo add-apt-repository ppa:ultradvorka/ppa
sudo apt-get update
sudo apt-get install hh
```
2018-08-21 04:10:07 +08:00
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).
2015-04-26 15:27:43 +08:00
2018-08-12 02:14:46 +08:00
## Fedora/RHEL/Centos
2016-02-17 23:31:52 +08:00
Install `hh` on Fedora, RHEL or CentOS:
2015-04-26 15:27:43 +08:00
```bash
2018-08-12 02:14:46 +08:00
sudo dnf install hstr -y
2015-04-26 15:27:43 +08:00
```
2018-08-12 02:14:46 +08:00
... or:
```bash
sudo yum install hstr -y
```
2018-08-21 04:10:07 +08:00
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).
2015-04-26 15:27:43 +08:00
2018-08-12 02:14:46 +08:00
---
2015-01-08 05:36:50 +08:00
2018-08-12 02:14:46 +08:00
If you want to make sure you have the latest version, then download `.rpm` archive from
[GitHub releases ](https://github.com/dvorka/hstr/releases ) and install it:
2016-01-14 00:53:55 +08:00
```bash
2018-08-12 02:14:46 +08:00
sudo dnf install ./hstr-< major > .< minor > .< revision > -2.x86_64.rpm -y
2016-01-14 00:53:55 +08:00
```
2018-08-12 02:14:46 +08:00
## Debian/Mint
Install `hh` from PPA. Add [my PPA ](http://www.mindforger.com/debian ),
trust [GPG key ](http://www.mindforger.com/gpgpubkey.txt ) and install `hh` :
2016-01-14 00:53:55 +08:00
2015-01-08 05:36:50 +08:00
```bash
2018-08-12 02:14:46 +08:00
# add PPA to APT sources:
sudo echo -e "\ndeb http://www.mindforger.com/debian stretch main" >> /etc/apt/sources.list
2015-01-08 05:36:50 +08:00
2018-08-12 02:14:46 +08:00
# import PPA's GPG key
wget -qO - http://www.mindforger.com/gpgpubkey.txt | sudo apt-key add -
2015-01-08 05:36:50 +08:00
2018-08-12 02:14:46 +08:00
# update sources
sudo apt update
2015-01-08 05:36:50 +08:00
2018-08-12 02:14:46 +08:00
# install MindForger
sudo apt install hstr
2015-01-08 05:36:50 +08:00
```
2018-08-12 02:14:46 +08:00
2018-08-21 04:10:07 +08:00
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).
2015-01-08 05:36:50 +08:00
2018-08-12 02:14:46 +08:00
---
2015-01-08 05:36:50 +08:00
2018-08-12 02:18:00 +08:00
Alternatively you can download and install `.deb` archive from [GitHub releases ](https://github.com/dvorka/hstr/releases )
2018-05-23 16:49:40 +08:00
section of the project:
2018-08-12 02:14:46 +08:00
2018-05-23 16:49:40 +08:00
```bash
2018-08-12 02:14:46 +08:00
dpkg -i hstr_-< major > .< minor > .< revision > _1-amd64.deb
2015-01-08 05:36:50 +08:00
```
2018-08-12 02:14:46 +08:00
## openSUSE
To install `hh` on openSUSE Leap 42.1 run the following commands as root:
2015-01-08 05:36:50 +08:00
```bash
2018-08-12 02:14:46 +08:00
zypper addrepo http://download.opensuse.org/repositories/home:tuw-e184/openSUSE_Leap_42.1/home:tuw-e184.repo
zypper refresh
zypper install hstr
2015-01-08 05:36:50 +08:00
```
2018-08-12 02:14:46 +08:00
2018-08-21 04:10:07 +08:00
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).
2015-01-08 05:36:50 +08:00
2018-08-12 02:14:46 +08:00
## Gentoo
2018-08-21 04:22:02 +08:00
To install `hh` on Gentoo run (HSTR has been added to [Portage ](https://bugs.gentoo.org/show_bug.cgi?id=527122 )):
2015-01-08 05:36:50 +08:00
2018-08-01 05:23:20 +08:00
```bash
2015-08-28 22:36:12 +08:00
emerge app-shells/hstr
```
2017-06-04 04:58:43 +08:00
2018-08-21 04:10:07 +08:00
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).
2015-01-08 05:36:50 +08:00
2018-08-12 02:14:46 +08:00
## Arch Linux
2018-08-21 04:22:02 +08:00
To install HSTR on Arch Linux download latest distribution from [GitHub releases ](https://github.com/dvorka/hstr/releases ).
2015-01-08 05:36:50 +08:00
2018-08-12 02:14:46 +08:00
Use [PKGBUILD ](https://wiki.archlinux.org/index.php/PKGBUILD ) in the root of the distribution to build package using `makepkg` .
2015-01-08 05:36:50 +08:00
2015-02-06 14:18:52 +08:00
https://aur.archlinux.org/packages/hstr-git/
2015-01-08 05:36:50 +08:00
Install `hh` .
2018-08-21 04:10:07 +08:00
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).
2015-01-08 05:36:50 +08:00
2018-08-12 02:14:46 +08:00
## macOS
2018-08-21 04:25:16 +08:00
Install `hh` on macOS using [Homebrew ](http://brew.sh/ ) ([formula](https://formulae.brew.sh/formula/hh)):
2015-02-27 15:48:38 +08:00
```bash
brew install hh
```
2018-08-21 04:10:07 +08:00
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).
2017-06-04 04:58:43 +08:00
2018-08-12 02:14:46 +08:00
# Build
Build HSTR from source code.
2018-08-12 05:11:35 +08:00
2018-08-12 02:14:46 +08:00
## Build on any Linux distro
Clone Git repository:
2017-06-04 04:58:43 +08:00
2017-06-05 12:49:15 +08:00
```bash
git clone https://github.com/dvorka/hstr.git
```
2018-08-12 02:14:46 +08:00
2017-06-05 12:49:15 +08:00
Create build files using:
2018-08-12 02:14:46 +08:00
2017-06-05 12:49:15 +08:00
```bash
2018-08-12 02:14:46 +08:00
cd ./build/tarball & & ./tarball-automake.sh & & cd ../..
2017-06-05 12:49:15 +08:00
```
2018-08-12 02:14:46 +08:00
Build and install `hh` using:
2017-06-05 12:49:15 +08:00
```bash
./configure & & make & & make install
```
2018-08-12 02:14:46 +08:00
Run HSTR:
2017-06-05 12:49:15 +08:00
```bash
2018-08-12 02:14:46 +08:00
hh
2017-06-05 12:49:15 +08:00
```
2018-08-12 02:14:46 +08:00
2018-08-21 04:10:07 +08:00
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).
2017-06-05 12:49:15 +08:00
2018-08-13 06:09:10 +08:00
## Build snap
To build [snap ](https://snapcraft.io/ ) for 'hh' first clone Git repository:
```bash
git clone https://github.com/dvorka/hstr.git
```
Make sure that you can build HSTR from source code
as described in a "Build on ..." section for your
distribution.
Install [snapcraft ](https://snapcraft.io/ ) and build
snap by running snapcraft in the root of Git repository:
```
$ ls ./snap
snapcraft.yaml
$ snapcraft
...
```
Find `hh_0+git..._amd64.snap` in the current directory.
2018-08-12 02:14:46 +08:00
## Build on Ubuntu
To build `hh` on Ubuntu clone Git repository:
```bash
git clone https://github.com/dvorka/hstr.git
```
Install dependencies:
2017-06-05 12:49:15 +08:00
2018-08-12 02:14:46 +08:00
```bash
2018-08-12 05:11:35 +08:00
sudo apt install automake gcc make libncursesw5-dev libreadline-dev
2018-08-12 02:14:46 +08:00
```
Create build files using:
```bash
cd ./build/tarball & & ./tarball-automake.sh & & cd ../..
```
Build and install `hh` using:
```bash
./configure & & make & & make install
```
Run HSTR:
```bash
hh
```
2018-08-21 04:10:07 +08:00
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).
2018-08-12 02:14:46 +08:00
## Build on Debian
2018-08-21 04:22:02 +08:00
To build `hh` on Debian clone Git repository:
2018-08-12 02:14:46 +08:00
```bash
git clone https://github.com/dvorka/hstr.git
```
Install dependencies:
```bash
sudo apt install autotools gcc make libncursesw5-dev libreadline-dev
```
Create build files using:
```bash
cd ./build/tarball & & ./tarball-automake.sh & & cd ../..
```
Build and install `hh` using:
```bash
./configure & & make & & make install
```
Run HSTR:
```bash
hh
```
2018-08-21 04:10:07 +08:00
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).
2018-08-12 02:14:46 +08:00
## Build on Fedora
2018-08-21 04:22:02 +08:00
To build `hh` on Fedora clone Git repository:
2017-06-05 12:49:15 +08:00
2017-06-04 04:58:43 +08:00
```bash
git clone https://github.com/dvorka/hstr.git
```
2018-08-12 02:14:46 +08:00
Install dependencies:
```bash
sudo dnf install autotools ncurses-devel readline-devel
```
2017-06-04 04:58:43 +08:00
Create build files using:
2018-08-12 02:14:46 +08:00
2017-06-04 04:58:43 +08:00
```bash
2018-08-12 02:14:46 +08:00
cd ./build/tarball & & ./tarball-automake.sh & & cd ../..
2017-06-04 04:58:43 +08:00
```
2018-08-12 02:14:46 +08:00
Build and install `hh` using:
2017-06-04 04:58:43 +08:00
```bash
./configure & & make & & make install
```
2018-08-12 02:14:46 +08:00
Run HSTR:
2017-06-04 04:58:43 +08:00
```bash
2018-08-12 02:14:46 +08:00
hh
2017-06-04 04:58:43 +08:00
```
2018-08-12 02:14:46 +08:00
2018-08-21 04:10:07 +08:00
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).
2018-08-12 02:14:46 +08:00
## Build on WSL
2018-08-12 05:32:03 +08:00
To build `hstr` on [Windows Subsystem for Linux (WSL) ](https://msdn.microsoft.com/en-us/commandline/wsl/about ) clone Git repository:
2018-08-12 02:14:46 +08:00
```bash
git clone https://github.com/dvorka/hstr.git
```
2018-08-12 05:05:59 +08:00
Install dependencies:
```bash
2018-08-12 05:11:35 +08:00
sudo apt install automake gcc make libncursesw5-dev libreadline-dev
2018-08-12 05:05:59 +08:00
```
2018-08-12 02:14:46 +08:00
Create build files using:
```bash
cd ./build/tarball & & ./tarball-automake.sh & & cd ../..
```
2018-08-12 05:32:03 +08:00
Build and install `hstr` using:
2018-08-12 02:14:46 +08:00
```bash
./configure & & make & & make install
```
2018-08-12 05:32:03 +08:00
It's **important** to finish installation by configuration of `hstr` binding
2018-08-12 05:34:45 +08:00
which ensures propagation of chosen command to the prompt:
2018-08-12 05:32:03 +08:00
```bash
hstr --show-configuration >> ~/.bashrc
. ~/.bashrc
```
2018-08-13 05:37:33 +08:00
Make sure to **run** `hstr` using < kbd > Ctrl</ kbd >< kbd > r</ kbd > - otherwise commands will not appear in prompt.
2018-08-12 05:32:03 +08:00
2018-08-21 04:10:07 +08:00
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).
2018-08-12 02:14:46 +08:00
2018-08-12 05:32:03 +08:00
2018-08-12 02:14:46 +08:00
## Build on Cygwin
To build `hh` on [Cygwin ](https://www.cygwin.com ) clone Git repository:
```bash
git clone https://github.com/dvorka/hstr.git
```
Create build files using:
```bash
cd ./build/tarball & & ./tarball-automake.sh & & cd ../..
```
Build and install `hh` using:
```bash
./configure & & make & & make install
```
2018-08-21 04:10:07 +08:00
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).
2018-08-21 04:22:02 +08:00
## Build on macOS
HSTR can be built on macOS either using [MacPorts ](https://www.macports.org/ ) or [Homebrew ](https://brew.sh/ ).
---
To build `hh` using [MacPorts ](https://www.macports.org/ ) install `readline` and `ncurses` :
```bash
port install readline
port install ncurses
```
Check `portfile` either on [macports.com ](https://www.macports.org/ports.php?by=name&substr=hstr ) or [GitHub ](https://github.com/macports/macports-ports/blob/master/shells/hstr/Portfile ):
```bash
autoreconf -fvi
./configure CFLAGS=-I/opt/local/include/ LDFLAGS=-L/opt/local/lib
make
```
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).
---
To build `hh` using [Homebrew ](https://brew.sh/ ):
```bash
autoreconf -fvi
./configure CFLAGS=-I$(brew --prefix)/opt/readline/include LDFLAGS=-L$(brew --prefix)/opt/readline/lib
make
```
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).
2018-08-12 02:14:46 +08:00
# Tarball
Download and install HSTR tarball.
## Build and Install Tarball
2018-08-12 02:18:00 +08:00
Download latest tarball from [GitHub releases ](https://github.com/dvorka/hstr/releases ) section.
2018-08-12 02:14:46 +08:00
Expand the archive and install `hh` using:
```bash
./configure & & make & & make install
```
2018-08-21 04:10:07 +08:00
[Configure ](CONFIGURATION.md ) `hh` and check its [man page ](README.md#documentation ).