New answers tagged alias
1
vote
Get a list of all user's commands from a non-interactive shell
Turns out, I was quite close to the solution. I was confusing login shells and interactive shells. Different things. Instead of $SHELL --login, all I needed to do was $SHELL -i. The following will ...
0
votes
How to organize all my bash aliases (toolchain) for a midsized developer group?
I handled this for myself by basically having my shell startup come with one function for each workplace, which would correspond to your helper groups, where the function, when called, applies all the ...
2
votes
zsh alias does not complete fully if not sourced once a day
If you have some sort of personal configuration file that isn't standard, such as this ~/.zsh you mention, of course you need to source it manually each time you log in. To make this happen ...
1
vote
How to write an alias or bash script that renames a single file using the same syntax as the `ren` command of Windows?
Bash brace expansion can be used:
To rename path/to/foo.txt to path/to/bar.txt we can generate these two paths from their common parts like this:
$ mv path/to/{foo,bar}.txt
Brace expansion doesn't ...
1
vote
Accepted
How to write an alias or bash script that renames a single file using the same syntax as the `ren` command of Windows?
I'm not particularly familiar with REN but it looks like the directory path provided in the first argument is where the renamed file should still end up.
The native solution could be something like ...
10
votes
Accepted
Are there alternatives to alias I'm not aware of?
As noted in the comments, use type buf to ask the shell what it thinks buf is. In this case, I'd expect you'll find that it is indeed a function as also suggested in the comments - in particular, this ...
Top 50 recent answers are included
Related Tags
alias × 903bash × 503
shell × 163
zsh × 116
shell-script × 66
linux × 52
command-line × 51
function × 51
quoting × 34
ssh × 30
cd-command × 25
tcsh × 23
sudo × 22
csh × 20
scripting × 19
macos × 19
oh-my-zsh × 18
terminal × 17
grep × 16
environment-variables × 16
command × 16
autocomplete × 16
vim × 15
command-history × 15
directory × 14