This zsh widget allows you to list files in the current directory without interrupting the command you are typing. Usage Hit <tab> in the middle of any command. It will list all files below the command line. Hit <space><tab> on an empty command line. It will list directories. Hit <space><space><tab> on an empty command line. It will …
Colorize your stdout with xcol
This little tool will colorize its standard input with a different color for each one of its arguments. Usage xcol imitates the usage of grep, so you can pipe any stdout to it
1 |
lspci | xcol audio vga pci usb amd ati hdmi ethernet radeon amd intel |
, or read from a file
1 2 |
xcol fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge cmov pat pse36 clflush mmx fxsr sse \ sse2 ht syscall nx mmxext cache cores amd /proc/cpuinfo |
Just like grep . You can match any regular expression that sed would accept
1 2 3 |
sudo netstat -putan | xcol httpd sshd dnsmasq pulseaudio conky tor Telegram firefox \ "[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+" ":[[:digit:]]+" "tcp." "udp." \ LISTEN ESTABLISHED TIME_WAIT |
…
Completely remove a file from a git repository with git forget-blob
Usage
1 |
git forget-blob file_to_forget |
Installation Get the script from github and make it executable. To do it in one step, paste the following on your terminal
1 2 |
sudo wget https://raw.githubusercontent.com/nachoparker/git-forget-blob/master/git-forget-blob.sh -O /usr/local/bin/git-forget-blob sudo chmod +x /usr/local/bin/git-forget-blob |
If you don’t like installing to /usr/local/bin using sudo , just copy git-forget-blob wherever you like. It will work as long as the file is in the $PATH with execute permissions. …
Smart tmux sessions
Usage Instead of tmux just type
1 |
start_tmux |
Installation Get the code from github, and append it to your .zshrc or .bashrc. To do it in one step, paste in zsh
1 |
wget https://raw.githubusercontent.com/nachoparker/smart-tmux-sessions/master/start_tmux.sh -O - >> ~/.zshrc |
, or in bash
1 |
wget https://raw.githubusercontent.com/nachoparker/smart-tmux-sessions/master/start_tmux.sh -O - >> ~/.bashrc |
New shell sessions will automatically start or resume a tmux session. Comment last line of .zshrc or .bashrc after …