Skip to content

Instantly share code, notes, and snippets.

@ryotako
Created December 27, 2017 03:09
Show Gist options
  • Save ryotako/4dda7e86fe209ecc945a0a23d8afb75e to your computer and use it in GitHub Desktop.
Save ryotako/4dda7e86fe209ecc945a0a23d8afb75e to your computer and use it in GitHub Desktop.
p.fish
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