On Sun, 24 Mar 2019, Manfred Lotz wrote: > In zsh I could exclude certain commands from being added to history > like follows: > > _ignore_cmds="mycmd somecmd" > for c in $(echo $_ignore_cmds); do > eval "alias $c=' $c'" > done > > In config.fish I tried something similar: > > > set _ignore_cmds cd mplayer lrm > for c in $_ignore_cmds > eval "alias $c=' $c'" > end > > > but it doesn't work. > > Any idea what I'm doing wrong?
Aliases in fish are just implemented as functions; you are probably better off using abbreviations, which are expanded in interactive mode before execution. Try: for c in $_ignore_cmds abbr --add --global $c " $c" end David Adam zanc...@ucc.gu.uwa.edu.au _______________________________________________ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users