Better presentation of the additional paths in $PATH
This commit is contained in:
		
							parent
							
								
									f22441c660
								
							
						
					
					
						commit
						90512f8daf
					
				@ -1,3 +1,4 @@
 | 
			
		||||
# -*- org-confirm-babel-evaluate: nil -*-
 | 
			
		||||
#+TITLE: Phundrak’s fish config
 | 
			
		||||
#+INCLUDE: headers.org
 | 
			
		||||
#+OPTIONS: auto-id:t
 | 
			
		||||
@ -5,7 +6,7 @@
 | 
			
		||||
#+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak's fish config" />
 | 
			
		||||
#+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the fish config file of Phundrak" />
 | 
			
		||||
#+PROPERTY: header-args:fish :tangle ~/.config/fish/config.fish :exports code
 | 
			
		||||
#+PROPERTY: header-args :exports code
 | 
			
		||||
#+PROPERTY: header-args :exports code :tangle no
 | 
			
		||||
 | 
			
		||||
* Table of Contents :TOC:noexport:
 | 
			
		||||
  :PROPERTIES:
 | 
			
		||||
@ -112,10 +113,29 @@
 | 
			
		||||
  is for example the case with my =PATH= variable in which I add Rust’s Cargo’s
 | 
			
		||||
  binaries, Go’s binaries  and my own executables. And of  course, don’t forget
 | 
			
		||||
  to add the already existing =PATH=.
 | 
			
		||||
  #+BEGIN_SRC fish
 | 
			
		||||
    set -gx PATH \
 | 
			
		||||
    $HOME/.pub-cache/bin $HOME/.local/bin $HOME/go/bin $HOME/.cargo/bin \
 | 
			
		||||
    $HOME/.gem/ruby/2.6.0/bin $PATH
 | 
			
		||||
 | 
			
		||||
  #+NAME: extra-paths
 | 
			
		||||
  | additional path           | what it leads to                     |
 | 
			
		||||
  |---------------------------+--------------------------------------|
 | 
			
		||||
  | $HOME/.pub-cache/bin      | Dart binaries and executables        |
 | 
			
		||||
  | $HOME/.local/bin          | Custom executables, see [[file:bin.org]] |
 | 
			
		||||
  | $HOME/go/bin              | Go binaries and executables          |
 | 
			
		||||
  | $HOME/.cargo/bin          | Rust binaries and executables        |
 | 
			
		||||
  | $HOME/.gem/ruby/2.6.0/bin | Ruby binaries and executables        |
 | 
			
		||||
 | 
			
		||||
  #+NAME: generate-extra-paths
 | 
			
		||||
  #+BEGIN_SRC python :var paths=extra-paths :exports none :cache yes
 | 
			
		||||
    results = ''
 | 
			
		||||
    for path in paths:
 | 
			
		||||
        results += "{0} ".format(path[0])
 | 
			
		||||
    return results.strip()
 | 
			
		||||
  #+END_SRC
 | 
			
		||||
 | 
			
		||||
  #+RESULTS[36e9cabf867423f29b621d8dac765fad154bd2b1]: generate-extra-paths
 | 
			
		||||
  : $HOME/.pub-cache/bin $HOME/.local/bin $HOME/go/bin $HOME/.cargo/bin $HOME/.gem/ruby/2.6.0/bin
 | 
			
		||||
 | 
			
		||||
  #+BEGIN_SRC fish :noweb yes
 | 
			
		||||
    set -gx PATH <<generate-extra-paths()>> $PATH
 | 
			
		||||
  #+END_SRC
 | 
			
		||||
 | 
			
		||||
  Sometimes, software  will rely on =SUDO_ASKPASS=  to get a GUI  from which it
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user