-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples.txt
27 lines (23 loc) · 958 Bytes
/
examples.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
insert text into file
tee -a .zsh_local/.zsh_env_local << EOF
export UPDATE='brew update --auto-update && brew upgrade'
export CLIPBOARD='pbcopy'
export FRESH='source ~/.zshrc && source ~/.zprofile'
function code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}
function updateEnvFile() { gsed -i "/JAVA_HOME=/c export JAVA_HOME=/opt/homebrew/opt/$(ls /opt/homebrew/opt/ | grep openjdk@$1)" ~/Documents/cli/.zsh_env && fresh ;}
function hub() { open -a "Google Chrome" $(cat .git/config | grep url | sed -n 's/url = [email protected]:/https:\/\/github.com\//p') ;}
EOF
function idk() {
while getopts 'abf:v' flag; do
case "${flag}" in
a) a_flag='true' ;;
b) b_flag='true' ;;
f) files="${OPTARG}" ;;
v) verbose='true' ;;
*) print_usage
exit 1 ;;
esac
done
}
Note: If a character is followed by a colon (e.g. f:), that option is expected to have an argument.
./script -v -a -b -f filename