1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

zsh 使いが nushell を使ってみて困った基礎的なコマンドたちとその代替法

Last updated at Posted at 2022-05-22

※気づきが増えたらこの記事を更新して追記するかもしれません。

pwd

# zsh
pwd
# nu
$env.PWD

pushd & popd

#zsh
pushd .. ; pwd ; popd ; pwd
# nu
enter .. ; $env.PWD ; exit ; $env.PWD
  • https://github.com/nushell/nushell/issues/4269
  • enter .. で fork 的な、あるいは screens/tmux(/byoubu) 的な状態の別シェルへ移る。
  • shellsenter で増えたシェルの一覧を視認できる。
  • npenter で増えたシェルを切り替えできる。
  • shells で複数のシェルがある状態で exit するとシェルが1つ消えてお隣へ移る。

alias

# zsh
alias hoge='echo nyanko'
# nu
alias hoge = 'echo nyanko'
  • nu では alias の後ろに続ける "引数群" は command-alias = alias-entity 的な具合なので hoge='echo nyanko' だと失敗します。 hoge = 'echo nyanko' だと成功します。

zsh --help | bash -c help

# zsh
zsh --help
# bash
bash -c help
# nu
help

code . ( vscode via WSL with nushell )

# zsh
code .
# nu
code .
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?