Yes, we all know how to alias stuff in /etc/profile or ~/.bashrc or whatever. Some favorites of (seemingly) everyone are:

Code:

alias ls='ls --color'
alias sl='ls --color'

The list is brief, but that's where the rest of this thread comes into play: What are some quick little console (if you want X-tricks, start another thread, please!) tricks that you employ?

Here are some of mine:
script called "remote" that can optionally take in an argument. If there is an argument, it's a nickname for an ssh server. If there is no argument, list the predefined ssh servers and pick from the menu. This is useful if you like to forward ports often.
alias rm='rm -f' I'm feeling lucky

I guess that's just about it. I also run my console at 1024x768 resolution with 8-bit color, which gives me a LOT more room to work, in addition to being purtier. If you haven't noticed, the left and right windows keys on your keyboard will change you to the virtual terminal to the left and right of your current one. Nice.

there is no such function in grub and there are just two "halfway methods" which work ... well just half the way ...

1. is to use multiple menu.lst files and a shellscript which exchanges the config files (which is pretty easy to implement)

2. use a shellscript which changes the "default"-parameter in the menu.lst file using sed (imho the nicer way). this shellscript should reset the menu.lst to the real default when called without parameters and you could add it to /etc/conf.d/localstart to change the parameter back to default automatically on next linuxboot ...

sure you'll see why this is only a halfway solution ...

[edit: ... just filed a feature request at their bugzilla]_________________A mathematician is a machine for turning coffee into theorems. ~ Alfred Renyi (*1921 - †1970)

Last edited by rojaro on Wed Sep 18, 2002 8:37 pm; edited 1 time in total

YES! Many thanks! I've been trying to work out how to make bash do that for AGES! It's default in RedHat and I've been missing it ever since I went over to Gentoo... Too many other things to figure out first so I never go to it.

BTW Does anyone know how to get my Home key to work with in a PuTTY SSH session? I think it's something to do with inputrc..... I have Ctrl-a to get me by for now but I'd it would be nice to get my keyboard to work as advertised

I read somewhere how to customize bash, with like the full current directory path, the time, and a whole bunch of other things. Any one want to give me a quick heads up to an article on how to do this?
I think it fits in with neat things to do with customizing your shell.

I read somewhere how to customize bash, with like the full current directory path, the time, and a whole bunch of other things. Any one want to give me a quick heads up to an article on how to do this?

I read somewhere how to customize bash, with like the full current directory path, the time, and a whole bunch of other things. Any one want to give me a quick heads up to an article on how to do this?

Hey, thanks!
I read an article about customizing bash in CPU mag, but misplaced the article.
I don't like how gnome's term doesn't list anything.
as for my aliases: alias sshserver="ssh my.server.name.edu"
so I can ssh into my game server (modified obviously)

the last one, nX, starts a new X login on a new display. (You should add localhost to /etc/X11/xdm/Xaccess)

I can't get this to work...
The nX function starts a new X window, but I get no login prompt (gdm, in my case).
Am I doing something wrong? I tried to add just 'localhost' in Xaccess. Should I add something more? I also tried to add CHOOSER localhost, but that didn't work either.
Maybe I'm just stupid... But I would really like this to work, so any help is very appreciated!

I use history substitution a lot. not only '!!' to repeat the last command, !23 to repeat command number 23, and !c to repeat the last command which started with 'c', but you can also use '!$' to get the last word from the previous command. so say you wanted to check for a package in the mask file, then edit it:

Code:

grep kde /usr/portage/profiles/package.mask
vim +/kde !$

before I started using etc-update I used to do this a lot:

Code:

diff net.eth0 ._cfg000.net.eth0
mv !$ !^

(!^ means the first argument of the previous command)

also !* means all the arguments from the previous command (without the program name)

dumb question, but how is the hisory better than just cycling through the list with the up arrow? Seems like you would have to read thru the list anyway_________________"Barney sucks! Best Buy sucks! Sony Sucks! Microsoft sucks, Bill Gates is the anti-Christ and John Ashcroft can kiss my ass!" Wil Wheaton