Skip to content

Commit

Permalink
fix: list trial aliases separately with alias command
Browse files Browse the repository at this point in the history
  • Loading branch information
cerico committed May 2, 2023
1 parent 400925c commit 3796832
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
15 changes: 11 additions & 4 deletions files/zsh/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,27 @@ source ~/.zsh/godaddy
source ~/.zsh/supabase
source ~/.zsh/macfair
source ~/.zsh/tokens
source ~/.zsh/trialling
source ~/.zsh/_trialling
export MARKPATH=$HOME/.marks
alias sedi='sed -i "" -e'

aliases () {
for i in `ls ~/.zsh |grep -v "\."`
do
echo ${i:u}
echo -------------
grep '() {$' ~/.zsh/$i | tr -cd '[:alnum:]_\n' | sort
echo $(ColorCyan ${i:u})
echo $(ColorCyan -------------)
grep '^[[:alpha:]].*{' ~/.zsh/$i | tr -cd '[:alnum:]# _\n' | sort
echo ""
done
}

trialling () {
echo $(ColorCyan "TRIAL ALIASES")
echo $(ColorCyan -------------)
grep '^[[:alpha:]].*{' ~/.zsh/_trialling | tr -cd '[:alnum:]# _\n' | sort
echo ""
}

alphnum () {
tr -cd '[:alnum:]\n'
}
Expand Down
2 changes: 1 addition & 1 deletion roles/aliases/tasks/darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
- name: create trial file for new aliases if one doesn't already exist
copy:
content: "tinker(){\n echo try out new aliases here, not in main file\n}"
dest: ~{{ macbook_user.stdout }}/.zsh/trialling
dest: ~{{ macbook_user.stdout }}/.zsh/_trialling
force: no

- name: copy js help file
Expand Down
2 changes: 1 addition & 1 deletion roles/aliases/tasks/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
- name: create trial file for new aliases if one doesn't already exist
copy:
content: "tinker(){\n echo try out new aliases here, not in main file\n}"
dest: ~{{ macbook_user.stdout }}/.zsh/trialling
dest: ~{{ macbook_user.stdout }}/.zsh/_trialling
force: no

- name: copy js help file
Expand Down

0 comments on commit 3796832

Please sign in to comment.