From fe7f8ca0d2d3946f22a29d357086281e95185591 Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 16 Oct 2010 05:46:25 +0200 Subject: Polished ranger.py --- ranger.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ranger.py') diff --git a/ranger.py b/ranger.py index fbceab23..240b3687 100755 --- a/ranger.py +++ b/ranger.py @@ -1,5 +1,5 @@ #!/usr/bin/python -O -# coding=utf-8 +# -*- coding: utf-8 -*- # # Ranger: Explore your forest of files from inside your terminal # Copyright (C) 2009, 2010 Roman Zimbelmann @@ -20,7 +20,7 @@ # Embed a script which allows you to change the directory of the parent shell # after you exit ranger. Run it with the command: source ranger ranger """": -if [ $1 ]; then +if [ ! -z "$1" ]; then $@ --fail-unless-cd && if [ -z "$XDG_CONFIG_HOME" ]; then cd "$(grep \^\' ~/.config/ranger/bookmarks | cut -b3-)" @@ -36,7 +36,7 @@ return 1 import sys # When using the --clean option, not even bytecode should be written. -# Need to find out if --clean is used as soon as possible. +# Thus, we need to find out if --clean is used as soon as possible. try: argv = sys.argv[0:sys.argv.index('--')] except: -- cgit 1.4.1-2-gfad0 efs/?id=ca7baacd62d642f160f1ad66fb13d894e65dbb03'>refs log blame commit diff stats