Skip to content

Instantly share code, notes, and snippets.

@thblckjkr
Last active June 11, 2021 05:34
Show Gist options
  • Save thblckjkr/a5715793e30254f86f2207eff88dfcb6 to your computer and use it in GitHub Desktop.
Save thblckjkr/a5715793e30254f86f2207eff88dfcb6 to your computer and use it in GitHub Desktop.
Weeb aliases for shell
# A little list of aliases for weeb developers
# nya | Opens a file for edition
alias nya='nano'
# neko | Prints a file on terminal
alias neko='cat'
# onegai | Execute the previous command as sudo
alias onegai='echo sudo $(fc -ln -1) ; sudo $(fc -ln -1)'
# uwu | Shut downs the computer
alias uwu='shutdown -h now'
# shine | kills all proceses
alias shine='killall'
# baka | Version control [baka pull master]
alias baka='git'
# moe | print a file on screen
alias moe='more'
# zawarudo | Remove the last commit
alias zawarudo='git reset --soft HEAD~1'
# Ikuyo! | Save current unstaged work to dropbox as a backup or portability
alias ikuyo='git add *; git diff --cached > ~/Dropbox/Documents/${PWD##*/}-$(git branch --show-current).patch'
alias tadaima='git apply ~/Dropbox/Documents/${PWD##*/}-$(git branch --show-current).patch'
@AmineI
Copy link

AmineI commented Mar 17, 2020

The 'sudo !!' alias wouldn't work, because "!!" is a shortcut interpreted by bash, which won't be interpreted by an alias substition.

Relevant stackexchange question and answers

Thus, the way to go would be alias onegai='sudo $(fc -ln -1)' , among others.
Could also be used like that to actually echo the command before execution

alias onegai='echo sudo $(fc -ln -1) ; sudo $(fc -ln -1)'

@thblckjkr
Copy link
Author

@AmineI great. I noticed that the onegai alias did not work as soon as I tried, but i was too lazy to figure out an alternative. Thanks.

@Nyameliaaaa
Copy link

sudo should be senko

@indexerrowaty
Copy link

sudo should be senko

Agreed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment