Remove shell alias example from README

This commit is contained in:
David Peter
2026-10-02 10:45:59 +02:00
parent 09f02e4f59
commit 148632c5f9
+2 -5
View File
@@ -108,7 +108,7 @@ hyperfine -N 'grep TODO /home/user'
```
### Shell functions and aliases
### Shell functions
If you are using bash, you can export shell functions to directly benchmark them with hyperfine:
@@ -118,13 +118,10 @@ export -f my_function
hyperfine --shell=bash my_function
```
Otherwise, inline them into or source them from the benchmarked program:
Otherwise, inline the function into the benchmarked command:
```sh
hyperfine 'my_function() { sleep 1; }; my_function'
echo 'alias my_alias="sleep 1"' > /tmp/my_alias.sh
hyperfine '. /tmp/my_alias.sh; my_alias'
```
### Exporting results