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
| # Echo only current branch name and copy it to clipboard. | |
| function git-bc { | |
| local copier="" | |
| if which pbcopy > /dev/null; then | |
| copier=(pbcopy) | |
| elif which xsel > /dev/null; then | |
| copier=(xsel -ib) | |
| elif which xclip > /dev/null; then | |
| copier=(xclip -sel clip) | |
| fi |
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
| format = """ | |
| $time\ | |
| $username\ | |
| $hostname\ | |
| $localip\ | |
| $shlvl\ | |
| $singularity\ | |
| $kubernetes\ | |
| $directory\ | |
| $vcsh\ |
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 l="ls -AlGht" | |
| alias dirsize="du -hs" |
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
| #!/bin/bash | |
| # Push to the repo (same upstream by default). | |
| # SYNOPSIS | |
| # git-push [<msg>] [<pathspec>...] [<options>...] | |
| # EXAMPLES | |
| # git-push --no-verify | |
| function git-push { | |
| local printer=(echo) | |
| if which cowsay > /dev/null; then |
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
| #!/bin/bash | |
| # Commit to the git repo adding the ticket number to the beginning of the message. | |
| # SYNOPSIS | |
| # git-ci [<msg>] [<pathspec>...] [<options>...] | |
| # EXAMPLES | |
| # git-ci 'Improve styles' web/static/main.css --no-verify | |
| function git-ci { | |
| local printer=(echo) | |
| if which cowsay > /dev/null; then |
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
| # Smart alias for ls command. | |
| # Usage: | |
| # l [other ls options] [path] | |
| function l | |
| ls -Alh $argv[1] | |
| end | |
| # Paste this code to your terminal and put `funcsave l`. | |
| # Default functions directory is `~/.config/fish/functions/`. |
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
| # Pushes in a git repo. | |
| # Usage: | |
| # git-push | |
| function git-push | |
| git rev-parse > /dev/null 2>/dev/null | |
| if test "$status" != "0" | |
| echo "Not a git repo, aborting." | |
| return | |
| end |
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
| # Shows tags ordered descendingly. | |
| # Usage: | |
| # git-tag | |
| function git-tag | |
| git tag -l --sort=-v:refname | less | |
| end | |
| # Paste this code to your terminal and put `funcsave git-tag`. | |
| # Default functions directory is `~/.config/fish/functions/`. |
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
| # Commits files in a git repo. | |
| # Usage: | |
| # git-ci 'Change button color' | |
| # git-ci merge | |
| # 'git-ci merge' will do a merge with a default merge message and --no-verify option | |
| # git-ci 'Change button color' --param1 --param2 file1.txt file2.txt --param3 ... | |
| function git-ci | |
| git rev-parse > /dev/null 2>/dev/null | |
| if test "$status" != "0" |