mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
aliases: Simplify lookup logic, remove alias-exists hook
This patch simplifies the internal alias lookup logic, unifying it across Resolve and Exists. As part of this, the `alias-exists` hook is removed. It was redundant to begin with, although it enabled a potential optimization, it isn't worth the complexity. The timeout for execution of both was the same. This change should be backwards-compatible because `alias-resolve` is still used, and the semantics haven't changed.
This commit is contained in:
@@ -73,17 +73,3 @@ without emitting any output.
|
||||
|
||||
There is a 5 second timeout for hook execution. If the hook exits with an
|
||||
error, including timeout, delivery will fail.
|
||||
|
||||
|
||||
## Alias exists hook
|
||||
|
||||
When chasquid needs to check whether an alias exists or not, it will run the
|
||||
command at `$config_dir/hooks/alias-exists` (if the file exists).
|
||||
|
||||
The address to check will be passed as the single argument.
|
||||
|
||||
If the commands exits successfuly (exit code 0), then the alias exists; any
|
||||
other exit code signals that the alias does not exist.
|
||||
|
||||
There is a 5 second timeout for hook execution. If the hook times out, the
|
||||
alias will be assumed not to exist.
|
||||
|
||||
Reference in New Issue
Block a user