|
|
A shell script to set Terminal window colors per SSH host
fungus, can you please explain in a little more detail? I'm new to this shell script stuff, and I'm not exactly sure how to change the host=${1:-${0##*/}} line to do what you're talking about (I think that's what you're referring to). Also, I have ~/bin/ in my PATH, but would I have to chmod +x ssh_host.sh?
thanks.
A shell script to set Terminal window colors per SSH host
The script already works that way. It can either take a single argument (the ssh host name), or use the base name of the linked command name. To get your functionality, simply:
% alias ssh ssh_host % ssh hostname By the way, the ".sh" in the name of the downloaded file is just there to ensure the special characters are downloaded correctly. It can safely be stripped, so the script is just called ssh_host. For the interested, host=${1:-${0##*/}} is just shell magic for "use the first argument, unless it isn't set, in which case use the command name, stripped of any leading path". JD |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.08 seconds |
|