bin: Add 2 new scripts
Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
This commit is contained in:
parent
7bec630f67
commit
478a78222f
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
usage() {
|
||||
echo "history-cleanup: Remove .*_history files from your home directory"
|
||||
echo "Usage: $0 [COMMAND]"
|
||||
echo "When used without any arguments, the script will assume 'all' was used."
|
||||
echo
|
||||
echo "WARNING: Since this script is written in Bash, there'll be no support"
|
||||
echo "for other shells, considering the best-effort policy, from the"
|
||||
echo "original script author"
|
||||
echo "Available commands:"
|
||||
echo "all Delete any history file found in home directory."
|
||||
echo "bash Delete ~/.bash_history + run history -c"
|
||||
echo "python"
|
||||
exit
|
||||
}
|
||||
|
||||
if [[ $@ == "" ]]; then
|
||||
usage
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/env bash
|
||||
|
||||
echo "---> Refreshing custom functions..."
|
||||
sleep 5
|
||||
# change the path if it's different
|
||||
source ~/.dotfiles/bashrc/worthwhile-functions
|
||||
if [[ $? == 0 ]]; then
|
||||
echo "info: Successfully refreshed functions to current session."
|
||||
echo "info: Something don't work? Run edit-funcs-bashrc to edit"
|
||||
echo "info: or even remove problematic functions"
|
||||
else
|
||||
echo "! Problems found, please run edit-funcs-bashrc to fix"
|
||||
echo " and re-run this command again. In case of path changes,"
|
||||
echo " please do 'source ~/.bashrc' if issue presists."
|
||||
echo " If you ever moved that file, also update your ~/.bashrc and"
|
||||
echo " the ~/.dotfiles/bin/reload-funcs-bashrc\#L5"
|
||||
fi
|
Loading…
Reference in New Issue