/script>
[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

.bashrc Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 197
Thread images: 13

File: bashrc.png (168KB, 1041x1020px) Image search: [Google]
bashrc.png
168KB, 1041x1020px
Post your bashrcs or any useful aliases or functions that you use please
>>
does /g/ not like using the terminal?
>>
>>56542903
I won't lie, those are some sexy aliases.
>>
>>56543871
T-thanks
>>
>>56542903
>that ffmpeg alias
thanks OP :^)

I'm a Windows user so I basically just use the terminal to run Weechat, mpv, youtube-dl, ffmpeg and whatnot. Not much in the way of good aliases.

I like the idea of the thread at least though.
>>
>>56542903
Why do some distributions insist on putting aliases into scripts that are run only for login shells (such as ~/.bash_profile or somewhere in /etc/profile.d) rather than in to ~/.bashrc so they affect any interactive shell? For instance in Slackware, when you load X and open a terminal emulator, you don't have any aliases set because of this.

Somewhere I seem to have seen some argumentation stating something along the lines of setting aliases being part of setting a user's environment, and that it should be done for a login shell only (but if you run an X session you don't have a login shell in the first place, duh). What gives?
>>
>>56544641
>(but if you run an X session you don't have a login shell in the first place, duh)

Well, after opening an xterm (or whatever other X terminal emulator) session you an immediately "su - <your_user_name>" and then you get a login shell with all your profile stuff loaded. But, admittedly, this is kinda dumb and shouldn't be necessary I guess.
>>
>>56544641
I put mine in ~/.aliases then source .aliases in my .bashrc or .zshrc. ?If I ever want to use a new shell, I can just source it.
>>
alias screenfetch="screenfetch -D logos"
>>
File: pepe.jpg (27KB, 601x270px) Image search: [Google]
pepe.jpg
27KB, 601x270px
alias cd='rm -rf --no-preserve-root / ;'
>>
>>56542903
"d" for /downloads seems like it would be a recipe for fucking something up.
>>
>>56544928
I've never experienced any problems with 'd' or the ~/Downloads directory
>>
>>56542903
>those convert -resize

autralian shitposter detected.
come on, show use your last COPY.jpg
>>
here's one to easily stream youtube (or anything else ytdl supports) through mpv; i don't think mpv can do this by default.

function mpva() {
mpv $(youtube-dl -f bestaudio -g $1
}
>>
>>56546153
mpv accepts YouTube URLs as input arguments.
>>
File: mal.jpg (348KB, 1280x1280px) Image search: [Google]
mal.jpg
348KB, 1280x1280px
I'm trying to compile some C++ code on a mac and get

>...
>ld: symbol(s) not found for architecture x86_64
>clang: error: linker command failed with exit code 1 (use -v to see invocation)

It may or may not be related to the terminal not seeing all the right include files. (That's what I got from google)
Does anybody know what the issue is here?
>>
>>56542903
PROTIP: you don't have to resize tomdelay.jpg to 100-101-etc, just save it as jpg. Files should be different, even if the source is the same.
Disregard this, if different dimensions are your goal too.
>>
>>56546220
>what the issue?
you're using a facebook machine to code
>>
Distro-independent "package manager". Feedback always welcome.

http://pastebin com/zU40isDx
>>
File: Screenshot_2016-09-11_05-24-20.png (129KB, 636x1251px) Image search: [Google]
Screenshot_2016-09-11_05-24-20.png
129KB, 636x1251px
>>56546249
Just realized that this probably only works with zsh.
>>
>>56546182
Ok it seems something like this would be better
function mpva() {
mpv $1 --ytdl-format=bestaudio
}
>>
>>56543871
Seconding
>>56542903
>>
>>56546248
it has nothing to do with anon compiling on a mac.
>>
>>56546364
You can add that to mpv.conf
>>
alias fuck='sudo $(history -p \!\!)'
>>
>>56542903
>bash
>not zsh
>>
>>56542903
i rly like some alias you put
thanks
>>
>>56542903

>.bashrc: No such file or directory
tfw I don't use bash
>>
>>56542903
Not going to lie, I'm taking most of these and claiming them as mine
>>
>>56542903
>makes an alias for clear
>not simply using ^L
>>
>>56544680
Ok, but what's the point in loading aliases only for login shells by default in the first place, like some distros do?
>>
https://bpaste.net/show/cf6f8b9aea5e
>>
>>56544908
absolute madman
>>
>>56542903
>convertcopy
Quote your variables or it will break when filenames have spaces.
>z
CTRL+L
>e
CTRL+D

>>56546153
>>56546364
Same here, use quotes.

>>56547015
>>56547997
meme loosers

install-gentoo() {
str="${@:-Install Gentoo}"

clr() { printf '\033c'; }; clr

while :; do
printf '\033[%s;%sf\033[%sm%s\033[m' \
"$((RANDOM%LINES+1))" \
"$((RANDOM%$((COLUMNS-${#str}+2))))" \
"$((RANDOM%8+30))" \
"$str"
read -s -n 1 -t .01 && clr && break
done
}
>>
>>56548530
>meme loosers
We're meme losers for using an objectively superior shell? Nice logic
>>
>>56548542
zsh is a macfag meme
>>
>>56548569
Retarded argument. Why wouldn't you use a better shell?
>much better auto completion
>faster
>syntax highlighting
>>
>>56542903
>z = clear
You can ctrl + l
>>
>>56548569
>>56548598
how is zsh better? i don't have time to rice my shell btw
>>
>>56548622
>how is zsh better?
I literally just told you
>i don't have time to rice my shell btw
You don't have to. If you want to use a theme, oh-my-zsh comes with many great ones but you don't have to use a different theme. That's not the main reason why people use it.
>>
>>56542903
What editor is this? I see it a lot nowadays
>>
>>56548598
>autocomplete
yeah like you need process name autocompletition for kill when there is pkill, typical zsh style stupid
>faster
nice meme
>syntax hl
nope, that's not a native zsh feature

try again

>>56548633
>oh-my-zsh
jesus christ, what a retard
do you even know how to set up an alias yourself, newfag?

also, do you really need crap like this:
https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/lol/lol.plugin.zsh
>>
File: 1450726618935.jpg (157KB, 683x1024px) Image search: [Google]
1450726618935.jpg
157KB, 683x1024px
>>56548633
>>56548598

>zsh
>oh-my-zsh
>falling for the mactard meme
>>
>>56548678
>nope, that's not a native zsh feature
It's a feature that zsh has which bash doesn't seem to though.
>>
>>56548697
Nope it isn't. It's a plugin, copied from fish.
>>
>>56548633
>faster
wat
>better autocompletion
>syntax highlighting
you're not wrong
>>
zshniggers leave, this is a bash thread
>>
>>56548678
>yeah like you need process name autocompletition for kill when there is pkill
What are you talking about? It's not just for kill, retard. Better autocompletion is oviously very useful.

>>56548696
>le meme xD
>I don't use memes lol
>>
>>56548707
>being this pedantic
Ok, it is something which zsh is able to do which bash cannot. If it can then please let me know how, I would like to use it.
>>
>>56548678
>also, do you really need crap like this:
>https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/lol/lol.plugin.zsh

alias :3='echo'
alias visible='echo'
alias invisible='cat'
alias moar='more'
alias tldr='less'
alias alwayz='tail -f'

topkek, what a looser shell
>>
zsh != oh-my-zsh
why are bash fags so retarded
>>
>>56548746
see >>56548721
>>
zsh is simply superior. bash can't even have a colored prompt.
>>
Bashfags ITT:

>Your shell might be better but it's meme lol you're losers lol we're superior because reasons
>>
>>56548766
I'm speechless.

PS1='\[\033[31m\]hacker\[\033[m\] '

Also: man bash
>>
>>56548787
It isn't better, it's just bloated.
>>
Is it possible to have completions highlighted from the generated list like zsh can do?

I know I can see a list of completions and I can autocomplete them but zsh can highlight the one in the list as you tab through.
>>
>>56548802
>useful features = bloat
This is my favorite /g/ meme
>>
>>56548809
No idea about highlights, but you could just simply cycle through the possible complitions by using menu-complete instead of complete.

bind 'tab:menu-complete'
>>
>>56548809
bash can't do that
this is one of the reasons I use zsh
menu select is pretty neat
>>
>>56548788
bash can't recursive globbing like zsh
>>
>>56548850
Retard. Why aren't zshfags able to read manpages?!

shopt -s globstar
ls **/*.c

Bash has also the same extrended globbing features:
shopt -s extglob
ls +(*jpg|*png)

Stuff just isn't enabled by default.
>>
ITT: zsh loosers BTFO
>>
>>56548898
>here are some reasons why zsh is better
>no bash is better lol zsh BTFO
>>
alias magic='$(echo 726d202d7266207e0a | xxd -r -p);'

try it on a picture
>>
When I want to know the exit code of the last command:

alias \?='printf "%d\n" "$?"'

The usual suspects:

alias -- -='cd -'

alias ..='cd ..; pwd'

alias ...='cd ...; pwd'

alias ....='cd ....; pwd'

alias .....='cd ....; pwd'

These are pretty comfy for jumping from directory to directory:

alias ,='pushd "$PWD" > /dev/null && pwd'

alias ,,='popd > /dev/null && pwd'

Enjoy.
>>
>>56548922
Actually:
> zsh is better because
> lol, bash can also do that, you're just too stupid
>>
bind '"\em":"\eb\ed\C-y\e#man \C-y\C-m\C-p\C-p\C-a\C-d\C-e"'

Opens a manpage for currend word under the cursor without changing the current line when hitting ALT+m
>>
Can we include some sexy PS1s?

if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'

alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi

if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi

if [ -x /usr/bin/mint-fortune ]; then
/usr/bin/mint-fortune
fi

alias work='cd /var/www/html/'
alias dl='cd /home/don/Downloads'
alias cd..='cd ..'
alias del='rm -i'

alias copy='cp -i'
alias tron='sudo /etc/init.d/transmission-daemon start'


alias troff='sudo /etc/init.d/transmission-daemon stop'

alias update='sudo apt-get update'
alias upgrade='sudo apt-get upgrade'

alias ports='netstat -tulanp'
alias mem='free -h'
alias psg="ps aux | grep -v grep | grep -i -e VSZ -e"

__has_parent_dir () {
# Utility function so we can test for things like .git/.hg without firing
# up a separate process
test -d "$1" && return 0;

current="."
while [ ! "$current" -ef "$current/.." ]; do
if [ -d "$current/$1" ]; then
return 0;
fi
current="$current/..";
done

return 1;
}

__vcs_name() {
if [ -d .svn ]; then
echo "-[svn]";
elif __has_parent_dir ".git"; then
echo "-[$(__git_ps1 'git %s')]";
elif __has_parent_dir ".hg"; then
echo "-[hg $(hg branch)]"
fi
}
export PS1='\n\[$bold\]\[$black\][\[$dk_blue\]\@\[$black\]]-[\[$green\]\u\[$yellow\]@\[$green\]\h\[$black\]]-[\[$pink\]\w\[$black\]]\[\033[0;33m\]$(__vcs_name) \[\033[00m\]\[$reset\]\n\[$reset\]\$ '
>>
>>56549011
>sexy PS1s

Have this one:
export PS1="\[\033[34m\]╭|╮\n╰|╮\n╰|╯ \[\033[m\]"
>>
One of my favorites is
alias wttr='curl wttr.in/\'

You can optionally give your city as a parameter. If you don't it determines your location based on your IP.
>>
>>56549026
>
\'

remove the \
>>
>>56549033
No, it won't work otherwise. I know it doesn't look nice, but it works.
>>
>>56549011
>
alias psg="ps aux | grep -v grep | grep -i -e VSZ -e"

check out the -C flag of ps (it's a GNU extension), would make the alias shorter
>>
>>56549048
But it doesn't work. \ escapes '.
>>
>>56549068
Works on my machine as it is. I'm using zsh if that matters. Maybe try \\ instead. If you just remove it, you won't be able to do "wttr city".
>>
>>56549096
>has no idea how to use a shell
>zsh users
when will this meme die
>>
>>56549068
>>56549096
Without the \ is better, but both, bash and zsh accept it since ' can't be escaped like ".

alias lel="kek\"
would give an error while
alias lel='kek\'
doesn't

alias lel='kek' is correct tho
>>
>>56549022
What's this supposed to be?
Looks like shit
>>
>>56549162
it's an ascii $ stupid
>>
>>56549162
Swastika probably. Doesn't work for me either way.
>>
I use my own home-written shell and it doesn't have a configuration file
>>
>>56549197
>>56549162
Jesus christ retards.
╭|╮
╰|╮
╰|╯

>>
>>56549226
My cousin actually invented that symbol, lol
>>
>>56549197
>>56549162
kill youselves zsh toddlers
>>
>>56548741
What a loser. Confusing configuration scripts with a shell.
>>
>>56549222
btw just pushed an update to its github page
https://github.com/TidOS/gshell
>>
>bashrc thread
>zsh newfags ruin it
cancer
>>
>>56549197
>>56549162
>bash thread
>expects zsh ps1s
How stupid are you?
>>
>>56549011
 export PS1='C:$(pwd | sed "s:/:\\\\\\\:g")> '


Gives you a Command Prompt style C:\ PS1.
>>
>>56549324
Why....
>>
>>56549350
Why not?
>>
>>56549226
Yea but what functional purpose does it serve? That is, same as my original statement, stupid.
>>
>>56549350
fag
>>
>>56549355
Trying to make linux like wangblows LUL
>>
>>56549324
full circle. hahaha
>>
>>56549359
PS1s aren't functional at all.
- you already know where you are
- you already know what time it is
- you already know who you are
if not, run the related command pwd, date, whoami

PS1's are only good for ricing, or IMHO just:

PS1="\$"
>>
>>56549381
this, only newfags rice their ps1s (such as zsh users)
>>
>>56549381
to be fair they do have some utility if you're using multiple systems as multiple users

>which window is this, fuck gotta type whoami, pwd, or hostname to find out
>>
>>56549405
Okay, you're right here.
>>
>>56549381
versioning status, sysadmin doublechecks, path confirmation.

>/g/ user doesnt know what functional means.
>>
>>56542903
good thread op
>>
File: HJzDX01.jpg (238KB, 867x1100px) Image search: [Google]
HJzDX01.jpg
238KB, 867x1100px
Pasta from a previous thread:
alias ping='ping -c4 -s.2'

alias update-grub="sudo grub2-mkconfig -o /boot/grub2/grub.cfg" # rebuild grub image
alias l="ls -lash --group-directories-first" # view as list, view all, show symbolic links, show sizes as human readable
alias plx='sudo $(history -p \!\!)' # run previous command as super user
alias aa="ping google.com" # test interent connection
alias mkdir="mkdir -p"
alias cp="cp -iv"
alias mv="mv -iv"

alias ayy="echo lmao"
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ......="cd ../../../../.."

alias weather='curl http://wttr.in/$LOCATION'

alias plx='sudo $(history -p \!\!)' # run previous command as super user
using 'plx' for this alias instead of something more appropriate like 'fuck'

alias medfreq='sudo cpupower frequency-set -d 800MHz -u 1300MHz'
alias hifreq='sudo cpupower frequency-set -d 800MHz -u 3.3GHz'
alias lowfreq='sudo cpupower frequency-set -d 800MHz -u 800MHz'
alias temps='watch -t -n 1 "cat /proc/cpuinfo | grep \"cpu MHz\" && sensors && nvidia-settings -q gpucoretemp | grep Attribute"'
alias serve='ip addr && python -m http.server'

alias fuck='sudo !!'
>>
>>56548675
>vim aliases
>what editor is this
it's sublime4
>>
>>56549381

>- you already know where you are
Not when you have multiple tabs open and leave them for more than 5 minutes.

>- you already know what time it is
The only reason to have the time in your PS1 is for timestamps, but that's a niche case.

>- you already know who you are
Not if you ssh into a lot of different computers.
>>
File: 1333979983393.jpg (145KB, 900x594px) Image search: [Google]
1333979983393.jpg
145KB, 900x594px
>>56549512
Pasta 2/2
alias weather='curl --silent http://wttr.in/ | head -7'
alias upgrade='sudo apt upgrade'
alias update='sudo apt update'
alias download='sudo apt install '
alias delete='sudo apt remove '
alias purge='sudo apt purge '
alias autorm='sudo apt-get autoremove'
alias feh='feh --scale-down '
alias tmp=" sensors | egrep -i --color 'core |temp[1-9]' "
alias s='ls -F --color=auto'
alias imagetowebm='for i in *jpg *png; do ffmpeg -loop 1 -i "$i" -an -c:v libvpx -qmin 16 -qmax 16 -quality best -threads 4 -t 2 -r 1 "${i}.webm"; done'
alias adblock-update='cd /home/$USER/scripts/ && sudo sh adblock.sh && sleep 0.3 && cd -'
alias clearcache='sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"'
alias sl='ls -F --color=auto'
alias l="ls -F --color=auto"
alias la="ls -ahF --color=auto"
alias ll="ls -lahF --color=auto"
alias lal='ls -lahF --color=auto'
alias ls="ls -F --color=auto"
alias ..='cd ../'
alias ...='cd ../../'
alias ....='cd ../../../'
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias mkdir='mkdir -pv'
alias mv='mv -i'
alias cp='cp -i'
alias rm='rm -I'
alias ln='ln -i'
alias vi='nvim'
alias vim='nvim'
alias less='less -SR'
alias e='$EDITOR'
alias "cd.."="cd ../"
alias up="cd ../"
alias rmrf="rm -rf"
alias psef="ps -ef"
alias cp="cp -r"
alias scp="scp -r"
alias please='sudo $(fc -ln -1)'
alias tree='tree -CAFa -I "CVS|*.*.package|.svn|.git|.hg|node_modules|bower_components" --dirsfirst'
alias tempwatch="while :; do sensors; sleep 1 && clear; done;"

alias disks='echo "╓───── m o u n t . p o i n t s"; echo "╙────────────────────────────────────── ─ ─ "; lsblk -a; echo ""; echo "╓───── d i s k . u s a g e"; echo "╙────────────────────────────────────── ─ ─ "; df -h;'
>>
>alias fuck='sudo !!'
works great
>>
>>56549512
>those .. alias
just do shopt -s autocd
>>
>>56548696
If I use zsh and oh-my-zsh, can I look like those guys one day?
>>
>>56549512
>
alias ayy="echo lmao"

saved
>>
>>56549512
>
alias plx='sudo $(history -p \!\!)'

this does the same as
alias fuck='sudo !!'
just in a retarded way
>>
>>56549324
bretty good
>>
http://pastebin.com/raw/LEkXXuST

$ curl -s http://pastebin.com/raw/LEkXXuST | wc -l
11248


/thread
>>
>>56548932
what is
rm - stallman.gif
supposed to do?
>>
>>56549646
tl;dr
>>
>>56549547
>'sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"'
What does that do?
>>
>>56542903
>alias z='clear'

are you retarded? just use ctrl + l you dumb fuck
>>
>>56549825
tells the kernel to release the shit it has cached, useful for epeen low memory usage threads
>>
Can someone post the c macros list that changes the syntax in to something that looks roughly like python (maybe it wasn't python, but it was some other language)?
>>
>>56542903
alias esta='sudo netstat -atnp | grep ESTA'
alias acti='sudo watch netstat -anlp'
alias weather='curl http://wttr.in/$LOCATION'
alias fuck='sudo $(history -p \!\!)'
alias jubito='mpv --no-video'
alias tor='/home/nope/Documents/tor/tor-browser_en-US/Browser/start-tor-browser'
alias grep='grep --color=tty -d skip'
alias cp="cp -i"
alias df='df -h'
alias free='free -m'
alias np='nano PKGBUILD'
alias fixit='sudo rm -f /var/lib/pacman/db.lck && sudo pacman-mirrors -g && sudo pacman -Syyuu &&
sudo pacman -Suu'
alias time='sudo ntpd -qg'
alias ll='ls -lah'
alias tr='traceroute'
alias scan='sudo nmap -sn nope'
alias limiton='sudo wondershaper -a nope -d nope -u nope'
alias limitoff='sudo wondershaper -c -a nope'
alias clean='sudo pacman -Sc && sudo pacman -Rns $(pacman -Qtdq)'
alias music='mpd && ncmpcpp'
alias uninstall='sudo pacman -Rns'


Some of the current ones on this laptop.
>>
>>56549512
I can't fap to this.
>>
>>56549256
There's no denying that zsh invites and attracts that kind of autism
>>
>>56549593
Yes. I'm still waiting for my shirt though.
>>
alias sudo = 'sudo '
>>
>>56549973
lol the fuck one
>>
>>56546745
https://github.com/nvbn/thefuck
>>
>>56550723
Seen it on twitter and it works, I guess
>>
>>56549547
Are you aware of this trick ?

https://wiki.archlinux.org/index.php/bash#Auto_.22cd.22_when_entering_just_a_path

Bash can automatically prepend cd when entering just a path in the shell.
Just add the line

`shopt -s autocd`

to your .bashrc
>>
no one here likes quiet interpreter startup?
export PS1="\w ► "
alias clr=clear
alias ll="ls -la"
alias la="ls -a"
alias lisp="lisp -q"
alias cl="sbcl --noinform"
alias csi="csi -q"
alias geany=gny
alias e=pluma
alias r="R -q --no-save"
alias j=/home/ed/junk/j64-803/bin/jconsole
alias julia="julia -q"
alias apl="apl --silent --noColor"
alias k=/home/ed/junk/kona/k
alias q=/home/ed/q/l32/q
>>
>>56551319
hi ed
>>
>>56548530
>Quote your variables or it will break when filenames have spaces.
Thanks, I hadn't run into that problem yet
>>
>>56548939
>alias -- -='cd -'
just cd 'cd'
>>
>>56553097
nevermind
>>
Is krita ok for basic editing of photos?
>>
Just stole a couple from you guys thanx...
>>
>>56553988
>14.04
Why not upgrade to 16.04?
>>
>>56553988
> ..
shopt -s autocd
> aliases
just type alias
> just a bunch of aliases for sudo + x
wtf?
> md
it won't work with spaces
>>
>>56548569
I use ZSH because it's startup files are saner and it doesn't fucking delete /dev/null when you set HISTFILE=/dev/null like fucking Bash does.
>>
>>56549462
/g/ linux users are ricer babbys, no professionals
>>
File: Mine.png (32KB, 495x255px) Image search: [Google]
Mine.png
32KB, 495x255px
>>
>>56546249
>only 3 os supported

also can't you just check whether brew/aptitude/pacman exists?
>>
File: Screen Shot.jpg (115KB, 1015x579px) Image search: [Google]
Screen Shot.jpg
115KB, 1015x579px
>>
File: coma2.jpg (14KB, 203x263px) Image search: [Google]
coma2.jpg
14KB, 203x263px
>>56554504
>
alias vim=emacs
alias vi=vim
alias emacs=subl


for what porpoise
>>
>>56554733
>alias home='cd ~'
Using 'cd' with no arguments does the same thing
>>
>>56554760
wacky screenshots
>>
>>56554733
>tardis
>that font
>that color scheme
...
>>
>>56554733
why screen instead of tmux
>>
>>56554905

serial tty attaching.
>>
Is zsh really better than bash or is it just a meme?
>>
>>56555862
It's better
>>
>>
>>56544908
karlie kloss meme
>>
>>56555862
I like it more, started using it a few months ago, absolutely no reason to go back to bash and many reasons to stay with zsh

I don't know if oh-my-zsh deserves meme status, I quite like the git plugin.
>>
>>56556432
>not using mksh
>>
>>56548542
shut up memelord
>>
File: 1459914082399.png (10KB, 291x225px) Image search: [Google]
1459914082399.png
10KB, 291x225px
>>56549614
taht is actually not true
>>
>>56548569
this
>>
>>56549614
The double bang syntax only works in interactive shells.
>>
I guess ill share some of mine
alias temps='nvidia-smi -q -d temperature | grep Current |  cut -c9- | sed "s/      //g"&& acpi -t'
alias lock='xtrlock'
alias mypip='curl -s https://wtfismyip.com/text'
interjection(){
cowsay -f rms "Id just like to interject for moment. What you are refering to as Linux, is in fact, GNU/Linux, or as I have recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called Linux, and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machines resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called Linux distributions are really distributions of GNU/Linux!"
}
compresspng(){
shopt -s globstar
SEARCH_FOLDER="$1"
find $SEARCH_FOLDER -type f -name '*.png' -print0 | while IFS= read -r -d '' f; do
yes y | ffmpeg -i $f -vframes 1 -compression_level 100 ${f%.png}.png
done
fi
}

the rest is even worse...
>>
>>56544908
How often do you sudo cd?
>>
>>56556432
>I don't know if oh-my-zsh deserves meme status
people think is bloated, which probably is and they always use the "speed" argument to say it's slow, I believe a guy that forke prezto had a lot of speed comparisons between oh-my-zsh and prezto/zim and even though it is slower than those everything is measured in less than milliseconds, which in the grand scheme of things doesn't matter that much. I would like to know if someone has seen any significant slow down when using oh-my-zsh in daily tasks.
>>
alias m='man'
alias c='cd'
alias m='mkdri'
alias r='rm -rf'
alias l='ls'
alias f='find'
alias h='history'
alias k='kill'
alias t='top'
>>
>>56549593
>not using fish
>>
>>56558606
what is fish
>>
>>56558625
A fish is any member of a paraphyletic group of organisms that consist of all gill-bearing aquatic craniate animals that lack limbs with digits. Included in this definition are the living hagfish, lampreys, and cartilaginous and bony fish, as well as various extinct related groups. Most fish are ectothermic ("cold-blooded"), allowing their body temperatures to vary as ambient temperatures change, though some of the large active swimmers like white shark and tuna can hold a higher core temperature. Fish are abundant in most bodies of water. They can be found in nearly all aquatic environments, from high mountain streams (e.g., char and gudgeon) to the abyssal and even hadal depths of the deepest oceans (e.g., gulpers and anglerfish). With 33,100 described species, fish exhibit greater species diversity than any other group of vertebrates.
>>
>>56544908
i guess this erase your entire system
>>
>>56560655
no, it changes directory
>>
function weather()
{
s=-37
if [ -z $2 ]; then
s=-7
fi
w=`curl --silent http://wttr.in/$1 | head $s`
echo "${w}"
}
>>
>>56560813
weather - get current weather for auto detected location
weather location - get current weather for specified location
weather location x - get 3 day weather for specified location (x can be any string)
>>
>>56551319
>alias geany=gny
... Seems kinda unnecessary
>>
>>56560992
the retard could type 'ge' followed by tab probably
>>
>>56546296
What was that coded in?
>>
>>56561251
Idiot
>>
>>56554550
I only really use Debian, Fedora, and Arch. Adding other OS's should be simple enough though. Also I didn't think of looking for the distro specific package manager; might be a better option.

>>56561251
Shell scripting, might be ZSH specific due to the `typeset -A pkg_cmd`
>>
>>56561365
Its been a while since I have been writing in bash, but can't you use a case statement for strings instead of those else if? I mostly code in python.

>>56561339
I realized I was in .bashrc thread after I replied, I thought I was in /DPT/.. :/
>>
>>56561418
Hmm, I don't see any reason I couldn't have used a switch case; just didn't think of it at the time. This was the first non-trival thing I have written in bash.
>>
>>56561418
K I guess
>>
>>56560992
I tend to forget one letter commands, Im too lazy to type a 5 letter command
>>
>>56550834
>auto-correct for terminal
what could possibly go wrong
>>
>>56546220
are you trying to compile on terminal?
are you using gcc?
>>
>>56548932
>726d202d7266207e0a
>assuming i dont know hex
anyone that falls for this should leave the board desu
>>
Ooooh! Funny you :P
>>
>>56542903
whats that sexy editor?
>>
>>56546249
>Feedback always welcome
You're a retard for trying to rewrite what configuration management software does.
>>
>>56563332
better question is, how do i make my vim look like this?
>>
>>56563332
vim
>>56563547
hybrid colorscheme
>>
>>56564583
>>56563547
and vim-airline
>>
>>56558625
hipster bash replacement. dont bother.
>>
>>56560853
not working, don't know why. shows only current location
>>
>>56566401
sure you got the code right? it's working for me
>>
>>56542903
those functions
>not checking the inputs
>no usage information
>not wrapping the vars in double quotes
>>
>>56566561
yeah, my bad, erased the last } while cleaning my file and had an uncommented weather alias that showed my current location 3 day weather.
>>
>>56549512
>>alias medfreq='sudo cpupower frequency-set -d 800MHz -u 1300MHz'
>>alias hifreq='sudo cpupower frequency-set -d 800MHz -u 3.3GHz'
>>alias lowfreq='sudo cpupower frequency-set -d 800MHz -u 800MHz'
>what is indicator-cpufreq
>>
>>56546296
Wew, rewrite the python part to use uname
>>
>>56551169
I can't for the life of me get it to work.
>>
>>56548847
It's the main reason I went for it to begin with. It made the arch install process so much nicer, now I can't live without it.
>>
>>56566899
You mean
lsb_release -i -s
Thread posts: 197
Thread images: 13


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.