Created
December 27, 2017 03:09
-
-
Save ryotako/4dda7e86fe209ecc945a0a23d8afb75e to your computer and use it in GitHub Desktop.
p.fish
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
p is a function with definition | |
# Defined in /Users/Ryota/.config/fish/functions/p.fish @ line 1 | |
function p --no-scope-shadowing | |
# | |
# use any variables except for `argv` | |
# | |
if set -q argv[1] | |
set_color red | |
if test $argv[1] = argv | |
set -e argv | |
echo "argv: $argv" | |
else | |
echo "$argv[1]: $$argv[1]" | |
set -e argv[1] | |
end | |
set_color normal | |
# p $argv | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment