mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 07:00:43 +00:00
broot: install bash/zsh/fish files for the br function
- In bash, the user needs to source `br.sh` somewhere. - In zsh, the user needs to `autoload -Uz br` somewhere. - In fish, `br` should just work.
This commit is contained in:
parent
b2b779f680
commit
8770c229e4
|
@ -40,6 +40,18 @@ rustPlatform.buildRustPackage rec {
|
|||
wrapProgram $out/bin/broot \
|
||||
--set BR_INSTALL no
|
||||
|
||||
# Install shell function for bash.
|
||||
$out/bin/broot --print-shell-function bash > br.bash
|
||||
install -Dm0444 -t $out/etc/profile.d br.bash
|
||||
|
||||
# Install shell function for zsh.
|
||||
$out/bin/broot --print-shell-function zsh > br.zsh
|
||||
install -Dm0444 br.zsh $out/share/zsh/site-functions/br
|
||||
|
||||
# Install shell function for fish
|
||||
$out/bin/broot --print-shell-function fish > br.fish
|
||||
install -Dm0444 -t $out/share/fish/vendor_functions.d br.fish
|
||||
|
||||
# install shell completion files
|
||||
OUT_DIR=$releaseDir/build/broot-*/out
|
||||
|
||||
|
|
Loading…
Reference in a new issue