Skip to content

Commit

Permalink
feat(func): replace t (touch) alias with function that deep creates
Browse files Browse the repository at this point in the history
  • Loading branch information
denolfe committed Sep 11, 2024
1 parent 912d833 commit f90e665
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 0 additions & 3 deletions aliases/zsh.aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ case $OS in
*) ;;
esac

# Other bash stuff
alias t="touch"

# tree w/ .gitignore - https://unix.stackexchange.com/a/632196
alias tr1='rg --files | tree --fromfile -L 1 -C'
alias tr2='rg --files | tree --fromfile -L 2 -C'
Expand Down
7 changes: 7 additions & 0 deletions functions/t.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

# touch with mkdir -p
t() {
mkdir -p "$(dirname "$1")" && touch "$1"
echo "Created: $1"
}

0 comments on commit f90e665

Please sign in to comment.