bash: Piccole modifiche
* Sostituisce molte virgolette singole con doppie virgolette * Usa opzioni lunghe per gli alias di exa/ls * Aggiunge shebang a .bashrc * Modifica qualche commento
This commit is contained in:
parent
f466c54d57
commit
6edac8ecfa
|
@ -1,7 +1,6 @@
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
# .bash_aliases
|
# ~/.bash_aliases: Alias definitions
|
||||||
# Alias definitions
|
# Questo file viene letto da ogni shell bash interattiva, dopo il file '~/.bashrc'
|
||||||
# Questo file viene letto da ogni shell bash, dopo il file '~/.bashrc'
|
|
||||||
|
|
||||||
# Common commands
|
# Common commands
|
||||||
alias q='exit'
|
alias q='exit'
|
||||||
|
@ -14,28 +13,28 @@ alias o='xdg-open' # open any file in the configured default application
|
||||||
#alias k='kill'
|
#alias k='kill'
|
||||||
|
|
||||||
# exa/ls aliases
|
# exa/ls aliases
|
||||||
alias ls="exa --icons --color=auto --group-directories-first"
|
alias ls="exa --icons --color=always --group-directories-first"
|
||||||
alias la="ls -a"
|
alias la="ls --all"
|
||||||
alias ll="ls -al -g -h"
|
alias ll="ls --all --long --group --header"
|
||||||
alias tree="ll --tree -L 3"
|
alias tree="ll --tree -L 3"
|
||||||
|
|
||||||
# Colorize grep output (good for log files)
|
# Colorize grep output (good for log files)
|
||||||
alias grep='grep --color=auto'
|
alias grep="grep --color=auto"
|
||||||
alias egrep='egrep --color=auto'
|
alias egrep="egrep --color=auto"
|
||||||
alias fgrep='fgrep --color=auto'
|
alias fgrep="fgrep --color=auto"
|
||||||
|
|
||||||
# confirm before overwriting something
|
# confirm before overwriting something
|
||||||
alias cp="cp -i"
|
alias cp="cp -i"
|
||||||
alias mv='mv -i'
|
alias mv="mv -i"
|
||||||
alias rm='rm -i'
|
alias rm="rm -i"
|
||||||
|
|
||||||
# Directories
|
# Directories
|
||||||
alias home='cd ~'
|
alias home="cd ~"
|
||||||
alias data='cd /Data'
|
alias data="cd /Data"
|
||||||
alias root='cd /'
|
alias root="cd /"
|
||||||
alias ..='cd ..'
|
alias ..="cd .."
|
||||||
alias ...='cd ..; cd ..'
|
alias ...="cd ..; cd .."
|
||||||
alias ....='cd ..; cd ..; cd ..'
|
alias ....="cd ..; cd ..; cd .."
|
||||||
# Cartelle in home e partizione Data
|
# Cartelle in home e partizione Data
|
||||||
alias libri="cd $HOME/Libri"
|
alias libri="cd $HOME/Libri"
|
||||||
alias dendron-git="cd /Data/Dendron && git status"
|
alias dendron-git="cd /Data/Dendron && git status"
|
||||||
|
@ -45,18 +44,18 @@ alias python-lezioni="cd /Data/Programmazione/python-lezioni && la"
|
||||||
alias programmazione="cd /Data/Programmazione && la"
|
alias programmazione="cd /Data/Programmazione && la"
|
||||||
|
|
||||||
# Git
|
# Git
|
||||||
alias g='git'
|
alias g="git"
|
||||||
alias g-ad='git add'
|
alias g-ad="git add"
|
||||||
alias g-st='git status'
|
alias stat="git status"
|
||||||
alias g-com='git commit'
|
alias commit="git commit"
|
||||||
#alias g-pl='git pull'
|
alias pull="git pull"
|
||||||
#alias g-ps='git push'
|
alias push="git push"
|
||||||
|
|
||||||
# apt
|
# apt
|
||||||
alias upgrade="sudo apt update && sudo apt upgrade"
|
alias upgrade="sudo apt update && sudo apt upgrade"
|
||||||
alias apt-info="apt show"
|
alias apt-info="apt show"
|
||||||
|
|
||||||
# Altri programmi usati di frequente
|
# Altri programmi usati di frequente
|
||||||
alias dolphin='dolphin --new-window'
|
alias dolphin="dolphin --new-window"
|
||||||
alias dendron="/usr/bin/codium --new-window /Data/Dendron/dendron.code-workspace"
|
alias dendron="/usr/bin/codium --new-window /Data/Dendron/dendron.code-workspace"
|
||||||
alias email="thunderbird"
|
alias email="thunderbird"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||||
# for examples
|
# for examples
|
||||||
|
@ -72,7 +73,7 @@ xterm*|rxvt*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# enable color support of ls and also add handy aliases
|
# Enable color support of ls and grep
|
||||||
if [ -x /usr/bin/dircolors ]; then
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
|
@ -93,12 +94,12 @@ fi
|
||||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||||
|
|
||||||
# Alias definitions.
|
# Alias definitions.
|
||||||
# You may want to put all your additions into a separate file like
|
# Source my custom aliases, which are stored in a separate file
|
||||||
# ~/.bash_aliases, instead of adding them here directly.
|
# ~/.bash_aliases, instead of adding them here directly.
|
||||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||||
|
|
||||||
if [ -f ~/.bash_aliases ]; then
|
if [ -f "$HOME/.bash_aliases" ]; then
|
||||||
. ~/.bash_aliases
|
. "$HOME/.bash_aliases"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# enable programmable completion features (you don't need to enable
|
# enable programmable completion features (you don't need to enable
|
||||||
|
|
Loading…
Reference in New Issue