Autojump: 最も頻繁にアクセスされるディレクトリを表示しますが、 `cd`は実行しません

作成日 2013年06月10日  ·  3コメント  ·  ソース: wting/autojump

通常、 j somethingは作業ディレクトリを切り替えます。 しかし、そうする必要はありません。 場合によっては、ディレクトリをstdoutに出力するだけで済みます。 例えば

open `j --no-cd something`

これにより、OSXで宛先ディレクトリのFinderが起動する可能性があります。

この機能をハックするのが難しいかどうかはわかりませんが、すばらしいツールに感謝します。

最も参考になるコメント

私は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)

全てのコメント3件

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)
このページは役に立ちましたか?
0 / 5 - 0 評価