Manual A1 Installation - akinomyoga/ble.sh GitHub Wiki
[ 日本語 | English ] ≫ Manual [§1 Intro | §2 Color | §3 Bind | §4 Edit | §5 Emacs | §6 Vim | §7 Comp | §8 Misc | Index]
Arch Linux (AUR)†
# With makepkg
git clone https://aur.archlinux.org/blesh-git.git
cd blesh-git
makepkg -fsi
# With yay
yay -S blesh-git
# With paru
paru -S blesh-git
# With pacaur
pacaur -S blesh-git
# With pikaur
pikaur -S blesh-git
# With pakku
pakku -S blesh-git
# With yaourt
yaourt -S blesh-git
# With aurman
aurman -S blesh-git
# With trizen
trizen -S blesh-git
# With aura
sudo aura -Ax blesh-git
# With makepkg
git clone https://aur.archlinux.org/blesh.git
cd blesh
makepkg -fsi
# With yay
yay -S blesh
# With paru
paru -S blesh
# With pacaur
pacaur -S blesh
# With pikaur
pikaur -S blesh
# With pakku
pakku -S blesh
# With yaourt
yaourt -S blesh
# With aurman
aurman -S blesh
# With trizen
trizen -S blesh
# With aura
sudo aura -A blesh
Nix (nixpkgs) - blesh†
There are many ways to install blesh in Nix: via a temporary Nix shell, via Home Manager, in NixOS via configuration.nix
, and more.
Choose your favorite!
In addition to installation, the user must configure ble.sh
in ~/.bashrc
, where the user can use the blesh-share
executable provided by the blesh
package. blesh-share
prints the directory path in which ble.sh
is installed.
# ~/.bashrc
source "$(blesh-share)"/ble.sh --attach=none # does not work currently
...
[[ ! ${BLE_VERSION-} ]] || ble-attach
Tip
The above config can be skipped if it is added in Home Manager instead.
Use nix-shell
to try blesh in a temporary shell:
$ nix-shell -p blesh
Make sure to restart bash from within the new Nix shell:
$ bash
Note that these instructions are written in Flake syntax, though they will likely work without Flakes if the syntax is changed accordingly.
Add the following to configuration.nix
:
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
blesh
];
}
Option 3: Install with home-manager
Note that these instructions are written in Flake syntax, though they will likely work without Flakes if the syntax is changed accordingly.
Add the following to home.nix
:
{pkgs, ...}: {
home.packages = with pkgs; [
blesh
];
programs.bash = {
enable = true;
bashrcExtra = ''
[[ $- == *i* ]] && source "$(blesh-share)"/ble.sh --noattach
...
[[ ! ''${BLE_VERSION-} ]] || ble-attach
'';
};
}
[ToDo: Waiting for home-manager#3238 to be merged]
Home-manager automatically configures ble.sh. The minimum configuration is as follows:
{pkgs, ...}: {
programs.bash.enable = true;
programs.blesh.enable = true;
}
You can configure ble.sh options in a manner of home-manager:
{pkgs, ...}: {
programs.blesh = {
enable = true;
options = {
prompt_ps1_transient = "trim:same-dir";
prompt_ruler = "empty-line";
};
blercExtra = ''
function my/complete-load-hook {
bleopt complete_auto_history=
bleopt complete_ambiguous=
bleopt complete_menu_maxlines=10
};
blehook/eval-after-load complete my/complete-load-hook
'';
};
}
See home-manager's documentation for any other options available.
You can also use nix-env
to install blesh.
Warning
Using nix-env permanently modifies a local profile of installed packages. This must be updated and maintained by the user in the same way as with a traditional package manager, foregoing many of the benefits that make Nix uniquely powerful. Using a temporary Nix shell or a Home Manager or NixOS configuration is recommended instead.
$ nix-env -iA nixos.blesh
With Flakes:
$ nix profile install nixpkgs#blesh
Without Flakes:
$ nix-env -iA nixpkgs.blesh
[ 日本語 | English ] ≫ Manual [§1 Intro | §2 Color | §3 Bind | §4 Edit | §5 Emacs | §6 Vim | §7 Comp | §8 Misc | Index]