Advertisement
v1ral_ITS

zsh shell aliases [bkup]

Jul 9th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.25 KB | None | 0 0
  1. ###################
  2. # START FUNCTIONS #
  3. ###################
  4. aptg1() {
  5.     echo -e "CHOICES:   \n1) Update \n2) Upgrade \n3) Dist-Upgrade \n4) Apt Search \n5) Apt Download .deb [no install] \n6) Apt Autoclean && Autoremove \n7) Install a .deb With apt-get"
  6.     read n
  7.     case $n in
  8.         1) sudo apt-get -y update ;;
  9.         2) sudo apt-get -y upgrade ;;
  10.         3) sudo apt-get -y dist-upgrade ;;
  11.         4) echo "Search What: "; read SRC; apt search '$SRC' ;;
  12.         5) echo "Download What .deb: "; read DEB; sudo apt-get -y download $DEB ;;
  13.         6) sudo apt-get -y autoremove && sudo apt-get -y clean ;;
  14.         7) echo "Install What:"; read SIN ; sudo apt-get -y install $SIN ;;
  15.             *) invalid option ;;
  16.     esac
  17. }
  18. sin() {
  19.     echo -e "\nInstall What: "
  20.     read INS
  21.     sudo apt-get -y install $INS
  22. }
  23. httpserver() {
  24.     echo ""
  25.     echo ""
  26.     read -p "You can Enter Any Begining [root] Directory To Start This Server"
  27.     echo ""
  28.     echo ""
  29.     echo "Checking Filesystem........      "
  30.     sleep 2
  31.     echo ""
  32.     echo -e "\nPlease Now Enter Begining Directory For Server: "
  33.     read SRVROOT
  34.     read -p "Specify A 4 Letter Number For The Port: " PRT
  35.     sudo python2 -m SimpleHTTPServer '$PRT'
  36. }
  37. new_bash() {
  38.     echo -e "\nBash Aliases, are formated \n like so, for example,"
  39.     echo -e "alias x='exit' \nSo for the formula we use \nalias abbreviation=definition"
  40.     echo -e "So Lets Begin With ABREV, \n I have Already set the pre alias command"
  41.     echo -e "\nSet abbreviation To What:  "
  42.     read ABREV
  43.     echo -e "Okay Now The definition, \nAnd I will Give You A Graphical"
  44.     echo -e "Interface to use, \nSo use as much room as you need"
  45.     echo "alias $ABREV='$(kdialog --title='ImPerial TeK Solutions' --inputbox='Define Alias Command')'" >> $HOME/.oh-my-zsh/custom/aliases.zsh
  46.     cat $HOME/.oh-my-zsh/custom/aliases.zsh
  47. }
  48. bookmarkurl() {
  49.     URL="$(kdialog --title=Bookmarks --inputbox=URL/Files)"
  50.     echo -e "\n`date` \n$URL" >> $HOME/bookmarks-url
  51.     \cat $HOME/bookmarks-url
  52. }
  53. tarcz() {
  54.     clear
  55.     ls
  56.     echo -e "\nName The tar.gz: \n"
  57.     read TZF
  58.     clear
  59.     ls
  60.     echo -e "\nWhat File or Directory to tar.gz: "
  61.     read GAR
  62.     sudo tar czf $TZF.tar.gz $GAR
  63. }
  64. new_cd() {
  65.     cd "$*"
  66.     ls
  67.     echo "Current Directory="`pwd`""
  68. }
  69. updupg() {
  70.     sudo apt update
  71.     sudo apt upgrade
  72.     sudo apt dist-upgrade
  73.     sudo apt-get update
  74.     sudo apt-get upgrade
  75.     sudo apt-get dist-upgrade
  76. }
  77. #################
  78. # START SLIASES #
  79. #################
  80. # alias zshconfig="mate ~/.zshrc"
  81. # alias ohmyzsh="mate ~/.oh-my-zsh"
  82. alias c='clear'
  83. alias x='exit'
  84. alias h='cd $HOME'
  85. alias m='cd $MHOME'
  86. alias p='PS1=%F{red}g0ne_@%F{green}ITS%F{yellow}~'
  87. alias cd='new_cd'
  88. alias newb='new_bash'
  89. alias aptg='aptg1'
  90. alias c='clear'
  91. alias x='exit'
  92. alias sin='echo "Install What: " ; read LSU ; sudo apt-get install $LSU '
  93. alias a='alias'
  94. alias bmu='bookmarkurl'
  95. alias chx='chmod +x $(ls | zenity --list --column "What File")'
  96. alias catwild='echo "What File Format To Cat"; read FRM; cat *.'$FRM''
  97. alias czf='tarcz'
  98. export MHOME='/media/g0ne_/3639-3266'
  99. alias az='aptg'
  100. alias zrc='vim $HOME/.zshrc'
  101. alias rm='sudo rm -rf $*'
  102. alias wspace='sudo bash /home/g0ne_/bin/whitespace'
  103. alias cat='kdialog --textbox $(ls | zenity --list --column "Choose File To Cat") 512 286'
  104. alias zshrc='gedit ~/.oh-my-zsh/custom/aliases.zsh'
  105. alias fullupdate='updupg'
  106. alias gup='drive upload $(ls | zenity --list --column "Choose File To Upload")'
  107. alias gupdir='drive upload --recursive $(kdialog --getexistingdirectory /)'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement