Hey: Difference between revisions

Jump to navigation Jump to search
792 bytes added ,  15 December 2006
Line 123: Line 123:




Here is an example of a hey syntax using some of these parameters.
Here's an example of a hey syntax using some of these parameters.


hey -t "DCUNS HELPDESK" -b "o--||++++" -p "Helping %u -- " skyhawk                                                            
undone@murphy (~) -> hey -t "Hello" -b " ::  [][]" -p "%u >> " joe5ie                                                            
Helping skyhawk -- How Can I help you?
joe5ie >> Hey joe5ie, I've always wondered, what's with that username?
Helping skyhawk --
joe5ie >> I mean, you've gotta admit it's kinda weird...
skyhawk is logged on more than one place. Using (pts/50).
joe5ie >>
hey: skyhawk - groovy
hey: joe5ie - groovy


Most of these extra options are very self explanatory and are elaborated upon by typing man hey into your terminal
and this creates:


Shell Settings
        [::::::::::::::::::::::::::: Hello ::::::::::::::::::::::::::::]
          Hey joe5ie, I've always wondered, what's with that username?
          I mean, you've gotta admit it's kinda weird...
        [::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::]


You may be saying to yourself I dont want to type all those options every time i want to send a hey. Never fear there is an easy solution.
Try experimenting some more with a few of these commands. If you have any problems, just ask a member of Helpdesk. You can also get more info on these commands by typing "man hey" into your terminal.


You can create shell aliases, similiar to shortcuts in windows that allow you to type a single short command which you can set to run a longer command e.g a full hey syntax
=== Saving your settings ===


alias hawk='hey -t "DCUNS HELPDESK" -b "o--||++++" -p "Helping %u >> " skyhawk'
If you've come up with a nice hey border, or some settings that you'd like to use every time you send a hey, then you can set these up as defaults.


The above line would then allow you to simply type hawk and it will send a hey with the defined hey settings.
By changing some of your shell variables, you can make it so that all of your settings, like the border and title, will be in place every time you just type "hey username". To change those variables you'll have to edit your .rc file. The default shell on Redbrick is zsh, so you'll most likely be editing a file called ".zshrc". It's located in your home directory, so open the file by typing:


To add an alias you must edit your .zshrc file. to do this type nano ~/.zshrc. Then add the alias you want and hit ctrl and x to save and y to accept the changes.
nano ~/.zshrc


Now to activate the change type source ~/.zshrc
Now you can add some of the following lines to the file, changing them to suit your needs.


The above works fine for shortcuts to specific users, but lets say you want to change the look of the hey you send when you simply type hey username. This can also be done with some shell variables
export HEY_TITLE="Hello"
export HEY_BORDERS=" ::  [][]"
export HEY_WRAP=90
export HEY_SUCCESS="groovy"
export HEY_PROMPT="%u >> "


Add the following to yout .zshrc file in the same manner as above, editing them to suit your needs
When you're done editing the file, press ctrl and x to save and then press y to accept the changes you've made. You can activate the changes by typing:


export HEY_TITLE="HELPDESK"
source ~/.zshrc
export HEY_BORDERS="o--||++++"
export HEY_WRAP=90
export HEY_SUCCESS="groovy"
export HEY_PROMPT="%u >> "


Once again type source ~/.zshrc to activate the changes
If you have any problems with this, or make a mistake when editing your .zshrc file, just talk to Helpdesk and we'll help you out. You can also create shell aliases, which allow you to run a long command through a much shorter one. Try adding a line like this to your .zshrc file in the same way as above.


The main method of getting used to heying is to do a lot of it until you get used to it or send a hey to a member of the helpdesk team. Happy Heying
alias joe='hey -t "Hello" -b " :: [][]" -p " %u >> " undone'
 
So now when you save and source the .zshrc file again, you'll start a hey with those settings every time you type "joe" at the command prompt. Doing this will allow you to have specific hey settings for any individual user you want.
 
Now that you've learned all this, it's time to get heying! Of course, if you have anything you else you'd like to know about heying, just ask a member of helpdesk.
496

edits

Navigation menu