コンソールのどのコマンドが最も時間がかかりますか?

「cd」があります。



私は頻繁にフォルダに行き、オートコンプリートでも保存されないことに気付き始めました。 次に、コンソールのナビゲーションを簡素化する方法を探し始めました。



しかし、解決策が必要です!





私のお気に入りのzshシェルには、このような機会があります: , "/u/in/sy" -> "/usr/include/sys/"



$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !












クリックしてパスを「拡張」します : , "/u/in/sy" -> "/usr/include/sys/"







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








: , "/u/in/sy" -> "/usr/include/sys/"







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








: , "/u/in/sy" -> "/usr/include/sys/"







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








 : , "/u/in/sy" -> "/usr/include/sys/"
      
      







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








: , "/u/in/sy" -> "/usr/include/sys/"







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








 : , "/u/in/sy" -> "/usr/include/sys/"
      
      







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








: , "/u/in/sy" -> "/usr/include/sys/"







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








 : , "/u/in/sy" -> "/usr/include/sys/"
      
      







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








: , "/u/in/sy" -> "/usr/include/sys/"







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








: , "/u/in/sy" -> "/usr/include/sys/"







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








: , "/u/in/sy" -> "/usr/include/sys/"







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








 : , "/u/in/sy" -> "/usr/include/sys/"
      
      







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








: , "/u/in/sy" -> "/usr/include/sys/"







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








: , "/u/in/sy" -> "/usr/include/sys/"







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








: , "/u/in/sy" -> "/usr/include/sys/"







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








 : , "/u/in/sy" -> "/usr/include/sys/"
      
      







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.



, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc



Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !
















: , "/u/in/sy" -> "/usr/include/sys/"







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc



Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !












: , "/u/in/sy" -> "/usr/include/sys/"







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








: , "/u/in/sy" -> "/usr/include/sys/"







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !








 : , "/u/in/sy" -> "/usr/include/sys/"
      
      







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh



. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !












: , "/u/in/sy" -> "/usr/include/sys/"







$CDPATH



pushd/popd



, .



. , , autojump . . "incl" "/usr/include", .



Autojump "z" . "Z" .. "frecency" - (frequency) (recency).



-, autojump z, - . :



If the product is used as a tool, its interface should be as unintelligent as

possible. Stupid is predictable; predictable is learnable; learnable is usable.




. -intelligent. .



The power of 2



, "2", , autojump z, .



"2" Go, , shell-, (bash/zsh).



, . autojump, . , - .



, .



autojump/z - precmd()



, . .



zsh - chpwd()



, :



chpwd() { $TWO add . }







bash :



// cd, // 'cd' cd() { // 'cd' builtin cd $@ // $TWO add . }







, "2". - $TWO. "add", ( ).



"go", stdout. - . - ( ), :



_2go() { local path [ $# -eq 0 ] && cd && return if [ $# -eq 1 -a -d $1 ]; then $TWO add $1 cd $1 return fi path=$($TWO go $@) [ -z "$path" ] && echo "No matches for '$@'" || builtin cd $path } alias 2='_2go'







- "shell", .



$HOME/.2paths, - .

- , .



.







, - . , .



, ?



() . , "2 u in":



/usr/include ^ ^^ 1 + 5 = 6 /usr/include/wine ^ ^^ 10 + 15 = 25







, , . autojump/z , ( ) , .. "2 us" - "/home/serge/src/usb-driver", "/usr/include/linux".



, .. , . 6/12 = 0.5 25/17 = 1.47 .



, ( , - ).



, - , , .



?



- . . , , , , . .

, "trikob" "/home/serge/src/trikita/obsqr", :







zsh <Ctrl-2>, bash <Alt-2>.







, !



https://bitbucket.org/zserge/2



, , . - , , , !



, , (, Go ):



$ hg clone https://bitbucket.org/zserge/2 $ cd 2 $ go build $ sudo cp 2 /usr/local/bin $ sudo mkdir /usr/local/share/2 $ sudo cp zshrc /usr/local/share/2/zshrc $ sudo cp bashrc /usr/local/share/2/bashrc








Go , 32- 64- . .



2, bashrc zshrc . ($HOME/.bashrc $HOME/.zshrc):



. /usr/local/share/2/bashrc # zshrc, - zsh







. ( ), ( cd, mc 2 ). $HOME/.2paths.



"2" . !











All Articles