fish
fish shell 2.7.0 There are no major changes between 2.7b1 and 2.7.0. If you are upgrading from version 2.6.0 or before, please also review the release notes for 2.7b1 (included below). 2.7b1と違いはそんなにない いくつかのauto completion追…
fish特有のコマンドはこいつらだけのはず。ドキュメント色々見たので。 fish: Commands
直したプルリク 取り込まれるかどうかは知らない。 github.com 概要 fish shellで、abbr --help とか man abbr を実行すると、以下のような結果が得られる。 abbrabbr - manage fish abbreviations - Synopsis abbr --add [SCOPE] WORD EXPANSION abbr --era…
hub alias -s fish 以前はeval (hub alias -s)でもOKだったのに、最近になってNGになった alias git=hub # eval (hub alias -s) hub alias -sで-sオプションをつけると単にaliasになるけど、つけないとfunctionになる。 hub/alias.go at master · github/hub…
fish shell doc_src doc_srcの下のファイルってどうするんだろうって思ったけど、manやdocumentで使われていた。 fish-shell/abbr.txt at master · fish-shell/fish-shell · GitHub
aptで入れたfish shell、argparse使えなくないか???2.6.0だけど— shigemk2 (@shigemk2) November 1, 2017 これ。 github.com apt-getで入れられる現行のfishだと2.6.0が入るけど、それだとそもそもargparseが実行できないし、ここのIssueでfixされたコミ…
fish shellのmake testでTests disabled: expect not foundなどというエラーに見舞われたのでexpectを入れたら解決— shigemk2 (@shigemk2) November 1, 2017 fish shellでmake testしたらばexpectがないってんで怒られたので、sudo apt-get install expectで…
fish shell contribute 使用しているプログラミング言語はC++ Include What You Useがキモのひとつ ドキュメントのソースはdoc_srcだけど、実際のサイトとどのように紐付いているか不明 abbrとか 当然だけどテストやLintはパスしてね
fish switch switchを使える。というか使わないといけない switch (uname) case Linux echo Hi Tux! case Darwin echo Hi Hexley! case FreeBSD NetBSD DragonFly echo Hi Beastie! case '*' echo Hi, stranger! end
fish shell funcsave 関数保存
fish shell binding bind bindの関数リストなど https://fishshell.com/docs/current/commands.html
fish psub etc プロセス置換 (command | psub) 名前付きパイプ (コマンド間でデータを渡す。パラメータとは別。故にsource (command) みたいなのはエラーになる) コマンド置換 (command) コマンドラインのパラメータ展開 パイプライン 複数のコマンドをひと…
fish shell too many arguments 例のアレ。 status --is-interactive; and . (rbenv init -|psub) 最近のfish shellでは.はNGになっててsourceに変えられる。 rbenvを最新までアップデート(git pull)したらエラーは消えた。 [http://blog.tokoyax.com/entry/…
sourceのaliasのようなかんじ。 type . . is a function with definition # Defined in /usr/share/fish/config.fish @ line 215 function . --description 'Evaluate contents of file (deprecated, see "source")' --no-scope-shadowing if begin test (co…
このあたりとかを参考に。 stackoverflow.com
fishにunaliasコマンドはない。aliasを外すには、 functions -e xxxxxxxx こう。 Unix Shells: Bash, Fish, Ksh, Tcsh, Zsh - Hyperpolyglot
Fish is not a POSIX 1003.1 compatible shell. It does not read /etc/profile 要するに、/etc/profileは読めない。ので、proxy設定をごにょりたいときは/etc/environmentに設定を追加した。 github.com
fish random zsh/bashのように$RANDOM変数ではなく、randomという関数が用意されている。
zshやbashでいうところのunsetってfishだとどうやるんだい。 こうやる。 set -e myvar # or set --erase myvar いい加減覚えたい。 How do I unset a variable in the fish shell? - Stack Overflow
reload fish config source ~/.config/fish/config.fish もうつかえないやつ(older than 2.1) . .config/fish/config.fish
for x in (seq 5); uuidgen >> (date +"%Y%m%d".csv); end こういうふうに書く。なお、;を省くと、以下のようなエラーに見舞われる。 for x in (seq 5) uuidgen >> (date +"%Y%m%d".csv) end Expected end of the statement, but instead found a redirectio…
なんかzshとか比べてすごい直感的になっている (seq 5)って書けば1 to 5でループできる。 for x in (seq 5); echo $x; end fish: Tutorial
rbenv init - | source ちゃんと入れよう。挙動がおかしくなる。少なくとも、自分の場合はbundlerがシステムのほうになっていた。 www.qoosky.io
例のやつ。レファレンス的に読む fish.rubikitch.com
パイプライン fish.rubikitch.com
exec replaces the currently running shell with a new command. On successful completion, exec never returns. exec cannot be used inside a pipeline. どうしようか。 fish user documentation
なぞると良い。なお、fishではset -xを使うとgo envの設定を上書きできる(-xをつけないと上書き出来ない) Ubuntu · golang/go Wiki · GitHub
はてな記法でfishは使えない。 function peco-git-checkout git branch -a | peco | tr -d ' ' | read branch echo $branch if [ $branch ] if contains $branch "remotes/" set -l b (echo $branch | awk -F'/' '{print $3}') git checkout -b $b $branch e…
こういうの。NOT条件で文字列が含まれているかどうかをnot containsで調べることが出来る。 for i in ~/bin /usr/local/bin if not contains $i $PATH set PATH $PATH $i end end fish user documentation
github.com yumじゃ最新のは入らない。入らない。ので、make。 autoreconf --no-recursive [if building from Git] ./configure make [gmake on BSD] sudo make install