Skip to content

Instantly share code, notes, and snippets.

@ssh0
Last active March 8, 2016 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssh0/94a50a02a45687a6cee2 to your computer and use it in GitHub Desktop.
Save ssh0/94a50a02a45687a6cee2 to your computer and use it in GitHub Desktop.
コマンドラインで動かすファイルマネージャrangerの設定 ref: http://qiita.com/ssh0/items/fe85da119c93333ba34e
sudo apt-get install ranger w3m lynx highlight atool mediainfo xpdf caca-utils
ranger --copy-config=all
brew install ranger w3m lynx highlight atool mediainfo xpdf libcaca imlib2
ranger --copy-config=all
# ranger supports enhanced previews. If the option "use_preview_script"
# is set to True and this file exists, this script will be called and its
# output is displayed in ranger. ANSI color codes are supported.
function ranger() {
if [ -z "$RANGER_LEVEL" ]; then
/usr/local/bin/ranger $@
else
exit
fi
}
# Compatible with ranger 1.5.3 through 1.7.*
#
# Change the prompt when you open a shell from inside ranger
#
# Add this line to your .bashrc for it to work.
[ -n "$RANGER_LEVEL" ] && PS1="$PS1"'(in ranger) '
## Main prompt
build_prompt() {
RETVAL=$?
prompt_status
prompt_virtualenv
prompt_context
prompt_dir
prompt_git
prompt_ranger # <<<
prompt_hg
prompt_end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment