Last active
July 1, 2025 19:41
-
-
Save Santosl2/059790af1ff3de97aa324591ed52dbca to your computer and use it in GitHub Desktop.
Fish and Bash Aliases
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
| ## Carrega automaticamente o .nvmrc | |
| load-nvmrc() { | |
| local nvmrc_path | |
| nvmrc_path="$(nvm_find_nvmrc)" | |
| if [ -n "$nvmrc_path" ]; then | |
| local nvmrc_node_version | |
| nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") | |
| if [ "$nvmrc_node_version" = "N/A" ]; then | |
| nvm install | |
| elif [ "$nvmrc_node_version" != "$(nvm version)" ]; then | |
| nvm use | |
| fi | |
| elif [ -n "$(PWD=$OLDPWD nvm_find_nvmrc)" ] && [ "$(nvm version)" != "$(nvm version default)" ]; then | |
| echo "Reverting to nvm default version" | |
| nvm use default | |
| fi | |
| } | |
| load-nvmrc |
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
| alias bname='git rev-parse --abbrev-ref HEAD' | |
| alias gp='git push' | |
| alias gl='git pull' | |
| alias gst='git status' | |
| alias g='git' | |
| alias ga='git add' | |
| alias wip='git add . && git commit -m "wip"' | |
| alias gb='git branch' | |
| alias gsta='git stash' | |
| alias gstp='git stash pop' | |
| alias gcmsg='git commit -m' | |
| alias gco='git checkout' | |
| alias gcm='git checkout master' | |
| alias nrn='npm run' | |
| alias gmr='git merge' | |
| alias cpbname='bname | xclip -selection clipboard' | |
| alias dname='git symbolic-ref refs/remotes/origin/HEAD --short' | |
| alias ..='cd ..' | |
| alias ...='cd ../..' | |
| alias ....='cd ../../..' |
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
| ### BASE CONTENT HERE | |
| # nvmload | |
| function check_nvmrc | |
| if test -f .nvmrc | |
| nvm use | |
| echo ".nvmrc encontrado" | |
| return 0 | |
| else | |
| echo "nenhum .nvmrc encontrado" | |
| return 1 | |
| end | |
| end | |
| check_nvmrc |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
aliases.fishcriar emconf.d