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
|
||||
# .bash_aliases
|
||||
# Alias definitions
|
||||
# Questo file viene letto da ogni shell bash, dopo il file '~/.bashrc'
|
||||
# ~/.bash_aliases: Alias definitions
|
||||
# Questo file viene letto da ogni shell bash interattiva, dopo il file '~/.bashrc'
|
||||
|
||||
# Common commands
|
||||
alias q='exit'
|
||||
|
@ -14,28 +13,28 @@ alias o='xdg-open' # open any file in the configured default application
|
|||
#alias k='kill'
|
||||
|
||||
# exa/ls aliases
|
||||
alias ls="exa --icons --color=auto --group-directories-first"
|
||||
alias la="ls -a"
|
||||
alias ll="ls -al -g -h"
|
||||
alias ls="exa --icons --color=always --group-directories-first"
|
||||
alias la="ls --all"
|
||||
alias ll="ls --all --long --group --header"
|
||||
alias tree="ll --tree -L 3"
|
||||
|
||||
# Colorize grep output (good for log files)
|
||||
alias grep='grep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias grep="grep --color=auto"
|
||||
alias egrep="egrep --color=auto"
|
||||
alias fgrep="fgrep --color=auto"
|
||||
|
||||
# confirm before overwriting something
|
||||
alias cp="cp -i"
|
||||
alias mv='mv -i'
|
||||
alias rm='rm -i'
|
||||
alias mv="mv -i"
|
||||
alias rm="rm -i"
|
||||
|
||||
# Directories
|
||||
alias home='cd ~'
|
||||
alias data='cd /Data'
|
||||
alias root='cd /'
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ..; cd ..'
|
||||
alias ....='cd ..; cd ..; cd ..'
|
||||
alias home="cd ~"
|
||||
alias data="cd /Data"
|
||||
alias root="cd /"
|
||||
alias ..="cd .."
|
||||
alias ...="cd ..; cd .."
|
||||
alias ....="cd ..; cd ..; cd .."
|
||||
# Cartelle in home e partizione Data
|
||||
alias libri="cd $HOME/Libri"
|
||||
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"
|
||||
|
||||
# Git
|
||||
alias g='git'
|
||||
alias g-ad='git add'
|
||||
alias g-st='git status'
|
||||
alias g-com='git commit'
|
||||
#alias g-pl='git pull'
|
||||
#alias g-ps='git push'
|
||||
alias g="git"
|
||||
alias g-ad="git add"
|
||||
alias stat="git status"
|
||||
alias commit="git commit"
|
||||
alias pull="git pull"
|
||||
alias push="git push"
|
||||
|
||||
# apt
|
||||
alias upgrade="sudo apt update && sudo apt upgrade"
|
||||
alias apt-info="apt show"
|
||||
|
||||
# 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 email="thunderbird"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/bash
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
@ -72,7 +73,7 @@ xterm*|rxvt*)
|
|||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
# Enable color support of ls and grep
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
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 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.
|
||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
if [ -f "$HOME/.bash_aliases" ]; then
|
||||
. "$HOME/.bash_aliases"
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
|
|
Loading…
Reference in New Issue