Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Andrew Komarnitskyi
@komarnitskyi
Hi there!
Have a question about aliases. I want to have a public aliases (in my dotfiles for example) and private, outside of init.fish, how can I do it?
Rubén Varela
@rubenvarela
@komarnitskyi Not sure if you solved it, but all you need to do is source the private file from a config file that's already invoked. If you are putting the public aliases in init.fish, in that file add source $HOME/private_aliases.fish. Then you can create that file and the next time fish is invoked or the configuration reloaded, it will be invoked.
Andrew Komarnitskyi
@komarnitskyi
@rubenvarela thank you! that’s exactly what I needed!
Iosmanthus Teng
@iosmanthus
hello, anyone here?
Using release channel "stable".
Cloning master from https://github.com/oh-my-fish/oh-my-fish.git...
Writing bootstrap to /home/programmatore//.config/fish/conf.d/omf.fish...
Setting up Oh My Fish configuration...
Updating https://github.com/oh-my-fish/packages-main master... Done!
Installing package default
fatal: repository 'default' does not exist
Could not install default.
Install aborted: Error installing plugins

Oh My Fish installation failed.

If you think that it's a bug, please open an
issue with the complete installation log here:

http://github.com/oh-my-fish/oh-my-fish/issues
i just get some troubles when i am trying to install omf
and i have saw the issue
this issue just causes that default theme can't be installed?
Itzik Ephraim
@oranja
Hi @OsmanthusTree
Itzik Ephraim
@oranja
Please take a look at #499 and report your issue there, with the values of $HOME and $XDG_CONFIG_HOME
Iosmanthus Teng
@iosmanthus
OK, thanks 😊
Fabian Homborg
@faho
Hi all! We at fish-shell upstream would like to change how local-exported (set -lx) variables interact with functions. We think this is much better (in particular it enables begin; set -lx something something; somecommandorfunction; end to also work correctly with functions), but it can break some functions - those that expect to set a global var without defining it explicitly as global. Could y'all test fish-shell/fish-shell#4149 and see if it works with your functions?
Radoslav Ivanov Ivanov
@murpyslaw
how do I use fuzzy command search under ubuntu 14.04?
I do fh
and
I was looking for a ctrl+r alternative
Itzik Ephraim
@oranja
@faho Thanks a lot for the heads up. We will look into this asap. The fast progress and thoughtful discussions are delighting. Keep it up!
Itzik Ephraim
@oranja
@murpyslaw Can you please explain in more detail what are you trying to acheive, what have you already tried, and what are the obstacles? I think more people would be able to help you find a solution when the situtation is clearer. (I'm not a fzf user myself).
Itzik Ephraim
@oranja
Are you using OMF's fzf plugin (fishgretel/pkg-fzf)?
Are you trying to bind some keyboard shortcut to fh?
And if so, are you just trying to come up with a suitable key combination or need guidance how to set this shortcut to call fh?
Chinggis Tenger
@Chinggis6
i assum there's no way to delete until the beginning of line in (spac)emacs? :(
Itzik Ephraim
@oranja
Are you asking about emacs or fish?
Chinggis Tenger
@Chinggis6
oops :shipit:
Itzik Ephraim
@oranja
hehe no big deal. Do I understand correctly from your question that you are switching from vim to emacs?
Fabian Homborg
@faho
@Chinggis6: In vi-style editing, "d0" will delete until the beginning of the line, "d^" will delete to the first non-whitespace character. I just tested it with evil and it works.
Troy Hinckley
@CeleritasCelery
Hey new to omf. I installed a pig with omf install emacs and I can see it with omf list but the functions are never being loaded. How Can I figure out what is wrong?
Andrew Komarnitskyi
@komarnitskyi
hi! have a question, I created a theme for omf and I want to add some config for the one. Is it will be a good decision to use env variables to customize the theme? I'm worried about performance
Fabian Homborg
@faho

@komarnitskyi: In general terms, anything built-in is essentially free. That includes expansions, including $var variable expansions, but also builtins like test or echo or string.

So if you want to improve your script's performance, you should check where it calls external commands first. In your theme, that includes this piece:

 echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')

which calls sed, which is an external thing, instead of string (in fish <= 2.7, string is slower than sed et al for large strings, so there's a trade-off there. It's gone in the upcoming 3.0 though).

Also this part:

function _get_node_version
  echo (command node -v)
end

# [...]


  if [ (_get_node_version) ]
    set -l node_version (string replace -r "\Av(\d*\.\d*.(0|[1-9]{1,}))\Z" '$1' (node -v))
    set node_info " $zephyr_NODE_SYMBOL$set_green $node_version$set_normal"
end

Which calls node -v twice. You can use something like

if set -l nv (node -v)

to get node's output and status (since set does not change $status - it passes it through).

Also, this is very unlikely to change in a fish session, so you can cache the results:

if set -q node_version; or set -l nv (node -v)
    set -g node_version (string replace -r "\Av(\d*\.\d*.(0|[1-9]{1,}))\Z" '$1' -- $nv)
    set node_info " $zephyr_NODE_SYMBOL$set_green $node_version$set_normal"
end

Also, if you want to profile your theme, fish has a built-in profiler! I always use it like

# Write profile information to /tmp/some-file.prof of a run of fish_prompt
fish --profile /tmp/some-file.prof -c 'fish_prompt'
# Output it sorted by the second column - the "sum"
sort -nk 2 /tmp/some-file.prof

Hope that helps!

Also this:

if test (string match '*behind*' $push_or_pull)

should be

if string match -q '*behind*' -- $push_or_pull
Joe Adams
@joe-adams
I'm running omf and something is setting my JAVA_HOME to a value I don't want. But I don't what is setting it. Any suggestions?
Joe Adams
@joe-adams
Nevermind. I found it.
Misha Marinenko
@misha-marinenko-official
hey
Снимок экрана 2018-12-02 в 16.02.00.png
Снимок экрана 2018-12-02 в 16.02.00.png
Kevin Kaland
@wizonesolutions
can I turn off timestamps for the default theme?
bobthefish has the option, but the same option doesn't do anything for default.
Kevin Kaland
@wizonesolutions
^ got an answer to this, so no need to answer
Hans
@hansl
Is this the right channel for discussing themes? I'd like to have a PR fast forwarded for bobthefish, and have some free time to help with it if needed.
Gregory Pakosz
@gpakosz
Hello
I once had oh-my-fish, then reinstalled my machine
image.png
I somewhat kept my config around and now trying to install oh-my-fish gives me: "Install aborted: Failed to read from tty"
any idea please?
Richard Guay
@raguay
I just stated using fish shell with omf. When I use omf install to install anything, I get errors but the item is still installed.
~/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.add.fish (line 11): Expected a string, but instead found a '&'
    if not grep $record $bundle > /dev/null ^&1
                                             ^
from sourcing file ~/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.add.fish
    called on line 1 of file ~/.local/share/omf/pkg/omf/functions/packages/omf.packages.install.fish
in command substitution
    called on line 55 of file ~/.local/share/omf/pkg/omf/functions/packages/omf.packages.install.fish
in function 'omf.packages.install' with arguments 'z'
    called on line 13 of file ~/.local/share/omf/pkg/omf/functions/cli/omf.cli.install.fish
in function 'omf.cli.install' with arguments 'z'
    called on line 2 of file -
in function '__omf_last_command' with arguments 'z'
    called on line 50 of file ~/.local/share/omf/pkg/omf/functions/omf.fish
in function 'omf' with arguments 'install z'
source: Error while reading file '/Users/raguay/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.add.fish'
fish: Unknown command: omf.bundle.add
~/.local/share/omf/pkg/omf/functions/packages/omf.packages.install.fish (line 55): 
    omf.bundle.add package $name_or_url
    ^
in function 'omf.packages.install' with arguments 'z'
    called on line 13 of file ~/.local/share/omf/pkg/omf/functions/cli/omf.cli.install.fish
in function 'omf.cli.install' with arguments 'z'
    called on line 2 of file -
in function '__omf_last_command' with arguments 'z'
    called on line 50 of file ~/.local/share/omf/pkg/omf/functions/omf.fish
in function 'omf' with arguments 'install z'
bash: line 2: _z: command not found
cd: The directory 'bash: line 1: /Users/raguay/.local/share/omf/pkg/z/functions/../z/z.sh: No such file or directory' does not exist
~/.local/share/omf/pkg/z/functions/z.fish (line 16): 
    builtin cd $Z_PWD
    ^
in function 'z' with arguments '--add /Users/raguay/.local/share/omf/pkg/z'
    called on line 5 of file ~/.local/share/omf/pkg/z/init.fish
in function 'z.pwd' with arguments 'VARIABLE SET PWD'
    called on line 1 of file /usr/local/Cellar/fish/3.1.0/share/fish/functions/cd.fish
in event handler: handler for variable 'PWD'
    called on line 36 of file /usr/local/Cellar/fish/3.1.0/share/fish/functions/cd.fish
Submodule 'z' (https://github.com/rupa/z) registered for path 'z'
Cloning into '/Users/raguay/.local/share/omf/pkg/z/z'...
Submodule path 'z': checked out '3eb64444d713b9fc6c9ad1a8fc8814639c584faa'
✔ z successfully installed.
This is the result of installing the z plugin.
The same error shows up in some of the other commands.
damani42
@damani42
hi
i saw you have a git directory in library why don't use fish-git-util ?
damani42
@damani42
nice it's possible to connect with irc on gitter :)