I am attempting to put some alias definitions in .bashrc. Like this:
#Convienience aliases
alias ll='ls -l'
alias ldir='ls -p | grep "/"'
#Temporary aliases
alias mvFooLog='mv ~/Projects/Foo/Log.txt .'
The last alias will work for me, but there seems to be some subtlety which is corrupting the definition of the first two.
Most of my my aliases are of this form: alias p='pwd'
I want to alias git commit so that it does git commit -v
But trying to create an alias with a space gives an error:
$ alias 'git commit'='git commit -v'
-bash: alias: `git commit': invalid alias name
In my /home/user/.bashrc file, I have those aliases to prevent mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
If I'm really sure of what I'm doing, I can overwrite rm and mv aliases using rm -f or mv -f, it will not ask me if I really want to overwrite files.
The problem, is that it doesn't work for the cp command, using cp -f will still ask me a question.
Is this normal?
Hello,
Upon a fresh install of Fedora 11 (and as a Fedora n00b), I noticed there are several aliases defined for me.
Code:
$ alias
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias vi='vim'
Possible Duplicate:
In Bash, when to alias, when to script, and when to write a function?
If I want to make a command like gsb that will expand to something like git show-branch -a | more or something even longer, what are the pros and cons of using a bash shell alias vs making a bash script and putting it on your PATH?
Are there any performance considerations?
If one:
$ find -name 'some expression' -type f > newfile
and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory.
I am on a Mac OS X 10.7.
alias bashrc='nano ~/.bashrc'
alias reload='source ~/.bashrc'
alias ls='ls --color=auto'
alias grep='grep -n --color=auto'
alias pacman='sudo pacman'
alias update='sudo pacman -Syu'
alias search='sudo pacman -Ss'
alias install='sudo pacman -S'
alias remove='sudo pacman -Rns'
alias makepkg='makepkg -s -
I'm trying to setup an alias in my .bashrc file, but it's not working as expected.
I have this alias which works:
alias lolcat='python /home/martyn/Dropbox/Applications/Scripts/logcat-viewer/unixcoloredlogcat.py'
and I normally use this command as such:
adb logcat SomeValue:* *:e | lolcat
But I want to put that in to an alias so that I can write:
logcat SomeValue
but my alias below isn't
hi there, i've got this alias i want assign only sometimes, and then work in the same shell with it (so when closing the shell the alias dissapears). As the alias is long, i want it to be in a executable file, so i just execute the script from a terminal and then i can access the alias from that same terminal.