Hacker News new | ask | show | jobs
by dzhiurgis 2307 days ago
I love iTerm!

I've wondered whether it's possible to setup profile-specific (or folder-specific) aliases? I understand it might be zsh feature that I'm really after, but perhaps iTerm can solve it too?

2 comments

Profile-specific aliases are easy.

In your .zshrc (or .bashrc), just use the value of $ITERM_PROFILE to set (or source a file containing) the aliases you want:

[[ $ITERM_PROFILE == “AWS” ]] && source ~/.aliases.aws

I think you'll have to look into some scripting then; what you could do is create your aliases for each profile in a separate folder, then use the 'Send text at start' profile to just do a `source ~/profiles/1/aliases.sh` or something to that effect.