Add section concerning aliases, shell functions

closes #870
This commit is contained in:
David Peter 2021-11-14 16:21:24 +01:00
parent 828649a30d
commit 690976380d
1 changed files with 8 additions and 0 deletions

View File

@ -418,6 +418,14 @@ use a character class with a single hyphen character:
> fd '[-]pattern'
```
### "Command not found" for `alias`es or shell functions
Shell `alias`es and shell functions can not be used for command execution via `fd -x` or
`fd -X`. In `zsh`, you can make the alias global via `alias -g myalias="…"`. In `bash`,
you can use `export -f my_function` to make available to child processes. You would still
need to call `fd -x bash -c 'my_function "$1"' bash`. For other use cases or shells, use
a (temporary) shell script.
## Integration with other programs
### Using fd with `fzf`