Advertisement
Guest User

Untitled

a guest
Mar 9th, 2020
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.86 KB | None | 0 0
  1. # /etc/fish/config.fish: DO NOT EDIT -- this file has been generated automatically.
  2.  
  3. # if we haven't sourced the general config, do it
  4. if not set -q __fish_nixos_general_config_sourced
  5.   set fish_function_path /nix/store/x3yf11mb9iksz80gd5hq66d1l1k1n35k-fish-foreign-env-git-20170324/share/fish-foreign-env/functions $fish_function_path
  6.   fenv source /etc/fish/foreign-env/shellInit > /dev/null
  7.   set -e fish_function_path[1]
  8.  
  9.  
  10.  
  11.   # and leave a note so we don't source this config section again from
  12.   # this very shell (children will source the general config anew)
  13.   set -g __fish_nixos_general_config_sourced 1
  14. end
  15.  
  16. # if we haven't sourced the login config, do it
  17. status --is-login; and not set -q __fish_nixos_login_config_sourced
  18. and begin
  19.   set fish_function_path /nix/store/x3yf11mb9iksz80gd5hq66d1l1k1n35k-fish-foreign-env-git-20170324/share/fish-foreign-env/functions $fish_function_path
  20.   fenv source /etc/fish/foreign-env/loginShellInit > /dev/null
  21.   set -e fish_function_path[1]
  22.  
  23.  
  24.  
  25.   # and leave a note so we don't source this config section again from
  26.   # this very shell (children will source the general config anew)
  27.   set -g __fish_nixos_login_config_sourced 1
  28. end
  29.  
  30. # if we haven't sourced the interactive config, do it
  31. status --is-interactive; and not set -q __fish_nixos_interactive_config_sourced
  32. and begin
  33.   alias cat 'bat'
  34. alias catt 'bat --style plain'
  35. alias df 'df -h'
  36. alias du 'du -h'
  37. alias feh 'sxiv'
  38. alias free 'free -m'
  39. alias l 'ls -alh'
  40. alias ll 'exa -l --git'
  41. alias ls 'exa'
  42. alias psg 'ps au | grep'
  43. alias top 'htop'
  44. alias vi 'nvim'
  45. alias vim 'nvim'
  46.  
  47.   set fish_function_path /nix/store/x3yf11mb9iksz80gd5hq66d1l1k1n35k-fish-foreign-env-git-20170324/share/fish-foreign-env/functions $fish_function_path
  48.   fenv source /etc/fish/foreign-env/interactiveShellInit > /dev/null
  49.   set -e fish_function_path[1]
  50.  
  51.   any-nix-shell fish --info-right | source
  52.  
  53.   # add completions generated by NixOS to $fish_complete_path
  54. begin
  55.   # joins with null byte to acommodate all characters in paths, then respectively gets all paths before (exclusive) / after (inclusive) the first one including "generated_completions",
  56.   # splits by null byte, and then removes all empty lines produced by using 'string'
  57.   set -l prev (string join0 $fish_complete_path | string match --regex "^.*?(?=\x00[^\x00]*generated_completions.*)" | string split0 | string match -er ".")
  58.   set -l post (string join0 $fish_complete_path | string match --regex "[^\x00]*generated_completions.*" | string split0 | string match -er ".")
  59.   set fish_complete_path $prev "/etc/fish/generated_completions" $post
  60. end
  61.  
  62.  
  63.   # and leave a note so we don't source this config section again from
  64.   # this very shell (children will source the general config anew,
  65.   # allowing configuration changes in, e.g, aliases, to propagate)
  66.   set -g __fish_nixos_interactive_config_sourced 1
  67. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement