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:
|
||||
> ```shell
|
||||
> pay-respects nushell [--alias <alias>]
|
||||
> pay-respects nushell --alias [<alias>]
|
||||
> ```
|
||||
|
||||
> Or save it as a file:
|
||||
> ```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:
|
||||
> ```shell
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ pay-respects fish --alias | source
|
|||
"#,
|
||||
manual = "Nushell / PowerShell".bold(),
|
||||
manual_examples = r#"
|
||||
pay-respects nushell
|
||||
pay-respects nushell --alias
|
||||
pay-respects pwsh --alias
|
||||
"#
|
||||
)
|
||||
|
|
|
|||
12
modules.md
12
modules.md
|
|
@ -48,17 +48,16 @@ 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):
|
||||
```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.
|
||||
|
||||
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
|
||||
``#!/bin/sh
|
||||
if [ "$#" -gt 1 ]; then
|
||||
if [ -z "$_PR_LIB" ]; then
|
||||
#!/bin/sh
|
||||
if [ "$#" -gt 1 ] && [ -z "$_PR_LIB" ]; then
|
||||
SHELL=$(basename $SHELL)
|
||||
LIB="/usr/lib/pay-respects"
|
||||
if [ "$SHELL" = "nu" ]; then
|
||||
|
|
@ -68,7 +67,6 @@ if [ "$#" -gt 1 ]; then
|
|||
else
|
||||
echo "export _PR_LIB=$LIB"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
/opt/pay-respects/bin/pay-respects "$@"
|
||||
`
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue