Remove functions that are now binaries.
Also, input config is now part of bash.org
This commit is contained in:
parent
d7db2c747f
commit
56200f323d
@ -201,64 +201,6 @@ colors() {
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Meteo
|
||||
#+BEGIN_SRC bash
|
||||
meteo() {
|
||||
if [ -n "$*" ]; then
|
||||
address="wttr.in/"
|
||||
address+=$*
|
||||
address+="?lang=fr"
|
||||
curl "$address"
|
||||
else
|
||||
address="wttr.in/"
|
||||
address+="?lang=fr"
|
||||
curl "$address"
|
||||
fi
|
||||
}
|
||||
alias meteo=meteo
|
||||
#+END_SRC
|
||||
|
||||
*** Upload using transfer.sh
|
||||
#+BEGIN_SRC bash
|
||||
upload() {
|
||||
# write to output to tmpfile because of progress bar
|
||||
tmpfile=$(mktemp -t transferXXX)
|
||||
# basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9]/-/g')
|
||||
curl --progress-bar --upload-file "$1" "https://transfer.sh/" >> $tmpfile;
|
||||
cat $tmpfile | xsel -ib;
|
||||
echo "Copied:" $(cat $tmpfile);
|
||||
rm -f $tmpfile;
|
||||
}
|
||||
alias upload=upload
|
||||
#+END_SRC
|
||||
|
||||
*** Extract archive
|
||||
usage: ex <file>
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
ex ()
|
||||
{
|
||||
if [ -f $1 ] ; then
|
||||
case $1 in
|
||||
*.tar.bz2) tar xjf $1 ;;
|
||||
*.tar.gz) tar xzf $1 ;;
|
||||
*.bz2) bunzip2 $1 ;;
|
||||
*.rar) unrar x $1 ;;
|
||||
*.gz) gunzip $1 ;;
|
||||
*.tar) tar xf $1 ;;
|
||||
*.tbz2) tar xjf $1 ;;
|
||||
*.tgz) tar xzf $1 ;;
|
||||
*.zip) unzip $1 ;;
|
||||
*.Z) uncompress $1;;
|
||||
*.7z) 7z x $1 ;;
|
||||
*) echo "'$1' cannot be extracted via ex()" ;;
|
||||
esac
|
||||
else
|
||||
echo "'$1' is not a valid file"
|
||||
fi
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
*** Tree display
|
||||
=tre= is a shorthand for =tree= with hidden files and color enabled, ignoring
|
||||
the =.git= directory, listing directories first. The output gets piped into
|
||||
@ -429,3 +371,67 @@ This is important for termite to work when sshing in remote machines.
|
||||
PATH=~/.emacs.d/bin:$PATH
|
||||
export PATH
|
||||
#+END_SRC
|
||||
|
||||
* Input
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.inputrc
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:END:
|
||||
|
||||
Completion:
|
||||
#+BEGIN_SRC conf
|
||||
# Single tab for autocompletion
|
||||
set show-all-if-ambiguous on
|
||||
|
||||
# Ignore case for completion
|
||||
set completion-ignore-case on
|
||||
#+END_SRC
|
||||
|
||||
vi mode:
|
||||
#+BEGIN_SRC conf
|
||||
# VI mode (works in bash and zsh)
|
||||
set editing-mode vi
|
||||
|
||||
# Show which mode (normal or insert)
|
||||
set show-mode-in-prompt on
|
||||
|
||||
# Show the mode by changing the cursor
|
||||
set vi-ins-mode-string \1\e[6 q\2
|
||||
set vi-cmd-mode-string \1\e[2 q\2
|
||||
#+END_SRC
|
||||
|
||||
Key-bindings for vi-mode:
|
||||
#+BEGIN_SRC conf
|
||||
set keymap vi-command
|
||||
# these are for vi-command mode
|
||||
Control-l: clear-screen
|
||||
Control-a: beginning-of-line
|
||||
Control-e: end-of-line
|
||||
Control-w: "\C-aisudo \C-e"
|
||||
|
||||
set keymap vi-insert
|
||||
# these are for vi-insert mode
|
||||
Control-l: clear-screen
|
||||
Control-a: beginning-of-line
|
||||
Control-e: end-of-line
|
||||
Control-w: "\C-asudo \C-e"
|
||||
#+END_SRC
|
||||
|
||||
Colorized completion
|
||||
#+begin_src conf
|
||||
# Color files by types
|
||||
set colored-stats On
|
||||
# Append char to indicate type
|
||||
set visible-stats On
|
||||
# Mark symlinked directories
|
||||
set mark-symlinked-directories On
|
||||
# Color the common prefix
|
||||
set colored-completion-prefix On
|
||||
# Color the common prefix in menu-complete
|
||||
set menu-complete-display-prefix On
|
||||
#+end_src
|
||||
|
||||
Don't echo =^C= after =Ctrl+C= is pressed.
|
||||
#+begin_src conf
|
||||
set echo-control-characters off
|
||||
#+end_src
|
||||
|
@ -88,70 +88,6 @@
|
||||
</fontconfig>
|
||||
#+end_src
|
||||
|
||||
* Input
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.inputrc
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:END:
|
||||
|
||||
Completion:
|
||||
#+BEGIN_SRC conf
|
||||
# Single tab for autocompletion
|
||||
set show-all-if-ambiguous on
|
||||
|
||||
# Ignore case for completion
|
||||
set completion-ignore-case on
|
||||
#+END_SRC
|
||||
|
||||
vi mode:
|
||||
#+BEGIN_SRC conf
|
||||
# VI mode (works in bash and zsh)
|
||||
set editing-mode vi
|
||||
|
||||
# Show which mode (normal or insert)
|
||||
set show-mode-in-prompt on
|
||||
|
||||
# Show the mode by changing the cursor
|
||||
set vi-ins-mode-string \1\e[6 q\2
|
||||
set vi-cmd-mode-string \1\e[2 q\2
|
||||
#+END_SRC
|
||||
|
||||
Key-bindings for vi-mode:
|
||||
#+BEGIN_SRC conf
|
||||
set keymap vi-command
|
||||
# these are for vi-command mode
|
||||
Control-l: clear-screen
|
||||
Control-a: beginning-of-line
|
||||
Control-e: end-of-line
|
||||
Control-w: "\C-aisudo \C-e"
|
||||
|
||||
set keymap vi-insert
|
||||
# these are for vi-insert mode
|
||||
Control-l: clear-screen
|
||||
Control-a: beginning-of-line
|
||||
Control-e: end-of-line
|
||||
Control-w: "\C-asudo \C-e"
|
||||
#+END_SRC
|
||||
|
||||
Colorized completion
|
||||
#+begin_src conf
|
||||
# Color files by types
|
||||
set colored-stats On
|
||||
# Append char to indicate type
|
||||
set visible-stats On
|
||||
# Mark symlinked directories
|
||||
set mark-symlinked-directories On
|
||||
# Color the common prefix
|
||||
set colored-completion-prefix On
|
||||
# Color the common prefix in menu-complete
|
||||
set menu-complete-display-prefix On
|
||||
#+end_src
|
||||
|
||||
Don't echo =^C= after =Ctrl+C= is pressed.
|
||||
#+begin_src conf
|
||||
set echo-control-characters off
|
||||
#+end_src
|
||||
|
||||
* GnuPG
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.gnupg/gpg-agent.conf
|
||||
|
Loading…
Reference in New Issue
Block a user