All Questions
115
questions
4
votes
3
answers
8k
views
zsh alias being overridden somehow
I'm on a system running OS X 10.8.5.
I recently tried to alias ls to ls -G -la command. I opened up ~/.zshrc, put in the alias, relaunched the terminal, but the change didn't take effect. Upon ...
50
votes
5
answers
47k
views
Is it possible to include file in config file of zsh? How?
I'd like to have a file eg. f with only zsh aliases (pureness reasons). Then I'd like to include f file in my .zshrc file, so that the aliases defined in f are visible in .zshrc.
Is it possible?
If ...
2
votes
3
answers
3k
views
Executing zsh rehash after build
I have a build script that can change what binaries are in my $PATH (it doesn't edit $PATH itself, but it adds/deletes files to folders that are already in $PATH). zsh's autocompletion doesn't update ...
7
votes
1
answer
6k
views
Zsh - alias -s with parameter
In zsh, I can specify default program to open which file extension like alias -s {mkv,mpg}='mplayer' . I runs fine but what I really want is to run mplayer <filename> & so it won't produce ...
11
votes
3
answers
6k
views
Difference between alias in zsh and alias in bash
I have searched around but could not find anything conclusive. Is there a difference between the alias command in zsh and the alias command in bash? If not, does it mean I can share a set of aliases ...
37
votes
2
answers
79k
views
How to reset a shell environment?
This issue has been bugging me for a while, and although I've thought I've found my answer through EnvWatcher, unfortunately it only works on Bash. And I use zsh.
I would like to replicate the things ...
100
votes
7
answers
37k
views
How to use `which` on an aliased command?
Like most users, I have a bunch of aliases set up to give a default set of flags for frequently used programs. For instance,
alias vim='vim -X'
alias grep='grep -E'
alias ls='ls -G'
The problem is ...
29
votes
3
answers
30k
views
Escaping quotes in zsh alias
Following on from this question about stripping newlines out of text, I want to turn this into a zsh alias as follows:
alias striplines=' awk " /^$/ {print \"\n\"; } /./ {printf( \" %s \",$0);}"'
I'...
8
votes
2
answers
2k
views
zsh alias expansion
Is it possible to configure zsh to expand global aliases during tab completion? For example, I have the common aliases:
alias -g '...'='../..'
alias -g '....'='../../..'
but when I type for example ...
25
votes
4
answers
15k
views
Share aliases and PATH setting between zsh and bash
The shell that I normally use is zsh. I have several aliases to enable color in some programs such as ls and grep. I've also set my custom path so that I can execute programs in non-standard place (...