mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
chore: cleanup
This commit is contained in:
parent
657deb44f3
commit
ab1c91fef9
3 changed files with 16 additions and 18 deletions
|
|
@ -42,12 +42,12 @@ Please follow the instruction for your shell:
|
||||||
|
|
||||||
> Add the following output to your configuration file:
|
> Add the following output to your configuration file:
|
||||||
> ```shell
|
> ```shell
|
||||||
> pay-respects nushell [--alias <alias>]
|
> pay-respects nushell --alias [<alias>]
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
> Or save it as a file:
|
> Or save it as a file:
|
||||||
> ```shell
|
> ```shell
|
||||||
> pay-respects nushell [--alias <alias>] | save -f ~/.pay-respects.nu
|
> pay-respects nushell --alias [<alias>] | save -f ~/.pay-respects.nu
|
||||||
> ```
|
> ```
|
||||||
> and source from your config file:
|
> and source from your config file:
|
||||||
> ```shell
|
> ```shell
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ pay-respects fish --alias | source
|
||||||
"#,
|
"#,
|
||||||
manual = "Nushell / PowerShell".bold(),
|
manual = "Nushell / PowerShell".bold(),
|
||||||
manual_examples = r#"
|
manual_examples = r#"
|
||||||
pay-respects nushell
|
pay-respects nushell --alias
|
||||||
pay-respects pwsh --alias
|
pay-respects pwsh --alias
|
||||||
"#
|
"#
|
||||||
)
|
)
|
||||||
|
|
|
||||||
28
modules.md
28
modules.md
|
|
@ -48,27 +48,25 @@ If exposing modules in `PATH` annoys you, you can set the `_PR_LIB` environment
|
||||||
|
|
||||||
Example in a [FHS 3.0 compliant system](https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s06.html):
|
Example in a [FHS 3.0 compliant system](https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s06.html):
|
||||||
```shell
|
```shell
|
||||||
export _PR_LIB="/usr/lib:$HOME/.local/lib"
|
export _PR_LIB="/usr/lib:$HOME/.local/share"
|
||||||
```
|
```
|
||||||
This is not the default as there is no general way to know its value and depends on distribution (`/usr/lib`, `/usr/libexec`, `/data/data/com.termux/files/usr/libexec`, etc.). System programs usually have a hard-coded path looking for `lib`. If you are a package maintainer for a distribution, setting this value when compiling, so it fits into your distribution standard.
|
This is not the default as there is no general way to know its value and depends on distribution (`/usr/lib`, `/usr/libexec`, `/data/data/com.termux/files/usr/libexec`, etc.). System programs usually have a hard-coded path looking for `lib`. If you are a package maintainer for a distribution, setting this value when compiling, so it fits into your distribution standard.
|
||||||
|
|
||||||
If you installed the module with `cargo install`, the binary will be placed in `bin` subdirectory under Cargo's home which should be in the `PATH` anyway. Cargo has no option to place in subdirectories with other names.
|
If you installed the module with `cargo install`, the binary will be placed in `bin` subdirectory under Cargo's home which should be in the `PATH` anyway. Cargo has no option to place in subdirectories with other names.
|
||||||
|
|
||||||
The following snippet is what I have included into Arch Linux package's with workflows binaries, adding a `_PR_LIB` declaration along with initialization. The script is `/usr/bin/pay-respects` and the actual executable is located somewhere else.
|
The following snippet is what I have included into Arch Linux's package with workflows binaries, adding a `_PR_LIB` declaration along with initialization. The script is `/usr/bin/pay-respects` and the actual executable is located somewhere else.
|
||||||
```sh
|
```sh
|
||||||
``#!/bin/sh
|
#!/bin/sh
|
||||||
if [ "$#" -gt 1 ]; then
|
if [ "$#" -gt 1 ] && [ -z "$_PR_LIB" ]; then
|
||||||
if [ -z "$_PR_LIB" ]; then
|
SHELL=$(basename $SHELL)
|
||||||
SHELL=$(basename $SHELL)
|
LIB="/usr/lib/pay-respects"
|
||||||
LIB="/usr/lib/pay-respects"
|
if [ "$SHELL" = "nu" ]; then
|
||||||
if [ "$SHELL" = "nu" ]; then
|
echo "env:_PR_LIB=$LIB"
|
||||||
echo "env:_PR_LIB=$LIB"
|
elif [[ "$SHELL" = "pwsh" ]]; then
|
||||||
elif [[ "$SHELL" = "pwsh" ]]; then
|
echo "\$env:_PR_LIB=\"$LIB\""
|
||||||
echo "\$env:_PR_LIB=\"$LIB\""
|
else
|
||||||
else
|
echo "export _PR_LIB=$LIB"
|
||||||
echo "export _PR_LIB=$LIB"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
/opt/pay-respects/bin/pay-respects "$@"
|
/opt/pay-respects/bin/pay-respects "$@"
|
||||||
`
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue