mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-02-19 23:54:33 +08:00
18 lines
348 B
Fish
18 lines
348 B
Fish
function omf.channel.get
|
|
# Check for an environment variable override.
|
|
if set -q OMF_CHANNEL
|
|
echo $OMF_CHANNEL
|
|
return 0
|
|
end
|
|
|
|
# Check the channel file.
|
|
if test -f $OMF_CONFIG/channel
|
|
read -l channel < $OMF_CONFIG/channel
|
|
and echo $channel
|
|
and return 0
|
|
end
|
|
|
|
# Assume 'stable' if not specified.
|
|
echo stable
|
|
end
|