

'(bold green)' will print a symbol ⌘ followed by the content of variable version, with bold text colored green.

'(red bold)' will print a string on with bold text colored red.This can be used to style the first part. In the second part, which is enclosed in a (), is a style string. You can add texts, variables, or even nested text groups in it. The first part, which is enclosed in a, is a format string. '$git_branch $git_commit' has the two variables separated with a space.Ī text group is made up of two different parts.'$git_branch$git_commit' is a format string with two variables named git_branch and git_commit.'$version' is a format string with a variable named version.The name of a variable can only contain letters, numbers and _. # VariableĪ variable contains a $ symbol followed by the name of the variable. You can use texts, variables and text groups in a format string. Most modules have an entry called format that configures the display format of the module. More escaping, newlines in declarations can be ignoredįormat strings are the format that a module prints all its variables with. The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: $ ( ). In TOML syntax, text values (opens new window) are declared with ', ", ''', or """. via in "nodejs") and an empty space as a suffix.

For example, the "version" variable in the "nodejs" module contains the current version of Node.js.īy convention, most modules have a prefix of default terminal color (e.g. Variable: Smaller sub-components that contain information provided by the module. For example, the "nodejs" module shows the version of Node.js that is currently installed on your computer, if your current directory is a Node.js project. Module: A component in the prompt giving information based on contextual information from your OS. setenv ( 'STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp' ) # Terminology That's all there is to it! You should now have functional command autocompletion with your terminal. Once done, run source ~/.zshrc Conclusion Here, all that is needed is adding zsh-autosuggestions to the plugins list, just like I have shown above. For the purposes of this tutorial, I will be using VIM.Īfter navigating down through the file, you should see a plugins section. To enable the plugin, open the file in a text editor of your choice. As indicated by the ~, this file is located within your home directory. Enabling the PluginĪssuming you already have iTerm2 and OhMyZSH already installed, it's simply a matter of altering your ~/.zshrc file. The darker gray text is what ZSH is predicting that I am wanting to type. Rather than having to manually type out each and every hostname, I'm able to simply begin typing the start of the hostname and then press Tab to autocomplete the rest of the hostname An example of tab autocompletion within iTerm2. I find this plugin extremely convenient when trying to ssh to servers within my lab or at work. Today's quick write up will cover my favorite plugin offered for ZSH: command autocompletion. OhMyZSH builds on top of this, offering a plethora of features including plugins. ITerm 2 acts as a no-frills, yet feature rich, terminal for MacOS devices. I have thoroughly enjoyed it but have found that iTerm2 and OhMyZSH have made for excellent additions to my workflow.
#Iterm2 ssh auto login pro
My current workstation setup consists of a 16" M1 Pro MacBook Pro.
