Skip to main content

All Questions

Tagged with
1 vote
1 answer
864 views

How can bash aliases be configured to handle spaces in directory names? [duplicate]

The alias below works well in zsh when spaces in directory names are \ escaped, but bash doesn't handle them properly. What changes would be required to make them work with bash properly. dum() { ...
vfclists's user avatar
  • 7,619
1 vote
1 answer
940 views

Zsh suffix alias alternative in bash

In zsh I can open any file with a special suffix or extension like .log or .txt with a program with typing its file name only $ alias -s txt=nano $ word.txt That open the file word.txt with nano. ...
mostafa elmadany's user avatar
5 votes
2 answers
3k views

Forward aliases to child process

I have some aliases which are defined in /etc/zprofile (or /etc/profile for bash). Also $PATH gets manipulated there. I want to start an interactive shell from a shell which avoids the $PATH ...
pseyfert's user avatar
  • 888
3 votes
1 answer
5k views

How to create an alias for two Git commands that use a parameter? [duplicate]

I regularly have to delete a local and remote Git branch. Therefore, I run the following commands: $ git branch -d feature-branch $ git push --delete origin feature-branch Since I mostly execute ...
JJD's user avatar
  • 587
1 vote
2 answers
2k views

How do you manage your bash/zsh Aliases?

How do you manage your bash/zsh Aliases? Is there a tool to do this more easily and less "think of an alias -> open .zshrc-sourced-file -> edit -> close, reload .zshrc -> use alias"?
wildeyes's user avatar
  • 1,155
5 votes
3 answers
6k views

Automatically put an alias into ~/.bashrc or ~/.zshrc [duplicate]

Is there a command line util/script that automatically saves aliases? E.g. save-alias my-ip="curl ipecho.net/plain" and that will define an alias, then add/update it in ~/.bashrc or ~/.zshrc I was ...
Don Manley's user avatar
40 votes
2 answers
38k views

alias vs export for simple commands

For simple commands like less, is it better to make an alias or to export the options? Is there any benefit of one over the other? For example, if I want less to always use the -R option to show raw ...
skittleys's user avatar
  • 645
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 ...
Zameer Manji's user avatar
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 (...
phunehehe's user avatar
  • 20.3k

15 30 50 per page
1
2