Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lib.sh
- ```
- shopt -s expand_aliases
- function my.func()
- {
- echo "Hello, world!"
- }
- alias mf='my.func'
- ```
- run.sh
- ```
- #!/usr/bin/env bash
- shopt -s expand_aliases
- source lib.sh
- my.func
- bash --noprofile --norc -ci "source lib.sh; mf"
- ```
- output of run.sh
- ```
- Hello, world!
- bash: mf: command not found
- ```
Advertisement
Add Comment
Please, Sign In to add comment