Skip to main content

All Questions

Tagged with
2 votes
0 answers
45 views

Can't unalias then redefine as a function in the same conditional [duplicate]

Here is a simplified implementation of an issue in my bash/zsh aliases file: alias foobar='echo bar' # this is out of my control if true; then unalias foobar echo we got inside the conditional ...
0 votes
1 answer
65 views

Zsh zinit load OhMyZsh plugin skipping aliases

I want to use these plugins using zinit to load git completions in zsh zinit wait lucid for \ OMZL::git.zsh \ OMZP::git But I don't care about the aliases, there are really too much aliases I ...
26 votes
5 answers
14k views

Clear or disable aliases in zsh

I installed oh-my-zsh to make terminal use a bit easier. One thing that bugs me though is the prolific aliases added by it, like "ga", "gap", "gcmsg", "_", which are harder to remember than the ...
1 vote
2 answers
109 views

alias defined in .zshrc does not propagate to shell script

I have python installed on my system as python3. In my .zshrc file I defined following alias: alias python=python3 With this, I am able to run python3 using python on the command-line: $ python ...
1 vote
1 answer
105 views

How can I remove aliases "which-command=whence" and "run-help=man"?

I'm running Artix Linux and using zsh, and these two aliases return no matter how many times I unalias them or remove them from my aliasrc: run-help=man which-command=whence And they don't exist in ...
15 votes
4 answers
13k views

Using zsh autocompletion for alias

I have created a few aliases for git in zsh. For example: gch = git checkout, grb = git rebase --committer-date-is-author-date and some more complex useful zsh functions for git commands. But how can ...
1 vote
1 answer
140 views

Converting a tcsh alias into zsh

I had a tcsh alias as follows: alias cdd 'cd `dirname \!*`' I use this to change the directory to the one containing a certain file. For instance, cdd /Users/myself/Document/Folder/File.pdf would ...
0 votes
1 answer
233 views

zsh: alias'd commands stop working

This keeps happening and I'm not sure why. How do I trace what zsh is actually trying to do, and why it starts ignoring my alias? ************@*******-MacBook-Pro$ reload zsh: command not found: ...
2 votes
1 answer
74 views

Alias + and - in zsh?

For years I've used + and - as aliases for pushd and popd in both csh and bash. I've finally given up on my Macs and want to switch to zsh but I haven't been able to find a way to make these aliases. ...
0 votes
1 answer
440 views

How to list only the aliases defined by the user?

I'm using the ZSH and defined some aliases (stored in multiple fines, that are loaded in the ~/.zshrc). That is working fine. Executing the command alias allows to list all available aliases. Now I'd ...
2 votes
1 answer
356 views

Alias piping into awk

I am trying to create an ll with awk pipe alias. I am trying to escape the apostrophes using the following answers. alias lh= `ll -h | awk {'print $9, \"-\" ,$5, \"-\", $8, \"...
1 vote
1 answer
267 views

How to write a function that takes an argument string that does not need to be quoted?

I'm writing a function, adding it to ~/.zshrc on my Mac. It's in order to more quickly handle commands to youtube-dl. I have this: function dlv() { cd /Users/admin/Downloads youtube-dl ...
1 vote
0 answers
115 views

can we trigger some action if we `cd` into directory? [duplicate]

I have multiple projects over various languages like JavaScript, Python. I wonder if Linux provides some functionality to trigger some actions automatically if we cd into a particular directory? For ...
1 vote
2 answers
1k views

/etc/zshrc is not applied when log in

I have no idea why having aliases that are applied to all interactive terminal (i.e., my user account and sudo) is so difficult. Most web search result were about BASH, but my shell is ZSH (Manjaro ...
0 votes
0 answers
301 views

Custom alias outside .zshrc but ZSH_CUSTOM doesn't work in kali

For reference this is not a duplicate: I reviewed other Q and A like this but it doesn't work for me. Background: I'm using Kali in parallels. To keep my .zshrc file tidy I decided to mkdir ...

15 30 50 per page
1
2 3 4 5
8