Use space at the end of aliases to be able to chain them

Finally this can make

% with-power-save pomodoro

work correctly
master
Jacopo De Simoi 2 years ago
parent 574f983b56
commit 2d2ef25305
  1. 24
      zshrc.org

@ -55,10 +55,13 @@ defined in the previous section.
now, the em-world is an alias that only exists in the version of
zshrc that I use for root. How do I want to proceed?
*** TODO replace pomodoro aliases with actual scripts
*** TODO have a look at this idea:
Instead of defining a lot of functions in your `.zshrc', all of which you may not use, it is often better to use the autoload builtin. The idea is, you create a directory where function definitions are stored, declare the names in your `.zshrc', and tell the shell where to look for them. Whenever you reference a function, the shell will automatically load it into memory.
Instead of defining a lot of functions in your `.zshrc', all of
which you may not use, it is often better to use the autoload
builtin. The idea is, you create a directory where function
definitions are stored, declare the names in your `.zshrc', and
tell the shell where to look for them. Whenever you reference a
function, the shell will automatically load it into memory.
% mkdir /tmp/funs
% cat >/tmp/funs/yp
@ -544,12 +547,23 @@ This needs to be diff'd among the versions
#+end_src
*** dnd management :daily:
#+begin_src sh
alias with-dnd=~/scripts/dnd-wrapper.py
alias with-dnd="~/scripts/dnd-wrapper.py "
#+end_src
This silences the fan:
#+qbegin_src sh
#+begin_src sh
alias with-power-save="powerprofilesctl launch -p power-saver -r 'quiet operations' "
#+end_src
*** with-mpc :daily:
#+begin_src sh
function with-mpc-fade () {
~/scripts/mpc-fade
$@
~/scripts/mpc-fade
}
# Define an alias with a space at the end so that we can chain with
# other non-global aliases ()
alias with-mpc-fade='with-mpc-fade '
#+end_src
*** Pomodoro aliases :pi:android:
These aliases help setting up termdown to countdown for the pomodoro

Loading…
Cancel
Save