আপনি যদি দেখতে চান যে এই রঙগুলি কেবল ম্যান পৃষ্ঠাগুলি দেখার সময় যুক্ত করা হয় তবে আপনি যা দেখেন তার প্রত্যেকটির জন্য নয় less, আপনার এই ভেরিয়েবলগুলি manআপনার এতে রাখার পরিবর্তে একটি মোড়ক ফাংশনে সেট করা উচিত config.fish।
পুরো প্রক্রিয়াটি এখানে একটি নতুন ফাইল তৈরি করা হয় ~/.config/fish/functions/man.fishএবং এর অভ্যন্তরে একটি ফাংশন সংজ্ঞায়িত করা হয় manযা প্রয়োজনীয় পরিবেশের ভেরিয়েবলগুলি সেট করে, তারপরে মূলটিকে কল manকরে command, যুক্তি দিয়ে ব্যবহার করে $argv।
এটি আমার মোড়ক ফাংশনের সংস্করণ:
~/.config/fish/functions/man.fish
function man --description "wrap the 'man' manual page opener to use color in formatting"
# based on this group of settings and explanation for them:
# http://boredzo.org/blog/archives/2016-08-15/colorized-man-pages-understood-and-customized
# converted to Fish shell syntax thanks to this page:
# http://askubuntu.com/questions/522599/how-to-get-color-man-pages-under-fish-shell/650192
# start of bold:
set -x LESS_TERMCAP_md (set_color --bold red)
# end of all formatting:
set -x LESS_TERMCAP_me (set_color normal)
# start of standout (inverted colors):
#set -x LESS_TERMCAP_so (set_color --reverse)
# end of standout (inverted colors):
#set -x LESS_TERMCAP_se (set_color normal)
# (no change – I like the default)
# start of underline:
#set -x LESS_TERMCAP_us (set_color --underline)
# end of underline:
#set -x LESS_TERMCAP_ue (set_color normal)
# (no change – I like the default)
command man $argv
end