I'm trying to create an alias for cwebp to run from zsh that converts an input image file, to an output image file of the same name, but with the .webp file extension:
# in .zshrc
alias cwebphoto='cwebp -preset "photo" -short -noalpha $1 -o…
Is there a way to get tab completion for global aliases in zsh? Defined as:
% alias -g zshplugins=~/.zshplugins
% nvim zshpl[tab] would not tab complete.
I use global aliases mainly to not have to enter the path to a file nor restrict myself to a…
I'm using zsh and trying to create a shortcut, stt, so I can open a folder in sublime text. I've currently added an alias that I found on a website, but it only opens a blank sublime, with no files from my folder.
I'm not sure what I need to…
Following ZSH: Call in-built function from zsh function that uses the same name and Run a command that is shadowed by an alias, it might be expected that a command keyword equivalent of what builtin and command are doing for their respective…
Reading What's the difference between shell builtin and shell keyword? I wondered how much I could alias stuff in the shell.
So for example instead of writing
string_with_spaces='some spaces here'
if [ -n $string_with_spaces ]; then
echo "The…
EDIT: The example works in pure zsh. My installation with prezto won't work. Seems like a bug in prezto.
I tried to alias sponge as SP in zsh. But the result is pretty surprising.
Without global alias:
❯ echo xxx >! xxx
❯ cat xxx | sponge xxx
❯ cat…
what is wrong with my RPS1 expression
RPS1='%(t.[Ding!].%(t30.[Dong!].[%T]))'
Explanation:
I want to get [Ding!] if it is 11am, [Dong!] if it is 11:30am and if both is not true just normal time like [11:33]. But what is wrong?
Tanks
In my .zshrc file, if I add
alias vii=“mvim -v”
or
alias vii=‘mvim -v’
After I used command vii, the terminal displayed:
zsh: command not found: “mvim
or
zsh: command not found: ‘mvim
If I put
alias vii=mvim -v
Then, commandvii works as mvim…
I have two things, one is a function the other is an alias and they don't quite work right.
The first is for tailing logs but only showing the first 3 lines by finding the important part of the log you're looking for and then showing the next two…
I am using zsh for my shell and I have the following function defined in my ~/.zshrc to run custom commands inside my vagrant VM.
vt() {
pushd ~/dev/vvv
vagrant ssh -c $@
popd
}
So to run the xdebug_on command inside my vagrant VM, I…
I'm using MacOS and had the issue that my Terminal didn't react to the 'python' command, so I tried out what was recommended here (manually adding an alias to zsh with echo "alias python=/usr/bin/python3" >> ~/.zshrc).
Turned out this wasn't the…
Following is the function I have added in the .zshrc configuration file to create a Notes folder if it does not exist and if the folder exists it has to cd to that folder.
function mnotes(){
if [ ! -d ~/Desktop/Notes ];then
mkdir…
Been poking around for a bit trying to find a straight answer but VScode keeps giving me grief when checking the syntax and the alias doesn't seem to work.
I often switch between networks with devices that aren't easily discoverable and their IP…
I'm trying to create an alias to activate any given Venv by typing activate [name of Venv].
What I've done:
activate (){
directory = "~/Programming/path-to-venvs/$1"
cd $directory
source "bin/activate"
}
When I try to run it, if I…