Last active
August 20, 2021 19:34
-
-
Save yuya-takeyama/3963c64af6be037c277e to your computer and use it in GitHub Desktop.
peco で PHP のビルトイン関数の引数定義見るヤツ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
selected_function=$(php -r '$fs=get_defined_functions();echo join(PHP_EOL, $fs["internal"]), PHP_EOL;' | sort | peco) | |
if [ -n "$selected_function" ]; then | |
php --rf "$selected_function" | |
exit 0 | |
else | |
echo "No function is selected" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment