We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
find . -name NoexistFile
:args `cmd ...` で backtick が空文字を返すと backtick そのものを引数リストに追加してしまう
mkdir foo_no_files cd foo_no_files LC_ALL=C vim --clean
:args `ls` :ls 1 %a "`ls`" line 1 :call setreg('x', '') :args `=getreg("x")` :ls 1 # "`ls`" line 1 2 %a "`=getreg("x")`" line 1 :call setreg('s', ' ') :args `=getreg("s")` 1 "`ls`" line 1 2 # "`=getreg("x")`" line 1 3 %a "`=getreg("s")`" line 1 :args `find .. -type f -name NotFoundFILE` 1 "`ls`" line 1 2 "`=getreg("x")`" line 1 3 # "`=getreg("s")`" line 1 4 %a "`find .. -type f -name NotFoundFILE`" line 1
backtick が返すのが改行一文字とかだと、その値をbufnameに使います
:args `echo ''` :args `echo -n ' '` :args `echo -n ' '` :ls 1 "" line 1 2 # " " line 1 3 %a " " line 1 :args `echo -n ''` :ls 1 "" line 1 2 " " line 1 3 # " " line 1 4 %a "`echo -n ''`" line 1 :echo [bufnr("")] [4] :echo [bufnr("^$")] [1]
:argsの引数が無いものとして、何もしない 個人的には bufname="" となる場合はエラーになってほしいが、意図して誰かがそうするかもしれない。
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Aug 3 2023 13:47:55) Included patches: 1-1677
Linux Ubuntu 16.04 32bit
vim-jp/isuuses の backtick-expansion っぽいもの
#6 (comment)
backtick-expansionにひっかかるようなバッファでも作れる
#1066 (comment)
backtick コマンドを実行して正常に終了した場合はその結果が得られてるけど、 異常終了した場合は `test` という変な引数が残ってしまう
vim/vim の issue を調べていたら今回の挙動に引っかかりました vim/vim#12721 `-expansion always errors #12721
The text was updated successfully, but these errors were encountered:
find . -name NoexistFile\
No branches or pull requests
不具合の内容
:args `cmd ...` で backtick が空文字を返すと backtick そのものを引数リストに追加してしまう
現象・ログ
再現手順
mkdir foo_no_files
cd foo_no_files
LC_ALL=C vim --clean
backtick が返すのが改行一文字とかだと、その値をbufnameに使います
期待動作
:argsの引数が無いものとして、何もしない
個人的には bufname="" となる場合はエラーになってほしいが、意図して誰かがそうするかもしれない。
Vimのバージョン
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Aug 3 2023 13:47:55)
Included patches: 1-1677
OSの種類/ディストリ/バージョン
Linux Ubuntu 16.04 32bit
使用している or 関係していそうなプラグイン
その他
vim-jp/isuuses の backtick-expansion っぽいもの
#6 (comment)
#1066 (comment)
vim/vim の issue を調べていたら今回の挙動に引っかかりました
vim/vim#12721
`-expansion always errors #12721
The text was updated successfully, but these errors were encountered: