0
votes
2answers
53 views

How to create a permanent alias without resourcing the .bashrc-like file?

I really like bash aliases, it annoys me that every time I want to add a new alias I have type two commands: echo "alias \"short-cmd\"='long-command'" >> ~/.bash_aliases source ~/.bash_aliases ...
2
votes
4answers
70 views

Defining aliases for a certain directory

Is there a way to have an alias set for a particular directory and its subdirectories? I know I can put it in my .bashrc file, but I would like it only for a certain directory. Edit: what i mean is ...
5
votes
2answers
178 views

l, ls & la — what are the differences, and are there more of these commands?

So, through typing several commands I've found that there's not only ls, but l and la too. There doesn't appear to be any man entries on Ubuntu 12.14. They all appear to do similar things with minor ...
2
votes
1answer
61 views

How to make an alias active in both current session and in .bashrc at same time?

I just found frequently I decide to add an alias for longer time use at the same time use it now. So I have to type the same thing twice, first in current bash session then .bashrc.
1
vote
2answers
107 views

.bashrc execute command after “/bin/bash --login”

I have this alias in my .bashrc: alias s='cd ~/Documents/projects/s && /bin/bash --login && rvm use ruby-1.9' How can I execute the right part after it enters login shell (/bin/bash ...
1
vote
1answer
203 views

Aliases in scripts are not set globally

I know this sound really wierd but this is exactly what happens. I have my .profile and .bashrc file set up in a way that the .bash_aliases file gets executed (checked it with a echo). I do not get ...
3
votes
4answers
297 views

Bash aliases/functions and command line options

I want to set an alias to start nedit together with command line option -noautosave (due to text files up to 500MB). What seemed to be easy: alias nn="nedit -noautosave $1 &" just raises some ...
3
votes
2answers
111 views

Preventing accidental directory deletion. Making an alias that contains options?

I use an alias to prevent me from accidentally deleting files, and I would like to do something similar for directories. For files, I have the following added to my .bashrc: alias rm="rm -i" I ...
3
votes
2answers
229 views

How can I use aliases in commands?

I have created aliases in my .bashrc for various frequently used long paths but I can not seem to be able to use them inside vim or with commands such as find or grep. E.g the following: db in cli ...
0
votes
3answers
83 views

I need to turn a series of commands piped together into an alias in .bashrc

sudo ifconfig wlan0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' The above command when run from terminal outputs the right "internal" ip address. When I try to pass as alias like: alias ...
2
votes
0answers
242 views

.bashrc alias not working [closed]

I have set up a few aliases in my .bashrc file, like the following: alias ras='rails server' alias res='redis-server' alias rc='rails console' alias be='bundle exec' # git alias's are as follows ...
1
vote
3answers
123 views

In bash, how can I erase an alias without logout? [duplicate]

I had an alias in my .bashrc and I really don't want it anymore. I erased the alias, but my bash already has this alias loaded. Can I erase this alias from this bash without logging out?
10
votes
5answers
451 views

How to test for possible conflicts while using alias in bashrc?

Is there a simple way to list all the command conflicts that have occurred in the system due to the bashrc update involving alias commands? For example, someone writes alias ...
2
votes
3answers
905 views

Issues with .bash_profile and terminal commands

I added some data to my .bash_profile to run two aliases ruby version 19 and the proper gems. As soon as I added the data I could not longer run any commands such as the MacPorts command port nor the ...
9
votes
3answers
900 views

How can I find a rogue alias declaration?

I'm trying to find where a specific alias has been declared. I've searched all the usual places I know to look for aliases: ~/.bashrc ~/.bash_profile /etc/bashrc /etc/profile With no luck. I know ...
2
votes
1answer
201 views

Alias in .bashrc doesn't seem to accept an argument [duplicate]

Possible Duplicate: In Bash, when to alias, when to script, and when to write a function? I'm trying to setup an alias in my .bashrc file, but it's not working as expected. I have this ...