mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-11 07:10:29 +00:00
20ed43983b
Having a clear namespace `omf.` improves the readability of the code as we clarify what is the function name and what is the namespace.
19 lines
495 B
Fish
19 lines
495 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
|