bashrc: Update aliases and functions
Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
This commit is contained in:
parent
d25caa0752
commit
7bec630f67
|
@ -44,7 +44,7 @@ alias yeet-stash="git stash drop"
|
|||
## staging stuff
|
||||
alias stage="git add"
|
||||
alias unstage="git rm --cached"
|
||||
alias nuke="git rm"
|
||||
alias nuke-from-index="git rm"
|
||||
|
||||
# branch management
|
||||
alias rename-branch="git branch -m"
|
||||
|
@ -72,15 +72,15 @@ alias pull-upstream="fetch && git pull upstream"
|
|||
alias pull-origin="fetch && git pull origin"
|
||||
|
||||
# history-cleanup like scripts
|
||||
alias clean-shellhis="history -c"
|
||||
alias clean-shellhis="history -c && clear"
|
||||
|
||||
# test SSH connections
|
||||
alias test-gh-ssh="ssh -p 22 git@github.com"
|
||||
alias test-gl-ssh="ssh -p 22 git@gitlab.com"
|
||||
|
||||
# ssh-agent stuff
|
||||
## quock shortcut into add-ssh-keys stuff
|
||||
alias add-ssh-key="$HOME/.dotfiles/bin/add-ssh-keys"
|
||||
|
||||
# list installed debs by size
|
||||
#alias list-debs-size:less="dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -rn | less"
|
||||
#alias list-debs-size="dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -rn"
|
||||
# shortcuts to some functions
|
||||
alias edit-script="edit-script-file"
|
||||
|
|
|
@ -1,10 +1,29 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/bash
|
||||
|
||||
# logic goes here
|
||||
# custom function management here
|
||||
# changes to the worthwhile-functions filepath requires
|
||||
# an update o the filepath via 'edit-script reload-funcs-bashrc
|
||||
# and also any reference here
|
||||
disable-funcs () {
|
||||
echo "Unimplemented yet."
|
||||
echo "info: Unimplemented yet. Tell Andrei to add it to his todo."
|
||||
}
|
||||
edit-funcs-bashrc() {
|
||||
$(echo $EDITOR || command -v nano>>/dev/null && echo nano || echo vi) ~/.dotfiles/bashrc/worthwhile-functions
|
||||
}
|
||||
|
||||
list-debs-size () {
|
||||
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -rn | less
|
||||
}
|
||||
|
||||
edit-script-file () {
|
||||
# if you use other editor, please set $EDITOR.
|
||||
$(echo $EDITOR || command -v nano>>/dev/null && echo nano || echo vi) $(command -v $1)
|
||||
}
|
||||
|
||||
# reloading stuff
|
||||
refresh-funcs() {
|
||||
$DOTFILES_STUFF_BIN/reload-funcs-bashrc
|
||||
}
|
||||
refresh-aliases() {
|
||||
source $HOME/.dotfiles/bashrc/aliases
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue