Created
September 22, 2014 14:49
-
-
Save rjminsha/d3bc496f01f6221ec0a1 to your computer and use it in GitHub Desktop.
Sets the name of the terminal in MacOS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #******************************************************************************** | |
| # Copyright 2014 IBM | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| #******************************************************************************** | |
| # Sets name of the maxOS terminal | |
| usage() | |
| { | |
| echo "Usage: `basename $0` nameOfWindow" | |
| echo "" | |
| echo "Sets the name of the terminal window on your mac" | |
| echo "" | |
| } | |
| if [ "$#" == "1" ]; then | |
| echo "setting name of tab to $1" | |
| echo -n -e "\033]0;$1\007" | |
| else | |
| echo "incorrect arguments" | |
| usage | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment