You are not logged in.

#1 2008-06-02 17:59:31

Husio
Member
From: Europe
Registered: 2005-12-04
Posts: 359
Website

How to write it to work on Fish shell?

I have wrote a command, that works in bash, but won't in fish.

var=$(dmenu_path | dmenu); exec $var

How to rewrite it to fish shell?

Offline

#2 2008-06-02 18:11:54

GGLucas
Member
Registered: 2008-03-13
Posts: 113

Re: How to write it to work on Fish shell?

Subshells in fish are started with just brackets, without the $, also, you set variables with the set command, instead of using =, it would become:

set var (dmenu_path | dmenu); exec $var

Offline

#3 2008-06-02 18:16:39

Husio
Member
From: Europe
Registered: 2005-12-04
Posts: 359
Website

Re: How to write it to work on Fish shell?

I've allready try this.

~> set var (dmenu_path | dmenu); exec $var
fish: Variables may not be used as commands. Instead, define a function like 'function var; xterm $argv; end'. See the help section for the
function command by typing 'help function'.
set var (dmenu_path | dmenu); exec $var
                                   ^

Offline

#4 2008-06-02 18:24:20

GGLucas
Member
Registered: 2008-03-13
Posts: 113

Re: How to write it to work on Fish shell?

.

Last edited by GGLucas (2022-06-24 08:12:40)

Offline

Board footer

Powered by FluxBB