fish: add envsource function for exporting environment variables
This commit is contained in:
parent
510c5d9f05
commit
6892829a35
1 changed files with 8 additions and 0 deletions
|
|
@ -35,6 +35,14 @@ in
|
|||
set_color normal
|
||||
|
||||
bind \cy 'commandline | wl-copy -n'
|
||||
|
||||
function envsource
|
||||
for line in (cat $argv | grep -v '^#' | grep -v '^\s*$' | sed -e 's/=/ /' -e "s/'//g" -e 's/"//g' )
|
||||
set export (string split ' ' $line)
|
||||
set -gx $export[1] $export[2]
|
||||
echo "Exported key $export[1]"
|
||||
end
|
||||
end
|
||||
'';
|
||||
shellAliases = {
|
||||
rm = "trash";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue