Skip to main content

New answers tagged

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 ...
zoickx's user avatar
  • 51
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 ...
Alex North-Keys's user avatar
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 ...
terdon's user avatar
  • 245k
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 ...
Kaz's user avatar
  • 8,585
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 ...
Chris Davies's user avatar
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 ...
muru's user avatar
  • 73.9k

Top 50 recent answers are included