mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-17 09:26:08 +00:00
18 lines
494 B
Fish
18 lines
494 B
Fish
function omf_query_env
|
|
function __omf_print_pretty_path -a path
|
|
printf "%s\n" $path \
|
|
| sed "s|$HOME|"(omf::em)"~"(omf::off)"|g" \
|
|
| sed "s|/|"(omf::em)"/"(omf::off)"|g"
|
|
end
|
|
if not set -q argv[1]
|
|
for var in (set)
|
|
echo (omf::dim)(echo $var | awk '{ printf $1"\n"; }')(omf::off)
|
|
echo (omf::em)(__omf_print_pretty_path (echo $var | awk '{$1=""; print $0}'))(omf::off)
|
|
end
|
|
else
|
|
for key in $$argv[1]
|
|
__omf_print_pretty_path $key
|
|
end
|
|
end
|
|
end
|