Is it possible to work with only specific environment?
noraworld opened this issue · 3 comments
noraworld commented
Is it possible to work with only specific environment? For instance: A certain abbreviation only works with macOS, but doesn’t work with Linux.
If not, I was wondering if you could implement this feature because I have abbreviations I would like to work with only on macOS. 🙏
Ryooooooga commented
@noraworld
Added if:
clause to abbrevs
#3:
abbrevs:
- name: chrome
abbr: chrome
snippet: open -a 'Google Chrome'
if: '[[ "$OSTYPE" =~ darwin ]]' # only available in macOS
noraworld commented
Thank you for your reply.
Oh that's nice 👍 I will give it a try later.
noraworld commented
I have confirmed it works successfully.
Thank you for letting me know. 🙏