通常、 j something
は作業ディレクトリを切り替えます。 しかし、そうする必要はありません。 場合によっては、ディレクトリをstdoutに出力するだけで済みます。 例えば
open `j --no-cd something`
これにより、OSXで宛先ディレクトリのFinderが起動する可能性があります。
この機能をハックするのが難しいかどうかはわかりませんが、すばらしいツールに感謝します。
jo <dir>
は、OS固有のファイルブラウザを開きます。
autojump <dir>
は最初の一致を出力します。 引数が渡されない場合、autojumpは最も頻繁に使用されるディレクトリを出力します。
さらに情報が必要な場合は、 autojump --stats
とawk / sed / tr /などの任意の組み合わせを使用してください。
私はfasdが好きで、:jコマンドを与えるためにこれを書きました。 あなたはおそらく
オートジャンプに適応させます。
これを.config / ranger /commands.pyに入れます。
from ranger.api.commands import *
import subprocess
class j(Command):
""":j
Uses fasd to set the current directory.
"""
def execute(self):
directory = subprocess.check_output(["fasd", "-dl1", self.arg(1)])
directory = directory.decode("utf-8", "ignore")
directory = directory.rstrip('\n')
self.fm.execute_console("cd " + directory)
最も参考になるコメント
私はfasdが好きで、:jコマンドを与えるためにこれを書きました。 あなたはおそらく
オートジャンプに適応させます。
これを.config / ranger /commands.pyに入れます。