Created
October 23, 2022 00:22
-
-
Save listenlight/7257d9f79137bb358fe33a044e20a1e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apps='ps cexmo pid,user,comm | gvg -E '\''(nginx|puma|redis|postgresq|apache|bundler|ruby|/gem|sidekiq)'\' | |
#!/bin/zsh | |
function ww() { | |
wcmd=$1 | |
echo $'\e[1;34m'$(which $wcmd)$'\n\e[0m\e[0;34m'$(whereis $wcmd)$'\e[0m'; | |
} | |
function addalias() { | |
read 'tmpAlias?shortcut: ' | |
read 'tmpCmd?full command: ' | |
cmd_str="alias $tmpAlias=\"$tmpCmd\"" | |
the_rest=" >> ~/.aliases && . ~/.aliases" | |
echo "echo \""$cmd_str""$the_rest"\"" | |
confirm="Y" | |
read "confirm?is that ok (y/N): " | |
if [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]]; then | |
echo $cmd_str >> ~/.aliases && . ~/.aliases | |
echo "neat" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment