zsh: realized some things need to be functions
By that, I mean things that change my working directory need to be functions
This commit is contained in:
parent
cba8e92e1d
commit
06ab216290
11 changed files with 93 additions and 94 deletions
18
.config/shell/functions/cda
Normal file
18
.config/shell/functions/cda
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
# cd all: opens a new shell in each of the directories below the one you're in, so
|
||||
# you can execute commands in them until you type 'exit'
|
||||
# If I use this enough, I may make something that can do more
|
||||
# Ideas for what it could do in the future:
|
||||
# - somehow record typed commands so they can be automatically repeated like a macro
|
||||
# - maybe get the length of the histfile before and after, executing the last X number of commands
|
||||
# - Maybe just add an argument that takes a command and executes it in all dirs
|
||||
# (although that wouldn't be as good as recording actions bc it's easy to do
|
||||
# that by just writing a for loop)
|
||||
|
||||
cda() {
|
||||
for DIR in *; do
|
||||
(cd "$DIR" && zsh)
|
||||
done
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue